simData4cure: Simulate Data from Cox Cure Model with Uncertain Event Status

Description Usage Arguments Value References Examples

View source: R/simData4cure.R

Description

Simulate Data from Cox Cure Model with Uncertain Event Status

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
simData4cure(
  nSubject = 1000,
  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., Luo, C., Aseltine, R. H., Wang, F., Yan, J., & Chen, K. (2020). Suicide Risk Modeling with Uncertain Diagnostic Records. arXiv preprint arXiv:2009.02597.

Examples

1
## see examples of function cox_cure

intsurv documentation built on Jan. 13, 2021, 3:46 p.m.