cox.tvc {rstpm2} | R Documentation |
Test for a time-varying effect in the coxph
model
Description
Test for a time-varying effect in the coxph
model by re-fitting
the partial likelihood including a time-varying effect, plot
the effect size, and return the re-fitted model. The
main advantage of this function over the tt()
special is
that it scales well for moderate sized datasets
(cf. tt
which expands the dataset and scales very poorly).
Usage
cox.tvc(obj, var=NULL, method="logt")
Arguments
obj |
A |
var |
String for the effect name. Currently assumes simple continuous effects. |
method |
A string representing the possible time transformations. Currently only "logt". |
Value
Returns a tvcCoxph
object (which inherits from the mle2
class) of the re-fitted model.
See Also
Examples
## As per the example for cox.zph:
fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps,
data=ovarian)
temp <- rstpm2:::cox.tvc(fit, "age")
print(temp) # display the results
plot(temp) # plot curves
[Package rstpm2 version 1.6.3 Index]