Specify covariates for simulation study
sim_covariates.Rd
Provide details on the desired covariate distributions and covariance for for a simulation study.
Arguments
- covariates
list. Named list of covariate mean values or probabilities as generated through
bin_var()
(classSimVarBin
orcont_var()
(classSimVarCont
). Seedetails
for more information.- covariance_internal
matrix. Covariance matrix before binarization for internal patients.
- covariance_external
matrix. Covariance matrix before binarization for external patients. Defaults to the internal covariance.
Details
This function is intended to specify the number of covariates and
relationships between them for the purposes of designing a simulation
study in psborrow2
. Because the outcome model does not necessarily
need to adjust for covariates, this function is not necessary in
create_simulation_obj()
. The relationship between the treatment
and the outcome is specified elsewhere (i.e, in sim_survival()
or
sim_binary_event()
).
We need a few things to
See also
Other simulation:
sim_samplesize()