gg_zph: ggplot cox.zph

Description Usage Arguments Examples

View source: R/gg_zph.R

Description

A ggplot2 implementation of plotting scaled Schoenfeld residuals from a cox.zph objects

Usage

1
gg_zph(x, val = NA, log = FALSE, alpha = 0.2)

Arguments

x

a cox.zph object

val

index of variables to plot

log

logical, if TRUE log transform time

alpha

geom_point alpha value

Examples

1
2
3
4
5
library(survival)
fit <- coxph(Surv(time, status) ~ age + sex + disease, data = kidney)
fit_zph <- cox.zph(fit, transform = "identity")
gg_zph(fit_zph)
gg_zph(fit_zph, log = TRUE)

junkka/ehahelper documentation built on March 17, 2021, 2:12 a.m.