HealthEconomics.wiki — Knowledge infrastructure for health economicsDraft v0.1.0 · awaiting review

Interactive demonstrator · Economic modelling › Survival modelling

Survival Analysis Demonstrator

Survival analysis examines the time from a defined origin to an event such as death, disease progression, hospitalisation, recovery or treatment discontinuation. Work through censoring, Kaplan-Meier estimation, hazards and extrapolation, and see how each choice changes the evidence that reaches an economic model.

Define the estimand before you estimate anything

Every survival analysis begins by fixing when follow-up starts, which event ends the event-free period and which time scale is used. Changing any of these changes the risk set and the interpretation, so they should be specified before modelling.

Time originWhen each person's risk period begins, e.g. randomisation date.
EventThe outcome counted as failure, e.g. all-cause death.
Time scaleHow risk evolves, e.g. months since treatment.
Censoring ruleHow incomplete event times are defined, e.g. last known follow-up.

Time-to-event data should keep each person's follow-up time and event indicator, rather than collapsing outcomes to whether an event occurred by one arbitrary date.

Source concept: Survival Analysis — HealthEconomics.wiki (content version 1.0.0, term code HE-EM-SM-083). All numbers in this demonstrator are illustrative teaching values, not empirical estimates.

Kaplan-Meier lab: censoring and the risk setEdit a small cohort and watch the estimate update at each event time.

For each person we observe Yi = min(Ti, Ci) and an event indicator δi = I(Ti ≤ Ci). A censored person's event time is known only to exceed their follow-up. They stay in the risk set until censoring but never enter the event count.

1. Choose or build a cohort

PersonFollow-up timeStatusRemove

Times must be positive. Where an event and a censoring share a time, the censored person is treated as still at risk at that event time.

2. How are censored people handled?

Estimated survival, Ŝ(t)

RMST(τ) is the area under Ŝ(t) up to τ. τ is limited to the observed follow-up here.
—Ŝ at last follow-up time
—Median survival time
—RMST(τ), in time units
—Events / censored in this analysis

3. Step through the product-limit calculation

Ŝ(t) = ∏tj ≤ t (1 − dj / nj) · Var[Ŝ(t)] ≈ Ŝ(t)2 Σtj ≤ t dj / [nj(nj − dj)]

Kaplan-Meier steps
Event time tjAt risk njEvents djCensored at tj1 − dj/njŜ(tj)Greenwood SESymmetric 95% interval

The symmetric interval (Ŝ ± 1.96 SE) is shown deliberately: it can stray outside 0–1, which is why transformed intervals such as log-log are commonly used. Whichever method is used should be stated. As the risk set shrinks, later estimates become less precise.

Hazards, survival and the hazard ratioA constant hazard ratio does not mean a constant gain in survival probability.

The hazard is the instantaneous event rate among people still event free just before time t. It is a rate, not a probability, and can exceed one. Survival and cumulative hazard are linked by S(t) = exp[−H(t)]. Below, a Weibull baseline uses the concept page's parameterisation, and a treatment arm applies a proportional-hazards ratio: h1(t) = HR × h0(t), so S1(t) = S0(t)HR.

S(t) = exp(−λtp) · h(t) = λp tp−1 · RMST(τ) = ∫0τ S(t) dt

Set the baseline and treatment effect

Higher λ means events occur sooner.
p = 1 is exponential (constant hazard); p > 1 rising; p < 1 falling.
Assumed constant over time (proportional hazards).
Pre-specify τ; do not choose it because it gives a favourable result.

Survival, S(t)

Hazard, h(t) — events per person per year

Values at the selected time
QuantityControlTreatmentComparison

Extrapolation beyond follow-upTwo models agree within the observed period, then diverge where the economic model needs them most.

Trials often end before the economic model horizon. Statistical fit is necessary but not sufficient: several models can match the observed period and differ substantially later. Here an exponential and a Weibull model are both anchored to the same illustrative survival at the end of follow-up; the Weibull also passes through the mid-point value. Expected life-years are the area under the curve, LY(T) = ∫0T S(t) dt.

Observed period (illustrative)

Economic model settings

Illustrative; uses d(t) = (1 + r)−t. Use the rate set by the relevant decision-making guidance.
Held constant for teaching only. Real analyses use life tables matched for age, sex, calendar period and jurisdiction, and population hazard rises with attained age.

Survival within and beyond follow-up

Implied hazard, events per person per year

Life-years by model
ModelParametersLY within follow-upLY beyond follow-upTotal LYShare beyond follow-upDiscounted LYS at horizon

Spot the errorSix short scenarios based on common analysis and interpretation errors.

A practical validation sequenceAn auditable minimum, from person-level records to economic-model outputs. Tick steps as you review an analysis.

    The core idea

    Survival analysis is most useful when event timing, incomplete follow-up and long-term uncertainty remain explicit. Reliable economic conclusions need statistically credible survival estimates and transparent assumptions about what happens after the observed data end.

    Method, safeguards and limitations

    This demonstrator is educational. Every cohort, parameter and hazard is an illustrative teaching value, not empirical evidence about any treatment or population, and nothing here is medical advice.