cox.tvc | R Documentation |
coxph
modelTest 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).
cox.tvc(obj, var=NULL, method="logt")
obj |
A |
var |
String for the effect name. Currently assumes simple continuous effects. |
method |
A string representing the possible time transformations. Currently only "logt". |
Returns a tvcCoxph
object (which inherits from the mle2
class) of the re-fitted model.
coxph
, cox.zph
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.