simulatejointRecCompet | R Documentation |
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.
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))
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.
|
Returns a data.frame
object with the following columns:
id
Id number for each subject
treatment
Binary treatment indicator
tstart
Start time of the observation period
tstop
Stop time of the observation period
recurrent
Censoring indicator for the recurrent event
terminal1
Censoring indicator for the first terminal event
terminal2
Censoring indicator for the second terminal event
jointRecCompet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.