simcuredata: Simulation of survival times for the promotion time cure...

View source: R/simcuredata.R

simcuredataR Documentation

Simulation of survival times for the promotion time cure model.

Description

Generates right censored time-to-event data with a plateau in the Kaplan-Meier estimate.

Usage

simcuredata(n, censor = c("Uniform", "Weibull"), cure.setting = 1,
            info = TRUE, KapMeier = FALSE)

Arguments

n

Sample size.

censor

The censoring scheme. Either Uniform (the default) or Weibull.

cure.setting

A number indicating the desired cure percentage. If cure.setting = 1 (default) the cure percentage is around 20%. With cure.setting = 2 the cure percentage is around 30%.

info

Should information regarding the simulation setting be printed to the console? Default is TRUE.

KapMeier

Logical. Should the Kaplan-Meier curve of the generated data be plotted? Default is FALSE.

Details

Latent event times are generated following Bender et al. (2005), with a baseline distribution chosen to be a Weibull with mean 8 and variance 17.47. When cure.setting = 1 the regression coefficients of the long-term survival part are chosen to yield a cure percentage around 20%, while cure.setting = 2 yields a cure percentage around 30%. Censoring is either governed by a Uniform distribution on the support [20, 25] or by a Weibull distribution with shape parameter 3 and scale parameter 25.

Value

A list with the following components:

n

Sample size.

survdata

A data frame containing the simulated data.

beta.coeff

The regression coefficients pertaining to long-term survival.

gamma.coeff

The regression coefficients pertaining to short-term survival.

cure.perc

The cure percentage.

censor.perc

The percentage of censoring.

censor

The censoring scheme.

S0

The baseline survival function under the chosen Weibull parameterization.

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr.

This function is based on a routine used to describe a simulation setting in Bremhorst and Lambert (2016). Special thanks go to Vincent Bremhorst who shared this routine during his PhD thesis.

References

Bender, R., Augustin, T. and Blettner, M. (2005). Generating survival times to simulate Cox proportional hazards models, Statistics in Medicine 24(11): 1713-1723.

Bremhorst, V. and Lambert, P. (2016). Flexible estimation in cure survival models using Bayesian P-splines. Computational Statistics & Data Analysis 93: 270-284.

Gressani, O. and Lambert, P. (2018). Fast Bayesian inference using Laplace approximations in a flexible promotion time cure model based on P-splines. Computational Statistics & Data Analysis 124: 151-167.

Examples

set.seed(10)
sim <- simcuredata(n = 300, censor = "Weibull", KapMeier = TRUE)


blapsr documentation built on Aug. 20, 2022, 5:05 p.m.