gg_cox_zph: Graphical Test of Proportional Hazards

Description Usage Arguments Value Examples

Description

Displays a graph of the scaled Schoenfeld residuals, along with a smooth curve.

Usage

1
2
3
gg_cox_zph(x, resid_col = "black", resid_shp = 1, pred_col = "black",
  pred_minmax_col = pred_col, pred_minmax_linetype = "dashed",
  ribbon_col = pred_col, ribbon_alpha = 0.25)

Arguments

x

result of the fortify.cox.zph function.

resid_col

color for the residuals points

resid_shp

point shape for the residuals points

pred_col

color for the prediction fit line

pred_minmax_col

color for the confidence interval lines

pred_minmax_linetype

line type for the confidence interval lines

ribbon_col

color for the shaded confidence interval region

ribbon_alpha

alpha value for the confidence interval region

Value

grid object

Examples

1
2
3
4
5
6
library(survival)
library(ggplot2)
vfit <- coxph(Surv(time,status) ~ trt + factor(celltype) +
              karno + age, data=veteran, x=TRUE)

gg_cox_zph(fortify(cox.zph(vfit)))

hrbrmstr/gghazard documentation built on May 17, 2019, 5:08 p.m.