Hi, this is the Neutropic team!
Any follow-up dataset that asks "when does it happen?" contains people for whom something else happened first. A student who transfers before dropping out. A patient who dies of another cause before relapse. Can you simply treat them as censored? 🥲
Most survival courses stop at Kaplan–Meier and Cox models. So it is common to code the competing event as ordinary censoring and report 1 − Kaplan–Meier as "the probability of the event". That generally overstates it. Reading a cause-specific hazard ratio as if it were absolute risk is the other classic slip.
In this post we follow Tomás, a PhD student in education analysing time to dropout in a cohort of first-year undergraduates, who stalls when transfers turn up as a competing event. Tomás is fictional, but every screen below comes from a real chat in Neutropic.
They asked "how" and "what to watch out for" together
Tomás had settled only on the tool, Python. So the question was:
How should I analyse survival data when there are competing risks, and what should I watch out for? I'm going to do it in Python.
It names the problem (competing risks), the goal (a method and its pitfalls) and the tool (Python). Asking what to watch out for is the useful part. A method-only question tends to come back as a block of code; asking about pitfalls also gets you the places where interpretation goes wrong.

It read a guide, then checked papers and the package docs
Steps appeared right away. Finding a method guide looked for guidance on competing risks in Python, and Reading a method guide opened the scikit-survival guide and its competing-risks reference. Then it searched PubMed and Crossref for cumulative incidence and Fine–Gray papers, and the web for the scikit-survival documentation.
Method guides are analysis procedures Neutropic has reviewed in advance, so it reads a vetted procedure instead of answering from memory. Two page reads were skipped, and that shows up in the steps too.
It started with the question, not the method
The first sentence was about what you want to estimate: the absolute probability of a particular event, the cause-specific hazard, or a subdistribution-hazard association. These answer different questions. Then it set out a workflow:
- Code each observation as time to first event or censoring, with 0 = censored and a distinct positive code for each cause. Check cause counts, follow-up and time values.
- Estimate and plot cumulative incidence functions (CIFs) for cause-specific absolute risks, with an 8-line scikit-survival example using
cumulative_incidence_competing_risks. - For covariate associations, use a cause-specific Cox model for the instantaneous rate of one cause among people still event-free, or Fine–Gray regression if subdistribution-hazard associations with the CIF are the target, and interpret their coefficients differently.
In Tomás's terms: "the probability of dropping out within four years" calls for a CIF; "how a scholarship relates to the dropout rate" calls for a cause-specific Cox model.

The answer also notes that the scikit-survival guide supports nonparametric CIF estimation but not Fine–Gray regression. The code is a template with no data behind it; Tomás only needs to plug in a real df.
Tomás nearly kept 1 − Kaplan–Meier
This is where Tomás nearly made a mistake. An earlier draft shown to the supervisor already reported "four-year dropout from 1 − KM". The pitfalls in the answer hit exactly that:
- Don't estimate a cause-specific probability as
1 − Kaplan–Meierafter treating competing events as censored; that generally overestimates the risk. - Don't use an ordinary log-rank test to compare CIFs; use a competing-risk-appropriate test, such as Gray's test.
- For prediction, evaluate cause-specific probabilities at prespecified horizons; a standard all-event C-index is not cause-specific validation.
- Report event counts and uncertainty, especially late in follow-up where sparse causes make estimates unstable.
It was also upfront about its limits: the documentation page and a journal page could not be opened during the lookup, so its source check was limited to search results and the study record. That tells Tomás exactly what to double-check before relying on a package.
The sources came with it
The small numbers are citations. Open the References card and 7 sources appear in a table, including a paper comparing cause-specific hazard and cumulative incidence approaches for sample size, an applied stroke study using both, the scikit-survival competing-risks guide and Gelber and colleagues' 1991 paper arguing for cumulative incidence functions.

It suggested what to do next
Under the answer were follow-up suggestions. One, for example, offered to turn the cited sources into a concise, annotated methods bibliography on competing-risk analysis in Python, noting which methods each source supports. Click a suggestion and the conversation continues in the same chat.
"Can I just censor them?" became "what am I estimating?"
| At the start | Now | |
|---|---|---|
| Question | Can transfers be treated as censored? | Probability (CIF) or rate (cause-specific Cox)? |
| Methods | Only Kaplan–Meier and Cox | CIF, cause-specific Cox and Fine–Gray, each for its question |
| Code | None | A scikit-survival CIF template |
| Pitfalls | 1 − KM reported as the dropout rate | Overestimation, log-rank misuse, event counts |
| Sources | None | 7 cited sources and next-step suggestions |
The code has not been run on any data yet. Event coding, censoring rules and per-cause event counts are still Tomás's job, and if Fine–Gray is needed, check first whether the Python package you pick supports it. Once the estimand is clear, though, the rest follows from that one question.
This walkthrough used Pro. Lite (the free plan) explains the estimands briefly without code; Expert also runs an example, discusses model diagnostics and when a multistate model fits better.
If another event can happen first, ask what you are estimating before you ask which model to fit.
This week, name your problem and your tool and ask, just like Tomás. Start with Neutropic for free