[R] Anova for stratified Cox regression

Matthias Gondan matthias-gondan at gmx.de
Tue Jan 15 17:08:57 CET 2008


Dear List,

I have tried a stratified Cox Regression, it is working fine, except for
the "Anova"-Tests:

Here the commands (should work out of the box):

library(survival)
d = colon[colon$etype==2, ]
m = coxph(Surv(time, status) ~ strata(sex) + rx, data=d)
summary(m)
# Printout ok
anova(m, test='Chisq')

This is the output of the anova command:

> Analysis of Deviance Table
>  Cox model: response is Surv(time, status)
> Terms added sequentially (first to last)
>
>              Df Deviance Resid. Df Resid. Dev P(>|Chi|)
> NULL                           929     5233.5          
> strata(sex)   0                929                     
> rx            2                927     5221.2          
> Warning message:
> In is.na(coef(fit)) :
>   is.na() auf nicht-(Liste oder Vektor) des Typs 'NULL' angewendet

It should be possible to do Chi-Square-Tests in a stratified analysis, 
right?

Best wishes,

Matthias




More information about the R-help mailing list