Re: [R] ANOVA for stratified cox regression

From: Thomas Lumley <>
Date: Fri, 11 Mar 2011 10:26:48 +1300

On Fri, Mar 11, 2011 at 8:25 AM, Brian McLoone <> wrote:
> This is a follow-up to a query that was posted regarding some problems that
> emerge when running anova analyses for cox models, posted by Mathias Gondan:
> Matthias Gondan wrote:
>>* 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 :*>>* auf nicht-(Liste oder Vektor) des Typs 'NULL' angewendet*>>*     *>**>* It should be possible to do Chi-Square-Tests in a stratified analysis, *>* right?*
> We have run into the same problem.  In particular, we are running stratified
> coxph models, but we are not able to generate a Chisq probability for both
> models.
>> drop1(Model,test='Chisq')
> Single term deletions
> Model:
> Surv(adjusted_days_60, Death_60_10) ~ strata(chol_60)
>                Df    AIC    LRT Pr(Chi)
> <none>             7437.6
> strata(chol_60)  0 8513.2 1075.6
> As you can see, why is the probability of the Chisq - i.e., Pr(Chi) -
> missing?

Because you can't do that. The strata() term corresponds to an infinite-dimensional parameter, a new baseline hazard, so it isn't like a straightforward likelihood ratio test. It certainly doesn't have a chisquared distribution with a fixed number of degrees of freedom -- I don't know if anyone has even worked out the sampling distribution of this deviance difference.


Thomas Lumley
Professor of Biostatistics
University of Auckland

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 10 Mar 2011 - 21:31:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Mar 2011 - 21:40:20 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive