[R] anova(cph(..) output

Frank E Harrell Jr f.harrell at vanderbilt.edu
Sat May 16 15:22:03 CEST 2009


pompon wrote:
> Hello,
> 
> I am a beginner in R and statistics, so my question may be trivial. Sorry in
> advance.
> I performed a Cox proportion hazard regression with 2 categorical variables
> with cph{design}. Then an anova on the results.
> the output is 
> 
>> anova(cph(surv(survival, censor) ~ plant + leaf.age + plant*leaf.age,
>> Mpnymph)
> 
>                 Wald Statistics          Response: Surv(survival, censored) 
> 
>  Factor                                                    Chi-Square d.f. P     
>  plant  (Factor+Higher Order Factors)             96.96     12   <.0001
>   All Interactions                                               10.58     
> 6   0.1022
>  leaf.age  (Factor+Higher Order Factors)          29.11      7   0.0001
>   All Interactions                                                 10.58     
> 6   0.1022
>  plant * leaf.age  (Factor+Higher Order Factors)  10.58      6   0.1022
>  TOTAL                                           106.63     13   <.0001
> 
> What do "All interaction" stand for?
> The real df of for plant is 6 and 1 for leaf.age. Then, which chi square is
> one for my main factors anf their interaction.
> 
> thank you,
> Julien.

Julien,

I know what you mean when you say 'real df' but that's not the whole 
story as plant has 6 more df by interacting with a single df variable. 
There is no such thing as 'the' main effect test for plant.  The 12 df 
test is unique and tests whether plant is associated with Y for any 
level of leaf.age.

You can see exactly what is being tested by using various print options 
for anova.Design, as described in the help file.  The "dots" option is 
easy on the eyes.

Frank
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list