0

When I use survdiff in R for survival analysis, I know how to interpret the term labeled (O-E)^2/E in the results, but I don't understand how the term labeled (O-E)^2/V is calculated.

Could someone give me some information about it?

Andrew
  • 117
  • 3

1 Answers1

1

As noted on this page the term (O-E)^2/V is the basis for the log-rank test.

To know if the difference between the observed and expected events (O-E) for one group is significantly different from 0 (that is, the two groups have significantly different hazard functions), you need an estimate of the variance of that difference in the case (null hypothesis) that the groups have the same hazard function.

At each time of an event, the variance in the expected number of events for a group is related to the expected number of events for the group at that time, the number of cases still at risk both overall and in the group at that time, and the number of total observed events at that time. The Wikipedia page shows details of the calculation of the variance for expected numbers of events for a group at a single event time, under that null hypothesis. Summing the variance values for the group over all event times gives the value of V.

EdM
  • 57,766
  • 7
  • 66
  • 187
  • So, as far as I understand, whatever group you choose (in case of 2 groups), you will get the same result for (O-E)/V ; that explains why R gives same values... – Andrew Sep 29 '19 at 19:51
  • @Andrew that's correct. Note that the log-rank test is for 2 groups, in which case it is equivalent to the score test in Cox proportional hazards regression if there are no ties in event times. You can think of that score test as a generalization of the log-rank test to multiple groups. – EdM Sep 29 '19 at 20:37