Skip to contents

This function implements the C-PASS procedure and returns a list of 6 tables of summaries and diagnoses at different levels (subjects, cycles, domains, etc).

Usage

cpass(data, silent = FALSE)

Arguments

data

a cpass.data data frame that contains the symptom DRSP scores reported by the subjects. To transform your data into a cpass.data object, use the function as_cpass_data().

silent

a logical specifying is the function should print messages or run silently. Default is FALSE.

Value

The cpass function returns a list with 6 elements; each of them is a table (data.frame):

subject_level_diagnosis

The subject-level diagnoses

cycle_level_diagnosis

The cycle-level diagnoses

DSM5_domains_level_diagnosis

The diagnoses at the DSM5 DOMAINS level

DRSP_level_diagnosis

The diagnoses at the individual DRSP items level

daily_summary_DRSP

The daily summary of each DRSP for each subject

summary_DRSP

The percent change in DRSP items between the pre- and post-menstrual phase

Examples

data(PMDD_data)
cpass_input <- as_cpass_data(PMDD_data, sep_event = "menses")
#> Number of subjects:  20 
#> Total number of cycles:  37 
#> Percentage of missing scores:  3.23 %
#> Warning: The 'phase' column will be over-written
#> Percentage of missing scores
#>           (in pre- & post-menstrual phases):  3.23 %
output <- cpass(cpass_input)
#> PME diagnosis is still experimental and has not been validated clinically. Please, use with caution.
head(output$subject_level_diagnosis)
#> # A tibble: 6 × 15
#>   subject Ncycles_tot Ncycles N_PMDD N_MRMD N_PME pmddcycprop mrmdcycprop
#>     <dbl>       <int>   <int>  <int>  <int> <int>       <dbl>       <dbl>
#> 1       2           2       2      2      2     2           1         1  
#> 2      15           1       1     NA     NA    NA          NA        NA  
#> 3      17           2       2      0      1     0           0         0.5
#> 4      21           2       2      0      0     0           0         0  
#> 5      25           2       2      0      2     1           0         1  
#> 6      27           2       2      0      1     1           0         0.5
#> # ℹ 7 more variables: pmecycprop <dbl>, PMDD <lgl>, MRMD <lgl>, PME <lgl>,
#> #   dxcat <dbl>, dx <fct>, avgdsm5crit <dbl>