-
Hi! I am using the Aalen-Johansen estimator to model survival functions in presence of competing events. I would like to compare some curves using a statistical test. If I were using the Kaplan-Meier estimator (no competing events), I would use the log-rank test. My question is: is it correct to use that same test (log-rank) with the Aalen-Johansen estimator, with competing events? In addition: if this approach is not correct, does lifelines have an alternative? Thank you very much! Borja |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi Borja, The statistic in the log-rank comparison follows a Chi-squared distribution. So that is why the documentation talks about the Chi-square. To compute the log-rank statistic, you need the number of events and the N at each time. However, I don't know if the log-rank still works as intended if you only consider the events of interest (and not the competing risks). I am unfamiliar with what Gray proposed as a modification (and you provide a link to the paper?). In my coursework on Aalen-Johansen, we did not talk about a comparison for those curves. AFAIK lifelines doesn't currently have an option for inference between two curves in the Aalen-Johansen. But another way you could compare the curves is the calculate something like the difference between the two risks at each time. The variance can be estimated by adding the two variances together (via a delta-method argument). You can then plot the 1-\alpha confidence intervals. However, this approach does not test whether there is an overall difference (but I prefer it regardless because it provides more information). |
Beta Was this translation helpful? Give feedback.
-
Hello pzivich, Thank you very much for your answer. This is the webpage where I learned about competing events framework, and about the modified test https://www.publichealth.columbia.edu/research/population-health-methods/competing-risk-analysis. I find the whole text pretty instructive and well explained. You can find the original paper here https://www.jstor.org/stable/pdf/2241622.pdf. Digesting the paper is not that simple, or at least requires more time. The webpage also gives some indications about a proportional hazards model for the competing event framework, very similar to Cox's. They call it Cumulative Incidence Function (CIF) proportional hazards model. Regarding my particular problem, I may conduct a sensitivity analysis and see how much the KM and AJ estimators differ, and if the deviation is small, I may as well continue with my analysis assuming no competing risks. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello @pzivich ! I discovered this issue while looking for a Gray test in lifelines. |
Beta Was this translation helpful? Give feedback.
Hi Borja,
The statistic in the log-rank comparison follows a Chi-squared distribution. So that is why the documentation talks about the Chi-square.
To compute the log-rank statistic, you need the number of events and the N at each time. However, I don't know if the log-rank still works as intended if you only consider the events of interest (and not the competing risks). I am unfamiliar with what Gray proposed as a modification (and you provide a link to the paper?). In my coursework on Aalen-Johansen, we did not talk about a comparison for those curves.
AFAIK lifelines doesn't currently have an option for inference between two curves in the Aalen-Johansen. But another way you could compa…