Simulates data based on Cox/Cox or Cox/Ghosh-Lin structures for recurrent events with a terminal event.
sim_GLcox(
n,
base1,
drcumhaz,
var.z = 0,
r1 = NULL,
rd = NULL,
rc = NULL,
fz = NULL,
fdz = NULL,
model = c("twostage", "frailty", "shared"),
type = NULL,
share = 1,
cens = NULL,
nmin = 100,
nmax = 1000
)A data frame with simulated recurrent events and terminal events, including frailty terms.
Number of IDs.
Baseline cumulative hazard for recurrent events.
Baseline cumulative hazard for the terminal event.
Variance of the gamma frailty.
Relative risk term for the recurrent event baseline.
Relative risk term for the terminal event.
Relative risk term for censoring.
Function for transformation of the frailty term.
Function for transformation of the frailty term for death.
Model type: "twostage", "frailty", or "shared".
Type of simulation (default depends on model).
Proportion of shared random effects (for partially shared models).
Censoring rate for exponential censoring.
Minimum number of points in the time grid (default 100).
Maximum number of points in the time grid (default 1000).
Thomas Scheike
type=3: Generates data from a Cox/Cox two-stage model.
type=2: Generates data from a Ghosh-Lin/Cox model.
If var.z=0, data is generated without dependence or frailty.
If model="twostage", the default is to generate data from a Ghosh-Lin/Cox model.
If type=3, data is generated with marginal Cox models (Cox/Cox).
Simulation is based on a linear approximation of the hazard for two-stage models on a time grid. The grid must be sufficiently fine.
Scheike (2025), Two-stage recurrent events random effects models, LIDA, to appear.