| simulatejointRecCompet {frailtypack} | R Documentation |
Generating from a joint competing Joint frailty model with a recurrent event and two terminal events.
Description
Generates data under a joint frailty model for a single recurrent event and two terminal events in a calendar-time format. Only a single covariate representing the treatment is allowed. Event times are generated under Weibull distributions.
Usage
simulatejointRecCompet(n, censoring = 28, maxrecurrent = 50,
par0 = c(shapeR = 1.5, scaleR = 10,
shapeM = 1.75, scaleM = 16,
shapeD = 1.75, scaleD = 16,
sigma = 0.5, alphaM = 1, alphaD = 0,
betaR = -0.5, betaM = -0.5, betaD = 0))
Arguments
n |
Number of subjects. Default is 1500. |
censoring |
A number indicating a fixed right censoring time for all subjects
(as an administrative censoring). If |
maxrecurrent |
Maximum number of recurrent events per subject.
If |
par0 |
A vector of arguments controlling the parameters of the generating model.
|
Value
Returns a data.frame object with the following columns:
idId number for each subjecttreatmentBinary treatment indicatortstartStart time of the observation periodtstopStop time of the observation periodrecurrentCensoring indicator for the recurrent eventterminal1Censoring indicator for the first terminal eventterminal2Censoring indicator for the second terminal event