brm_simulate_outline {brms.mmrm} | R Documentation |
Start a simulated dataset
Description
Begin creating a simulated dataset.
Usage
brm_simulate_outline(
n_group = 2L,
n_subgroup = NULL,
n_patient = 100L,
n_time = 4L,
rate_dropout = 0.1,
rate_lapse = 0.05
)
Arguments
n_group |
Positive integer of length 1, number of treatment groups. |
n_subgroup |
Positive integer of length 1, number of subgroup levels.
Set to |
n_patient |
Positive integer of length 1.
If |
n_time |
Positive integer of length 1, number of discrete time points (e.g. scheduled study visits) per patient. |
rate_dropout |
Numeric of length 1 between 0 and 1, post-baseline dropout rate. A dropout is an intercurrent event when data collection for a patient stops permanently, causing the outcomes for that patient to be missing during and after the dropout occurred. The first time point is assumed to be baseline, so dropout is there. Dropouts are equally likely to occur at each of the post-baseline time points. |
rate_lapse |
Numeric of length 1, expected proportion of post-baseline outcomes that are missing. Missing outcomes of this type are independent and uniformly distributed across the data. |
Value
A classed data frame from brm_data()
.
The data frame has one row per
patient per time point and the following columns:
-
group
: integer index of the treatment group. -
patient
: integer index of the patient. -
time
: integer index of the discrete time point.
See Also
Other simulation:
brm_simulate_categorical()
,
brm_simulate_continuous()
,
brm_simulate_prior()
,
brm_simulate_simple()
Examples
brm_simulate_outline()