Description Usage Arguments Details Value See Also Examples
tvc
creates a time interaction variable that can
be used in a coxph model (or any other model with time
interactions)
1 |
data |
a data frame |
b |
the non-time interacted variable's name |
tvar |
the time variable's name |
tfun |
function of time that btvc was multiplied by.
Default is |
pow |
if |
Interacts a variable with a specified function of time.
Possible functions of time include 'linear'
,
natural 'log'
, and exponentiated ('power'
).
a vector
ggtvc
, coxsimtvc
,
survival
, and coxph
1 2 3 4 5 | # Load Golub & Steunenberg (2007) Data
data("GolubEUPData")
# Create natural log time interaction with the qmv variable
GolubEUPData$Lqmv <- tvc(GolubEUPData, b = "qmv", tvar = "end", tfun = "log")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.