Research & Evidence

Search for a method

Search titles, questions, territories and MSC identifiers.

    ← All methods
    METHOD DOSSIERMSC-P-030Customer scienceVerified scientific dossier

    How do you analyze retention with a survival model?

    Survival analysis represents time to churn while handling censoring. Kaplan-Meier describes survival; the Cox model links covariates to hazard under proportional hazards.

    Scientific editorial team: Marketing Science Center

    Direct answer

    Compare retention curves and estimate associations with instantaneous risk.

    Survival analysis represents time to churn while handling censoring. Kaplan-Meier describes survival; the Cox model links covariates to hazard under proportional hazards.

    Kaplan & Meier, 1958Cox, 1972

    01

    The answer in 30 seconds

    Use Kaplan-Meier to estimate the probability of remaining active under censoring. Use Cox to compare conditional hazards under proportional hazards. A hazard ratio remains relative, associative here, and does not give an individual probability.

    Kaplan-Meier · S(t)

    Probability of remaining active at a given horizon despite censoring.

    Log-rank

    Global comparison of curves, without covariate adjustment.

    Cox · HR

    Relative conditional instantaneous hazard; neither an individual probability nor a causal effect here.

    02

    Marketing situation

    A team observes customers from different dates. Some churn, while others are still active when observation ends. Comparing only churn percentages removes time and wrongly treats censored records as complete.

    1. 01

      Origin

      Subscription starts and baseline engagement is observed.

    2. 02

      Event

      Churn is observed; churn_event equals 1.

    3. 03

      Censoring

      The customer is still active at the end; churn_event equals 0 and observed time remains informative.

    03

    Scientific question

    In the declared population and window, what is S(t), the probability of remaining active beyond t months, and what conditional association links plan group to the instantaneous hazard?

    04

    Why the crude rate fails

    12-month retention computed only on complete records favours older cohorts. Mean observed duration understates customers still active. Survival analysis explicitly retains the partial information supplied by their observed time.

    Error to avoid

    Treating an active customer as if churn had already occurred, or excluding that customer from the calculation.

    05

    Intuition

    Kaplan-Meier

    Ŝ(t)=∏(1-dᵢ/nᵢ)

    Estimates survival at each horizon while retaining partial information from censored records.

    Log-rank

    H₀: Sₘ(t)=Sₐ(t)

    Compares the two curves globally without adjusting for baseline engagement.

    Cox

    h(t|x)=h₀(t)exp(xβ)

    Estimates a conditional relative hazard when proportionality is sufficiently plausible.

    Kaplan & Meier (1958), Nonparametric Estimation from Incomplete Observations · Cox (1972), Regression Models and Life-Tables

    06

    Required data

    Analysis population: the 600 synthetic customers whose subscription starts in the 90-day recruitment window, with positive duration and observed plan group, churn status and baseline engagement. One row per customer is included. Any missing or invalid required input stops the analysis and reports the affected row count; no imputation or implicit category is allowed. duration_months is the analytical duration; dates are calendar markers rounded to the day.

    FieldDefinition
    customer_idUnique identifier
    start_date / end_dateObserved origin and end
    duration_monthsPositive time from origin
    churn_event1 observed churn, 0 censored
    plan_groupMonthly or annual group
    baseline_engagement_zBaseline engagement on an N(0,1) scale

    07

    Models and symbols

    Survival

    S(t)=Pr(T>t)Ŝ(t)=∏₍ₜᵢ≤ₜ₎(1-dᵢ/nᵢ)

    Conditional hazard

    h(t|x)=h₀(t)exp(β₁ annual + β₂ engagement)HR=exp(β₁)

    T is time to churn in months; t is the month horizon; dᵢ and nᵢ are churns and the risk set at tᵢ. S(t) and Ŝ(t) are unitless probabilities. h(t|x) and h₀(t) are instantaneous monthly hazards conditional on covariates x. annual equals 1 for annual and 0 for monthly; engagement is baseline_engagement_z on the N(0,1) scale. β₁ and β₂ are log-hazard coefficients; exp(β₁) is the unitless annual-versus-monthly hazard ratio at equal engagement.

    Kaplan & Meier (1958), Nonparametric Estimation from Incomplete Observations · Cox (1972), Regression Models and Life-Tables

    08

    Reproducible calculation

    1. 01

      Population, origin, event and censoring are declared before calculation.

    2. 02

      Ŝ(t) and its pointwise 95% interval using Greenwood variance on the log-log scale are computed by group.

    3. 03

      Cox's two-sample score, equivalent here to log-rank, compares curves; Cox then adjusts for group and engagement.

    4. 04

      A group × log(t/12) interaction diagnoses declared proportionality.

    Kaplan & Meier (1958), Nonparametric Estimation from Incomplete Observations · Cox (1972), Regression Models and Life-Tables · Zhang, Solomon & Sizemore (2022), Inferences for current chronic GVHD-free and relapse-free survival

    09

    Numerical example

    Reproducible synthetic example · 600 customers · 401 churns · 199 censored

    S(9)

    Monthly 0.489

    Annual 0.779

    S(12)

    Monthly 0.380

    Annual 0.702

    S(18)

    Monthly 0.255

    Annual 0.534

    Cox · HR

    0.494

    95% CI [0.397, 0.615]

    At 12 months, the 95% intervals are [0.328, 0.432] and [0.642, 0.754]. The time interaction is γ=0.179, p=0.082. These values describe only this synthetic process.

    10

    Operational assumptions

    • Are event and time origin identical for everyone?
    • Conditional on observed covariates, does censoring inform future churn?
    • Is the hazard ratio stable over the horizon?
    • Does another event prevent observing churn?
    • Are conclusions coherent at the prespecified 9-, 12- and 18-month horizons and with the declared time interaction?

    Kaplan & Meier (1958), Nonparametric Estimation from Incomplete Observations · Cox (1972), Regression Models and Life-Tables

    11

    Diagnostics

    Censoring

    199/600 observations are censored; reason and timing are published.

    Proportionality

    Group × log(t/12) interaction: γ=0.179, p=0.082; failure to reject does not prove the assumption.

    Support

    Annual median 19.590 months; no extrapolation beyond 24 months.

    12

    Uncertainty

    What the interval quantifies

    Pointwise uncertainty around Ŝ(t) and asymptotic uncertainty around the HR in the declared specification.

    What it does not cover

    Simultaneous bands, selection bias, measurement error and post-hoc horizon choice.

    Kaplan & Meier (1958), Nonparametric Estimation from Incomplete Observations · Zhang, Solomon & Sizemore (2022), Inferences for current chronic GVHD-free and relapse-free survival

    13

    Interpretation

    HR = 0.494

    In this synthetic dataset at equal baseline engagement, the estimated instantaneous hazard for the annual group is about 49% of the monthly group's. It does not mean 50.6 retention points more and does not give individual risk.

    14

    Supported and forbidden conclusions

    Supported

    Estimate S(12), compare curves and describe a conditional association in the declared population, window and specification.

    Forbidden

    Present annual plans as causing retention, convert the HR into an individual probability, ignore competing risks or extrapolate beyond 24 months.

    15

    Possible marketing decision

    1. 01

      Choose the monitoring horizons that are genuinely useful to the decision.

    2. 02

      Study plan selection qualitatively before interpreting the association.

    3. 03

      Decide whether a causal test of switching to annual is needed.

    16

    When to change method

    Competing risks

    When several exits are mutually exclusive.

    Multi-state

    For repeated transitions between states.

    Time-varying covariates

    When exposure changes during follow-up.

    Causal design

    If the decision concerns the effect of an intervention.

    17

    Implementations

    Executable references

    Standard-library Python 3.13 is the executable reference. R 4.5.1 with survival 3.8-3 is a companion reference.

    Secondary syntaxes

    SPSS 31 and SAS 9.4 must be verified in their environment.

    SPSS 31

    COMPUTE annual=(plan_group="annual").
    EXECUTE.
    KM duration_months BY annual
      /STATUS=churn_event(1).
    COXREG duration_months
      /STATUS=churn_event(1)
      /METHOD=ENTER annual baseline_engagement_z.

    SAS 9.4

    proc lifetest data=input;
      time duration_months*churn_event(0);
      strata plan_group;
    run;
    proc phreg data=input;
      class plan_group(ref='monthly') / param=ref;
      model duration_months*churn_event(0)=
        plan_group baseline_engagement_z / ties=breslow;
    run;

    18

    Expected deliverable

    1. 01

      Population, origin, event, window and censoring rule.

    2. 02

      Risk table, Ŝ(t) curves, S(12)/S(18), medians and intervals.

    3. 03

      Cox specification, HR with interval, PH diagnostic, limitations and supported/forbidden decision.

    19

    Scientific sources

    Three publications ground the calculations shown. Each addresses a precise methodological question, and none establishes commercial performance or a causal plan effect.

    1. Grounds estimation of S(t) when some durations are censored. It does not establish any causal difference between plans.

    2. Cox (1972), Regression Models and Life-TablesProportional hazards and comparison score

      Grounds the Cox model, the conditional hazard ratio and the declared time diagnostic. The HR remains relative and associative in this example.

    3. Supports construction of the pointwise interval shown around S(t). This interval covers neither selection bias nor transport to another population.

    Dataset · Tool

    Dataset · MSC-P-030-SURVIVALSynthetic censored retention→

    Method connections

    Parent territoryCustomer and choice science: behavior, value and heterogeneityCompare withWhich customers have the highest probability of churn?RequiresHow should uncertainty in a marketing result be expressed?

    Read next

    MSC-H-004Customer and choice science: behavior, value and heterogeneity→MSC-P-028How do you estimate CLV with BG/NBD and Gamma-Gamma?→MSC-P-029Which customers have the highest probability of churn?→MSC-P-003How should uncertainty in a marketing result be expressed?→