[R] ANOVA for stratified cox regression

Thomas Lumley tlumley at uw.edu
Thu Mar 10 22:26:48 CET 2011


On Fri, Mar 11, 2011 at 8:25 AM, Brian McLoone <brianbmcloone at gmail.com> 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 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?*
>
>
> 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


-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland



More information about the R-help mailing list