simData4cure {intsurv}R Documentation

Simulate Data from Cox Cure Model with Uncertain Event Status

Description

Simulate Data from Cox Cure Model with Uncertain Event Status

Usage

simData4cure(nSubject = 1e3,
             shape = 2, scale = 0.1,
             lambda_censor = 1, max_censor = Inf,
             p1 = 0.9, p2 = 0.9, p3 = 0.9,
             survMat, cureMat = survMat,
             b0 = stats::binomial()$linkfun(0.7),
             survCoef = rep(1, ncol(survMat)),
             cureCoef = rep(1, ncol(cureMat)),
             ...)

Arguments

nSubject

A positive integer specifying number of subjects.

shape

A positive number specifying the shape parameter of the distribution of the event times.

scale

A positive number specifying the scale parameter of the distribution of the event times.

lambda_censor

A positive number specifying the rate parameter of the exponential distribution for generating censoring times.

max_censor

A positive number specifying the largest censoring time.

p1

A number between 0 and 1 specifying the probability of simulating events with observed event indicators given the simulated event times.

p2

A number between 0 and 1 specifying the probability of simulating susceptible censoring times with observed event status given the simulated susceptible censoring times.

p3

A number between 0 and 1 specifying the probability of simulating cured censoring times with observed event status given the simulated cured censoring times.

survMat

A numeric matrix representing the design matrix of the survival model part.

cureMat

A numeric matrix representing the design matrix excluding intercept of the cure rate model part.

b0

A number representing the intercept term for the cure rate model part.

survCoef

A numeric vector for the covariate coefficients of the survival model part.

cureCoef

A numeric vector for the covariate coefficients of the cure model part.

...

Other arguments not used currently.

Value

A data.frame with the following columns:

References

Wang, W., Chen, K., Luo, C., & Yan, J. (2019+). Cox Cure Model with Uncertain Event Status with application to a Suicide Risk Study. Working in Progress.

Examples

## see examples of function cox_cure

[Package intsurv version 0.2.1 Index]