# Log-rank test interpretation

So basically im using data from the survival package which is:

require(survival)
library(KMsurv)
data("pneumon")
attach(pneumon)


And I need to use specific variables as required. This is done in the next step:

chldage1<-ifelse(chldage<12,1, ifelse(chldage>=12,0,3))
pneumon$nsibs[pneumon$nsibs>3]<-3
nsibs[is.na(nsibs)]<-0
wmonth[wmonth>=4 & wmonth<=6]<-4
wmonth[wmonth>=7]<-5


Now I'm required to perform a log-rank test to o determine whether there is a statistically significant difference in the hazard rates of pneumonia given different numbers of siblings. If there is, perform multiple comparisons to decide which groups differ at the overall 5% significance level. Use Bonferroni correction.

So here I use the coding for the log-rank test:

> survdiff(Surv(wmonth,chldage1)~nsibs,data=pneumon)
Call:
survdiff(formula = Surv(wmonth, chldage1) ~ nsibs, data = pneumon)

N Observed Expected (O-E)^2/E (O-E)^2/V
nsibs=0 1801      510    600.9     13.74     34.42
nsibs=1 1156      410    369.1      4.54      7.88
nsibs=2  383      153    117.2     10.92     14.25
nsibs=3  130       51     36.9      5.41      6.58

Chisq= 40.5  on 3 degrees of freedom, p= 8.51e-09


Finally my question is, how do I interpret these results in order to determine if there is a statistical significance according to my chi-square and p-value?

• When you say you are required to do you mean this is a self-study question? If so add the tag, read its wiki, and tell us how far you have got in your thinking. – mdewey May 15 '17 at 20:26
• @mdewey yes this is an exercise, and I reached up to this point as I posted above, but I'm not sure how to interpret the results. If I'm correct, as I can see that our p-value is really small therefore it is statistically significant so i need to perform multiple comparisons? – Andy Papadopoulos May 16 '17 at 18:41