Learn R Programming

RVAideMemoire (version 0.9-83-7)

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.

Author

Maxime HERVE <maxime.herve@univ-rennes1.fr>, based on an idea of John Fox.

References

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

See Also

Examples

Run this code
# '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