Generate covariates for longitudinal simulations
Source:R/simulation_helpers.R
simulate_longitudinal_covariates.RdThis helper is designed to be used inside the covariates argument of
simulate_longitudinal_dataset(). Subject-level variables are evaluated once
per subject and repeated across time; observation-level variables are
evaluated once per row of the long-format design.
Arguments
- data
Base long-format design data supplied by
simulate_longitudinal_dataset()to a covariate callback.- subject
Named list of subject-level covariate specifications.
- observation
Named list of observation-level covariate specifications.