View source: R/plotSchoenfeld.R
plotSchoenfeld | R Documentation |
Do Schoenfeld residual plot
plotSchoenfeld(input.d, input.formula, vars.to.plot = NULL, main = NULL)
input.d |
input |
input.formula |
survival formula to |
vars.to.plot |
variable(s) to plot |
main |
title for each variable (i.e. main can be an array) |
Samuel Leung
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.