Stratified log-rank statistic (source code)

= Stratified log-rank statistic
{title2=$U=\sum_s\sum_j(O_{sj}-E_{sj})$}

Compute observed-minus-expected event contributions within each stratum's <risk set>, then add them across independent strata. Under the null, the corresponding conditional <variances> add. Standardizing gives an approximate <normal distribution> test, or its square gives a one-degree-of-freedom <chi-squared distribution> test. The comparison requires the usual exchangeability and <independent censoring> assumptions within strata.