coxph).
cox.zph(fit, transform="km", global=T)
coxph function.
"km",
"rank",
"identity" or a
function of one argument.
TRUE, then the result is
a list containing the test table (a matrix), x and y. If
FALSE, then only the test table is returned.
"cox.zph", with components:
NA
is
entered into the matrix as a placeholder.
x for the identity transform.
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.
Grambsch, P. and Therneau, T. (1994), Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81, 515-26.
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