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?
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
.