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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.