View source: R/simulate_data.R
generate_data_single | R Documentation |
Generate data for a single group
generate_data_single(pars_group, strategy_fun = NULL, distr_pars_ref = NULL)
pars_group |
A |
strategy_fun |
Function implementing trajectories after the intercurrent event (ICE).
Must be one of |
distr_pars_ref |
Optional. Named list containing the simulation parameters of the reference arm. It contains the following elements:
|
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. Visit 0
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 value 1
if the corresponding visit is
affected by ICE1 and 0
otherwise.
dropout_ice1
: Binary variable that takes value 1
if the corresponding visit is
affected by the drop-out following ICE1 and 0
otherwise.
ind_ice2
: Binary variable that takes value 1
if the corresponding visit is affected
by ICE2.
outcome
: Numeric variable that specifies the longitudinal outcome including ICE1, ICE2
and the intermittent missing values.
simulate_data()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.