rankhazard-package {rankhazard} | R Documentation |
Rank-hazard plots visualize the relative importance of covariates in a proportional hazards model. The key idea is to rank the covariate values and plot the relative hazard as a function of ranks scaled to interval [0,1]. The relative hazard is plotted with respect to the reference hazard, which can be e.g. the hazard related to the median of the covariate.
Package: | rankhazard |
Type: | Package |
Version: | 0.8 |
Date: | 2009-06-29 |
License: | GPL 2 |
LazyLoad: | yes |
The function rankhazardplot receives a coxph (package survival) object or a cph (package Design) object as an argument and creates a rank-hazard plot of the covariates. The reference values for the relative hazards and legend texts can be provided as optional arguments. Plotting parameters such as, lwd, lty, col and pch are passed to the plotting commands.
Juha Karvanen <juha.karvanen@iki.fi>
J. Karvanen, F. E. Harrell Jr., Visualizing covariates in proportional hazards model. Statistics in Medicine, 28:1957–1966, 2009.
library(survival) model <- coxph(Surv(time,status) ~ age + sex + ph.karno, data=cancer, x=TRUE) rankhazardplot(model)