powered by
Plots martingale residuals of a Cox model against fitted values, to check for log-linearity of covariates.
cox.resid(model)
a coxph model.
coxph
Fox, J. 2002 Cox Proportional-Hazards Regression for Survival Data.
# 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