vars_su_y_cigexp__pos | R Documentation |
Computes the summary score su_y_cigexp__pos_prsum
Cigarette Expectancies (ASCQ) [Youth] (Strength of positive
expectancies): Prorated sum
Note: all 0s are changed to NAs prior to calculating pro-rated sum
Summarized variables:
su_y_cigexp__pos_001
su_y_cigexp__pos_002
su_y_cigexp__pos_003
su_y_cigexp__pos_004
Excluded values:
0
Validation criterion: maximally 2 of 4 items missing
vars_su_y_cigexp__pos
compute_su_y_cigexp__pos_prsum(
data,
name = "su_y_cigexp__pos_prsum",
combine = TRUE,
exclude = c("0"),
max_na = 2
)
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 |
exclude |
character vector. Values to be excluded from the summary score calculation. |
max_na |
numeric, positive whole number. Number of missing items allowed (Default: 1). |
vars_su_y_cigexp__pos is a character vector of all column names
used to compute summary score of su_y_cigexp__pos_prsum
and
su_y_cigexp__pos_nm
.
tbl. The input data frame with the summary score appended as a new column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.