Generate data for a single group
Arguments
- pars_group
A
simul_parsobject as generated byset_simul_pars(). It specifies the simulation parameters of the given group.- strategy_fun
Function implementing trajectories after the intercurrent event (ICE). Must be one of
getStrategies(). SeegetStrategies()for details. IfNULLthen post-ICE outcomes are untouched.- distr_pars_ref
-
Optional. Named list containing the simulation parameters of the reference arm. It contains the following elements:
mu: Numeric vector indicating the mean outcome trajectory assuming no ICEs. It should include the outcome at baseline.sigmaCovariance matrix of the outcome trajectory assuming no ICEs. IfNULL, then these parameters are inherited frompars_group.
Value
A data.frame containing the simulated data. It includes the following variables:
id: Factor variable that specifies the id of each subject.visit: Factor variable that specifies the visit of each assessment. Visit0denotes the baseline visit.group: Factor variable that specifies which treatment group each subject belongs to.outcome_bl: Numeric variable that specifies the baseline outcome.outcome_noICE: Numeric variable that specifies the longitudinal outcome assuming no ICEs.ind_ice1: Binary variable that takes value1if the corresponding visit is affected by ICE1 and0otherwise.dropout_ice1: Binary variable that takes value1if the corresponding visit is affected by the drop-out following ICE1 and0otherwise.ind_ice2: Binary variable that takes value1if the corresponding visit is affected by ICE2.outcome: Numeric variable that specifies the longitudinal outcome including ICE1, ICE2 and the intermittent missing values.
