Generate data for a single group
Arguments
- pars_group
A
simul_pars
object 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. IfNULL
then 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.sigma
Covariance 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. Visit0
denotes 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 value1
if the corresponding visit is affected by ICE1 and0
otherwise.dropout_ice1
: Binary variable that takes value1
if the corresponding visit is affected by the drop-out following ICE1 and0
otherwise.ind_ice2
: Binary variable that takes value1
if the corresponding visit is affected by ICE2.outcome
: Numeric variable that specifies the longitudinal outcome including ICE1, ICE2 and the intermittent missing values.