[R] coxph() - unexpected result using Crawley's seedlings data (The R Book)

Jacob Brogren jacob at brogren.nu
Tue Jun 28 12:51:57 CEST 2011


Hi,

I ran the example on pp. 799-800 from Machael Crawley's "The R Book" using package survival v. 2.36-5, R 2.13.0 and RStudio 0.94.83. The model is a Cox's Proportional Hazards model. The result was quite different compared to the R Book. I have compared my code to the code in the book but can not find any differences in the function call. My results are attached as well as a link to the results presented in the book (link to Google Books).

When running the examples on pp. 797-799 I can't detect any differences in results so I don't think there are errors in the data set or in the creation of the status variable.

---------------------------------
Original from the R Book:
http://books.google.com/books?id=8D4HVx0apZQC&lpg=PA799&ots=rQgd_8ofeS&dq=r%20coxph%20crawley&pg=PA799#v=onepage&q&f=false

---------------------------------
My result:
> summary(model1)
Call:
coxph(formula = Surv(death, status) ~ strata(cohort) * gapsize, 
    data = seedlings)

  n= 60, number of events= 60 

                                            coef exp(coef)  se(coef)      z Pr(>|z|)
gapsize                                -0.001893  0.998109  0.593372 -0.003    0.997
gapsize:strata(cohort)cohort=September  0.717407  2.049112  0.860807  0.833    0.405

                                       exp(coef) exp(-coef) lower .95 upper .95
gapsize                                   0.9981      1.002    0.3120     3.193
gapsize:strata(cohort)cohort=September    2.0491      0.488    0.3792    11.074

Rsquare= 0.022   (max possible= 0.993 )
Likelihood ratio test= 1.35  on 2 df,   p=0.5097
Wald test            = 1.32  on 2 df,   p=0.5178
Score (logrank) test = 1.33  on 2 df,   p=0.514

Anyone have an idea why this is occurring?

Kind Regards

Jacob


More information about the R-help mailing list