Compute "Prodromal Psychosis Scale [Youth] (Severity Score)"
Source:R/scores_mh.R
compute_mh_y_pps__severity_score.RdComputes the summary score mh_y_pps__severity_score
Prodromal Psychosis Scale [Youth] (Severity Score)
Summarized variables:
mh_y_pps__severity_001mh_y_pps__severity_002mh_y_pps__severity_003mh_y_pps__severity_004mh_y_pps__severity_005mh_y_pps__severity_006mh_y_pps__severity_007mh_y_pps__severity_008mh_y_pps__severity_009mh_y_pps__severity_010mh_y_pps__severity_011mh_y_pps__severity_012mh_y_pps__severity_013mh_y_pps__severity_014mh_y_pps__severity_015mh_y_pps__severity_016mh_y_pps__severity_017mh_y_pps__severity_018mh_y_pps__severity_019mh_y_pps__severity_020mh_y_pps__severity_021
Excluded values: none
Validation criterion: none of 21 items missing
Usage
compute_mh_y_pps__severity_score(
data,
name = "mh_y_pps__severity_score",
max_na = 0,
combine = TRUE
)Arguments
- data
tbl. Data frame containing the columns to be summarized.
- name
character. Name of the summary score column.
- max_na
numeric, positive whole number. Number of missing items allowed.
NULLmeans no limit.- 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.
Details
The severity score is calculated by summing the severity scores for each
question and adding the number of mh_y_pps__bother__yes_count to the
total.
However, if the mh_y_pps__severity_nm score is greater than max_na,
the severity score is set to NA.
There is also a sanity check for the gating question of PPS
base/bother score. If the paired base/bother question is 0 or NA
and the severity score is not missing, the paired severity score is set
to NA before computing the score.