Description Usage Arguments Value Author(s) References Examples
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.
1 2 | SIM.FUN.TVC(p.ti = 50, p.tv = 50, n.subject = 1e+06, cor = 0.2,
beta0.ti = NULL, beta0.tv = NULL)
|
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 |
a matrix with the first column starting time, second column ending time, third column event (0,1), and rest = design matrix + ID for subject.
Yan Wang, Tianxi Cai, Chuan Hong
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.
1 | SIM.FUN.tvc()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.