O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing for the gender difference between survival curves

On examination of the survival curve, it is apparent that females are surviving longer than males at every time period. However, we are judging this purely based upon visual inspection. Often, the results are not as obvious. Even if they were obvious, it is good statistical practice to construct a statistical hypothesis test for this. We will use the log-rank test, which is implemented in R using the survdiff() function.

The output from the function prints the chi-square statistics associated with the test, which will demonstrate any significant difference between the two curves, along with the associated p-value.

For gender, there is a significant difference at the .01 level, as shown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required