Compute "Drug Problem Index (DAPI) [Youth]: Prorated sum"
Source:R/scores_su.R
compute_su_y_drgprob_prsum.RdComputes the summary score su_y_drgprob_prsum
Drug Problem Index (DAPI) [Youth]: Prorated sum [Validation: No more
than 3 missing or declined]
Summarized variables:
su_y_drgprob_001su_y_drgprob_002su_y_drgprob_003su_y_drgprob_004su_y_drgprob_005su_y_drgprob_006su_y_drgprob_007su_y_drgprob_008su_y_drgprob_009su_y_drgprob_010su_y_drgprob_012su_y_drgprob_013su_y_drgprob_014su_y_drgprob_015su_y_drgprob_016su_y_drgprob_017su_y_drgprob_018
Excluded values: none
Validation criterion: maximally 3 items missing
Usage
vars_su_y_drgprob
compute_su_y_drgprob_prsum(
data,
name = "su_y_drgprob_prsum",
combine = TRUE,
max_na = 3
)Format
vars_su_y_drgprob is a character vector of all column names
used to compute summary score of su_y_drgprob_prsum and
su_y_drgprob_nm.
Arguments
- data
tbl. Data frame containing the columns to be summarized.
- name
character, Name of the new column to be created. Default is the name in description, but users can change it.
- combine
logical, If
TRUE(default), the summary score will be appended to the input data frame. IfFALSE, the summary score for each participant will be returned as a separate data frame. (Default: TRUE)- max_na
numeric, positive whole number. Number of missing items allowed (Default: 1).