SIM.FUN.TVC: Generate simulation data to test time-dependent Cox model...

Description Usage Arguments Value Author(s) References Examples

View source: R/simulation.R

Description

SIM.FUN.TVC generates time-dependent survival response with four time-intervals 0-1, 1-2, 2-3, 3-4 for each subject data. All subjects are administratively censored at 4, if T>4. T comes from a Weibull distribution with shape of 2. The design matrix comes from a correlated multivariate normal. The default signals (beta0) are sparse.

Usage

1
2
SIM.FUN.TVC(p.ti = 50, p.tv = 50, n.subject = 1e+06, cor = 0.2,
  beta0.ti = NULL, beta0.tv = NULL)

Arguments

p.ti

number of time-invariant covariates

p.tv

number of time-varying covariates

n.subject

number of subjects

cor

correlation between time-varying and each interval's time-varying covairates

beta.ti

coefficient for time-invariant covariates

beta.tv

coefficients for time-varying covariates

Value

a matrix with the first column starting time, second column ending time, third column event (0,1), and rest = design matrix + ID for subject.

Author(s)

Yan Wang, Tianxi Cai

References

Section 3.3 in Austin, P.C., 2012. Generating survival times to simulate Cox proportional hazards models with time‐varying covariates. Statistics in medicine, 31(29), pp.3946-3958.

Examples

1
SIM.FUN.tvc()

michaelyanwang/divideconquer documentation built on Aug. 16, 2019, 10:11 a.m.