<sub>2025-03-25</sub> <sub>#r-programming #statistical-analysis #survival-analysis </sub>
<sub>[[maps-of-content]] </sub>
# Survival analysis tracks not just IF something happens, but WHEN it happens
Imagine you're watching a race. Logistic regression would only care who finished and who didn't. Survival analysis cares about exactly when each person crossed the finish line.
And contrary to its name, survival analysis isn't just about death or survival. It's about any event that takes time to happen.
## What survival analysis actually is
Survival analysis is a collection of statistical methods that help us understand how long it takes until something happens. That "something" could be:
- Death (hence the name "survival" analysis)
- Cancer coming back after treatment
- A patient returning to the hospital
- An artificial hip joint wearing out
- Someone clicking on an advertisement
- A customer canceling their subscription
The key is that we're interested in both WHETHER the event happens AND HOW LONG it takes.
## How it differs from other approaches
Think of it like this:
**Regular statistics (logistic regression):** "Did the patient recover? Yes or no."
**Survival analysis:** "How many days/months/years did it take for the patient to recover?"
This matters because treating everyone the same regardless of timing misses important insights. Someone who lives 10 years after treatment is very different from someone who lives 10 days!
## What makes survival analysis special
Here's where survival analysis really shines - it can handle incomplete information.
Imagine you're studying a new treatment and following patients for 5 years. Some things will happen:
- Some patients will experience the event you're tracking
- Some won't experience it by the end of your 5-year study
- Some will drop out of the study (move away, stop participating)
With regular statistics, those last two groups cause major problems. But survival analysis can use their partial information through what's called "censoring."
**Everyday example:** It's like tracking how long lightbulbs last. If some bulbs are still working when your study ends, or some get removed before burning out, survival analysis can still use that partial information.
## When would you use survival analysis?
You'd use survival analysis whenever:
1. You care about timing, not just occurrence
2. Events happen at different times for different people
3. You have incomplete information about some cases
## Key Insights to Remember
1. Survival analysis isn't just about survival - it's about time-to-event analysis
2. It cares about WHEN things happen, not just IF they happen
3. It can handle incomplete information better than other methods
4. It's widely used in healthcare, engineering, business, and many other fields
**The most important thing to remember:** When both timing and occurrence matter in your analysis, survival analysis is often the right tool for the job. For more detailed calculations and probability tables used in survival analysis, see [[life-tables]].
--
Reference: Statistical Analysis with R for Public Health, Imperial College London