Compute "Family History [Parent] (Suicide)) Endorsed: Either parent"
Source:R/scores_mh_famhx.R
compute_mh_p_famhx__suic__moth__fath_indicator.RdComputes the summary score mh_p_famhx__suic__moth__fath_indicator
(Family History [Parent] (Suicide)) Endorsed:
Either parent)
Excluded values:
777
888
999
Notes:
Following logic is applied to compute the score:
father endorsed
yesOR mother endorsedyes=1father endorsed
noAND mother endorsedno=0all other cases set to
NA
Usage
vars_mh_p_famhx__suic__moth__fath_indicator
compute_mh_p_famhx__suic__moth__fath_indicator(
data,
name = "mh_p_famhx__suic__moth__fath_indicator",
exclude = c("777", "888", "999"),
combine = TRUE
)Arguments
- data
tibble. A data frame containing the data.
- name
character. The name of the output column for the computed score.
- exclude
character vector. Values to be excluded from the summary score calculation.
- combine
logical. Whether to combine the summary score column with the input data frame (Default:
TRUE).