plotSchoenfeld: Do Schoenfeld residual plot

View source: R/plotSchoenfeld.R

plotSchoenfeldR Documentation

Do Schoenfeld residual plot

Description

Do Schoenfeld residual plot

Usage

plotSchoenfeld(input.d, input.formula, vars.to.plot = NULL, main = NULL)

Arguments

input.d

input data.frame

input.formula

survival formula to Surv

vars.to.plot

variable(s) to plot

main

title for each variable (i.e. main can be an array)

Author(s)

Samuel Leung

Examples

# Base output
test1 <- list(time = c(4, 3, 1, 1, 2, 2, 3),
status = c(1, 1, 1, 0, 1, 1, 0),
x = c(0, 2, 1, 1, 1, 0, 0),
sex = c(0, 0, 0, 0, 1, 1, 1))

# Pretty output
plotSchoenfeld(test1, Surv(time, status) ~ x + strata(sex), "x")

TalhoukLab/biostatUtil documentation built on April 14, 2025, 4:15 a.m.