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 NULL to omit the subgroup entirely.

n_patient

Positive integer of length 1. If n_subgroup is NULL, then n_patient is the number of patients per treatment group. Otherwise, n_patient is the number of patients per treatment group per subgroup. In both cases, the total number of patients in the whole simulated dataset is usually much greater than the n_patients argument of brm_simulate_outline().

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:

See Also

Other simulation: brm_simulate_categorical(), brm_simulate_continuous(), brm_simulate_prior(), brm_simulate_simple()

Examples

brm_simulate_outline()

[Package brms.mmrm version 1.1.0 Index]