Compute "Pubertal Development Scale & Menstrual Cycle Survey History [Youth] (Male): Mean"
Source:R/scores_ph.R
compute_ph_y_pds__m_mean.RdComputes the summary score ph_y_pds__m_mean
Pubertal Development Scale & Menstrual Cycle Survey History [Youth]
(Male): Mean [Validation: No more than 1 missing or declined]
Summarized variables:
ph_y_pds_001ph_y_pds_002ph_y_pds_003ph_y_pds__m_001ph_y_pds__m_002
Excluded values:
777
999
Validation criterion: maximally 1 item missing
Usage
vars_ph_y_pds__m
compute_ph_y_pds__m_mean(
data,
name = "ph_y_pds__m_mean",
combine = TRUE,
exclude = c("777", "999"),
max_na = 1
)Format
vars_ph_y_pds__m is a character vector of all column names
used to compute summary score of ph_y_pds__m_mean and
ph_y_pds__m_nm.
Arguments
- data
tbl. Data frame containing the columns to be summarized.
- name
character. Name of the summary score column.
- combine
logical. If
TRUE(default), the summary score is is appended as a new column to the input data frame. IfFALSE, the summary score is returned as a separate one-column data frame.- exclude
character vector. Values to be excluded from the summary score calculation.
- max_na
numeric, positive whole number. Number of missing items allowed.
NULLmeans no limit.