Simulate Longitudinal Dataset with Time-Varying Correlated Covariates
Generate linear predictor from logistic model
Creates linear time-function variables
Maximum correlation between binary and normal random variables
Return closest value
Fill in partially incomplete parameters matrix
Longitudinally expand a matrix of single observations by cluster
Longitudinally expand a cluster
Checks whether string has "_s" suffix
Simulate time-varying covariates
Generate linear predictor from logistic model
Return closest value
Override static variable
Override probabilities for time-varying binary variables
Turn a number into a valid proportion
Turn symmetric matrix into vector
Flexibly simulates a dataset with time-varying covariates with user-specified exchangeable correlation structures across and within clusters. Covariates can be normal or binary and can be static within a cluster or time-varying. Time-varying normal variables can optionally have linear trajectories within each cluster. See ?make_one_dataset for the main wrapper function. See Montez-Rath et al. <arXiv:1709.10074> for methodological details.