simulate_data {rbmi}R Documentation

Generate data

Description

Generate data for a two-arms clinical trial with longitudinal continuous outcome and two intercurrent events (ICEs). ICE1 may be thought of as a discontinuation from study treatment due to study drug or condition related (SDCR) reasons. ICE2 may be thought of as discontinuation from study treatment due to uninformative study drop-out, i.e. due to not study drug or condition related (NSDRC) reasons and outcome data after ICE2 is always missing.

Usage

simulate_data(pars_c, pars_t, post_ice1_traj, strategies = getStrategies())

Arguments

pars_c

A simul_pars object as generated by set_simul_pars(). It specifies the simulation parameters of the control arm.

pars_t

A simul_pars object as generated by set_simul_pars(). It specifies the simulation parameters of the treatment arm.

post_ice1_traj

A string which specifies how observed outcomes occurring after ICE1 are simulated. Must target a function included in strategies. Possible choices are: Missing At Random "MAR", Jump to Reference "JR", Copy Reference "CR", Copy Increments in Reference "CIR", Last Mean Carried Forward "LMCF". User-defined strategies could also be added. See getStrategies() for details.

strategies

A named list of functions. Default equal to getStrategies(). See getStrategies() for details.

Details

The data generation works as follows:

The probability of the ICE after each visit is modeled according to the following logistic regression model: ~ 1 + I(visit == 0) + ... + I(visit == n_visits-1) + I((x-alpha)) where:

Please note that the baseline outcome cannot be missing nor be affected by any ICEs.

Value

A data.frame containing the simulated data. It includes the following variables:


[Package rbmi version 1.2.6 Index]