Examples for 'survival::plot.cox.zph'


Graphical Test of Proportional Hazards

Aliases: plot.cox.zph

Keywords: survival

### ** Examples

vfit <- coxph(Surv(time,status) ~ trt + factor(celltype) +
              karno + age, data=veteran, x=TRUE)
temp <- cox.zph(vfit)
plot(temp, var=3)      # Look at Karnofsy score, old way of doing plot 
plot(temp[3])     # New way with subscripting 
abline(0, 0, lty=3)
# Add the linear fit as well  
abline(lm(temp$y[,3] ~ temp$x)$coefficients, lty=4, col=3)
title(main="VA Lung Study")
plot of chunk example-survival-plot.cox.zph-1

[Package survival version 3.5-3 Index]