Learn R Programming

RVAideMemoire (version 0.9-79)

cox.resid: Martingale residuals of a Cox model

Description

Plots martingale residuals of a Cox model against fitted values, to check for log-linearity of covariates.

Usage

cox.resid(model)

Arguments

model

a coxph model.

References

Fox, J. 2002 Cox Proportional-Hazards Regression for Survival Data.

See Also

coxph

Examples

Run this code
# NOT RUN {
# 'kidney' dataset of package 'survival'
require(survival)
data(kidney)
model <- coxph(Surv(time,status)~age+factor(sex),data=kidney)
cox.resid(model)
# }

Run the code above in your browser using DataLab