View source: R/genClaytonReg.R
tvc.example | R Documentation |
Given a set of (non-time-varying) covariates, creates a simple example of a matrix of time-varying covariates that can be used as input data for the mHR2.tvc function.
tvc.example(Y1, Y2, Delta1, Delta2, X)
Y1, Y2 |
Vectors of event times (continuous). |
Delta1, Delta2 |
Vectors of censoring indicators (1=event, 0=censored). |
X |
Matrix of covariates (continuous or binary). |
A list containing the following elements:
A vector of ids
Time-varying covariate matrix
For each (non-time-varying) covariate in X, two time-varying covariates are created. The first time-varying covariate is equal to Xlog(T1), and the second is equal to Xlog(T2). (If T=0, then the time-varying covariate is set to be 0.) A vector of ID numbers and a matrix of time-varying covariates are created in a format that can be passed to the mHR2.tvc function.
mHR2
, genClaytonReg
x <- genClaytonReg(250, 2, 0.5, 1, 1, 0, log(2), 0, 5, 5)
x.tv <- tvc.example(x$Y1, x$Y2, x$Delta1, x$Delta2, x$X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.