Comparison of the estimated baseline cumulative hazards functions for two survival models.
compHaz( fit1, fit2, main = NULL, lty = 1:2, col = c("red", "blue"), printLegend = TRUE )
An object of type "coxreg", "phreg", or other output from from survival fitters.
An object of type "coxreg", "phreg", or other output from survival fitters.
Header for the plot. Default is NULL.
NULL
line types.
Line colors. should be NULL (black lines) or of length 2.
Should a legend be printed? Default is TRUE.
TRUE
No return value.
hazards, coxreg, and phreg.
hazards
coxreg
phreg
# NOT RUN { fit.cr <- coxreg(Surv(enter, exit, event) ~ sex, data = oldmort) fit.w <- phreg(Surv(enter, exit, event) ~ sex, data = oldmort) compHaz(fit.cr, fit.w) # }
Run the code above in your browser using DataLab