back

by apwheele·1y ago·view on hn ↗
I agree understanding KM is a very good place to start survival analysis. Many examples in my business I have for KM the censoring is due to certain events taking along time (auditing healthcare claims) to resolve.

When I first learned survival analysis, my professor had me construct life-tables, and then learned KM. You can often do quite a bit with discrete time tables, so if you have data:

    ID TimeRange Outcome
     A   4          1
     B   3          0
You can then explode the data into the form:

    ID Time Outcome
     A   1     0
     A   2     0
     A   3     0
     A   4     1
     B   1     0
     B   2     0
     B   3     0
If you groupby this table and get the numerator/denominator, that is what you need to calculate the life-table, and the discrete version of the KM plot.

Understanding that also allows you to use more typical binary regression or machine learning models, and then you just calculate the cumulative hazard from the predictions afterwards, https://andrewpwheeler.com/2020/09/26/discrete-time-survival....