OEplot | R Documentation |
Draw an Observed vs Expected plot
OEplot(fit, xnames = NULL, no = 3, maxy.lev = 5, median = TRUE)
fit |
An object of class "coxph" |
xnames |
Character Names of explanatory variable to plot |
no |
integer Number of groups to be made |
maxy.lev |
Integer Maximum unique length of a numeric variable to be treated as categorical variables |
median |
logical |
No return value, called for side effects
library(survival)
data(cancer,package="survival")
fit=coxph(Surv(time,status)~rx+age+sex,data=colon)
OEplot(fit)
OEplot(fit,xnames="sex")
## Not run:
fit=coxph(Surv(time,status)~age,data=colon)
OEplot(fit)
fit=coxph(Surv(time,status)~logWBC,data=anderson)
OEplot(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.