
Last chance! 50% off unlimited learning
Sale ends in
coxph
).cox.zph(fit, transform="km", global=TRUE)
coxph
function."km"
, "rank"
, "identity"
or a
function of one argument. The default is "km"
f"cox.zph"
, with components:x
).
The computations require the original x
matrix of the Cox model fit.
Thus it saves time if the x=TRUE
option is used in coxph
.
This function would usually be followed by both a plot and a print of the
result.
The plot gives an estimate of the time-dependent coefficient beta(t)
.
If the proportional hazards assumption is true, beta(t)
will be a horizontal
line. The printout gives a test for slope=0
.
coxph
, Surv
.fit <- coxph( Surv(futime, fustat) ~ age + rx, ovarian)
temp<- cox.zph(fit)
print(temp) #display the results
plot(temp) #plot curves
Run the code above in your browser using DataLab