Compute "Sleep Disturbance Scale [Parent] (Total): Sum [Validation: No more than 0 missing or declined]"
Source:R/scores_ph.R
compute_ph_p_sds_sum.RdComputes the summary score ph_p_sds_sum
Sleep Disturbance Scale [Parent] (Total): Sum [Validation: No more than 0
missing or declined]
Summarized variables:
ph_p_sds__dims_001ph_p_sds__dims_002ph_p_sds__dims_003ph_p_sds__dims_004ph_p_sds__dims_005ph_p_sds__swtd_001ph_p_sds__swtd_002ph_p_sds__swtd_003ph_p_sds__hyphy_001ph_p_sds__dims_006ph_p_sds__dims_007ph_p_sds__swtd_004ph_p_sds__sbd_001ph_p_sds__sbd_002ph_p_sds__sbd_003ph_p_sds__hyphy_002ph_p_sds__da_001ph_p_sds__swtd_005ph_p_sds__swtd_006ph_p_sds__da_002ph_p_sds__da_003ph_p_sds__does_001ph_p_sds__does_002ph_p_sds__does_003ph_p_sds__does_004ph_p_sds__does_005
Excluded values:
777
999
Validation criterion: maximally 0 items missing
Usage
vars_ph_p_sds_sum
compute_ph_p_sds_sum(
data,
name = "ph_p_sds_sum",
max_na = 0,
exclude = c("777", "999"),
combine = TRUE
)Format
character vector of all column names
used to compute summary scores of ph_p_sds_sum and ph_p_sds_nm.
Arguments
- data
tbl, Dataframe 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.
- max_na
integer, Maximum number of missing values allowed in the summary score.
NULLmeans no limit.- exclude
character, Values to be excluded from the summary score.
- combine
logical, If
TRUE, the summary score will be appended to the input data frame. IfFALSE, the summary score will be returned as a separate data frame.
Examples
if (FALSE) { # \dontrun{
compute_ph_p_sds_sum(data) |>
select(
all_of(c("ph_p_sds_sum", vars_ph_p_sds_sum))
)
} # }