cox.zph(fit, transform = "km", global = T)
The computations require the original x matrix of the Cox model fit. Thus it saves time if the x=T 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.
fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps, data = ovarian, x = T) temp <- cox.zph(fit) print(temp) # display the results plot(temp) # plot curves