Skip to contents

Simulating phenotype data (in the long format) for multiple cohorts/sites and multiple timepoints/sessions.

Usage

simulate_long_pheno_data(
  data_structure = list(cohort1 = list(sessions = c("01", "02"), n_subjects = 100),
    cohort2 = list(sessions = c("01", "02"), n_subjects = 150)),
  seed = 31081996
)

Arguments

data_structure

A nested list, with top level determining the cohort/ dataset/site. Each site is itself a list with two items: "sessions": a vector of session names/numbers; and "n_subjects": an integer indicating the number of subjects.

seed

(default = 31081996) seed used for randomization.

Value

A dataframe (in long format) with id, sex and age data.

Author

Serena Defina, 2024.