Learn R Programming

autoReg (version 0.3.3)

OEplot: Draw an Observed vs Expected plot

Description

Draw an Observed vs Expected plot

Usage

OEplot(fit, xnames = NULL, no = 3, maxy.lev = 5, median = TRUE)

Value

No return value, called for side effects

Arguments

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

Examples

Run this code
library(survival)
data(cancer,package="survival")
fit=coxph(Surv(time,status)~rx+age+sex,data=colon)
OEplot(fit)
OEplot(fit,xnames="sex")
if (FALSE) {
fit=coxph(Surv(time,status)~age,data=colon)
OEplot(fit)
fit=coxph(Surv(time,status)~logWBC,data=anderson)
OEplot(fit)
}

Run the code above in your browser using DataLab