simulatejointRecCompet: Generating from a joint competing Joint frailty model with a...

simulatejointRecCompetR 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 NULL, no censoring is applied. Default is 28.

maxrecurrent

Maximum number of recurrent events per subject. If NULL, no upper bound is set for the number of of recurrent events Default is 50.

par0

A vector of arguments controlling the parameters of the generating model.

  • shapeR: shape parameter of the Weibull distribution for the recurrent event

  • scaleR: scale parameter of the Weibull distribution for the recurrent event

  • shapeT1: shape parameter of the Weibull distribution for the first terminal event

  • scaleT1: scale parameter of the Weibull distribution for the first terminal event

  • shapeT2: shape parameter of the Weibull distribution for the second terminal event

  • scaleT2: scale parameter of the Weibull distribution for the second terminal event

  • sigma: Standard deviation of the frailty

  • alphaT1: Power parameter (link) of the frailty for the first terminal event

  • alphaT2: Power parameter (link) of the frailty for the second terminal event

  • betaR: Association parameter for the treatment effect on the recurrent event

  • betaT1: Association parameter for the treatment effect on the first terminal event

  • betaT2: Association parameter for the treatment effect on the second terminal event

Value

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

See Also

jointRecCompet


frailtypack documentation built on Oct. 20, 2024, 1:08 a.m.