Compute "Life Events [Youth] (Events): Count - Version 3 (Starting at Year 6) [Validation: No more than 6 missing or declined]"
Source:R/scores_mh.R
compute_mh_y_ple_count__v03.RdComputes the summary score mh_y_ple_count__v03
Life Events [Youth] (Events): Count - Version 3 (Starting at Year 6)
[Validation: No more than 6 missing or declined]
Summarized variables:
mh_y_ple_001mh_y_ple_002mh_y_ple_003mh_y_ple_004mh_y_ple_005mh_y_ple_006mh_y_ple_007mh_y_ple_008mh_y_ple_009mh_y_ple_010mh_y_ple_011mh_y_ple_012mh_y_ple_013mh_y_ple_014mh_y_ple_015mh_y_ple_016mh_y_ple_017mh_y_ple_018mh_y_ple_019mh_y_ple_020mh_y_ple_021mh_y_ple_022mh_y_ple_023mh_y_ple_024mh_y_ple_025mh_y_ple_026mh_y_ple_027mh_y_ple_028mh_y_ple_029mh_y_ple_030mh_y_ple_031mh_y_ple_032mh_y_ple_033mh_y_ple_034
Excluded values:
444
777
999
Validation criterion: maximally 6 of 34 items missing
Usage
vars_mh_y_ple__v03
compute_mh_y_ple_count__v03(
data,
name = "mh_y_ple_count__v03",
events = c("ses-06A", "ses-07A"),
combine = TRUE,
max_na = 6
)Format
vars_mh_y_ple__v03 is a character vector of all column names
used to compute summary score of mh_y_ple.
Arguments
- data
tbl. Data frame containing the columns to be summarized.
- name
character. Name of the new column to be created (Default: the name used in the ABCD data release).
- events
character vector. Event (session ID) to be used.
- combine
logical. If TRUE, the new column will be bound to the input data frame. If FALSE, the new column will be created as a new data frame.
- max_na
numeric, positive whole number. Number of missing items allowed (Default: 6).