This function simulates DRSP data for n_subjects. Options allow to choose the number of cycles per subject (n_cycles), the increase in symptoms rating (pmdd_intensity), the baseline levels severity of problems for subjects (baseline), the number of items varying with the menstrual cycle (n_items), and the missingness rate (missingness_rate), which is the fraction of days for which data are missing.

simulate_cpass_data(
  n_subjects = 1,
  n_cycles = 1,
  baseline = 1,
  pmdd_intensity = 0.5,
  n_items = 24,
  missingness_rate = 0
)

Arguments

n_subjects

(positive integer) The number of subjects for which data need to be simulated

n_cycles

(positive integer(s)) The number of cycles for each subject. This parameter (as well as all following parameters) can be of length 1 (and all subjects have the same number of cycles) or of length n_subjects to determine the number of cycles independently for each subject.

baseline

(positive values in 1-6) Baseline levels for severity of problems for all subjects (if baseline is of length 1) or each subject (if baseline is of length n_subjects).

pmdd_intensity

change from baseline during the pre-menstrual phase.

n_items

(positive integers in 1-24) number of items for which there is a variation in the pre-menstrual phase. Can be of length 1 (same n_items for all subjects) or of length n_subjects (specific n_items for each subject).

missingness_rate

(positive values in 0-0.9) The fraction of missing days for all (if of length 1) or each (if of length n_subjects) subject.

Value

a data.frame providing the DRSP scores for each subject, cycle, cycle day (within the pre- and post- menstrual phase) and item.

See also

simulate_cycle