The function simDat is used to generate recurrent event data used in the simulation of the manuscript.

simDat(n, model, frailty = FALSE, ...)

Arguments

n

is the sample size

model

is a character string indicating the scenario; available options are M1, M2, M3, and M4, corresponding to models M1, M2, M3, and M4 described in the manuscript.

frailty

is a logical value indicating whether to generate the data under informative censoring

Details

The data frame is similar to the one used in reReg. The data consists of the following columns:

id

Patient ID

t

Patient's event time; this column consists of both the recurrent event time and the terminal event time

m

The observed number of recurrent events

x1, x2

Baseline covariates

event

recurrent event indicator; 1 = recurrent event, 0 = not a recurrent event

status

censoring indicator; this is only meanful for when event = 0