Atlas
statminds
Survival Analysis (Product-Limit Model)The underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

Kaplan-Meier Analysis

The engine for Survival Discovery. Kaplan-Meier audits the step-by-step trajectory of time-to-event data, reveal the 'Survival Probability' while mathematically neutralizing the bias of censored participants.

Model familySurvival Analysis (Product-Limit Model)
Hypothesistwo-tailed
AliasesProduct-Limit Estimator · Survival Curve Analysis · Time-to-Event Audit
G1
Survival Trajectory Audit
Construct a high-fidelity 'Step-Curve' that maps the probability of remaining event-free over time.
G2
Censoring Forensics
Account for participants who 'drop out' or 'finish the study' without experiencing the event.
G3
Group Divergence Discovery
Quantify the 'Survival Gap' between treatment and control using the definitive Log-Rank strike.
Visual Overview Dashboard
1

What is it?

Kaplan-Meier Analysisis designed to calculate survival probability over time, adjusting for right censoring so drop-outs don't bias the estimation.

The engine for Survival Discovery. Kaplan-Meier audits the step-by-step trajectory of time-to-event data, reveal the 'Survival Probability' while mathematically neutralizing the bias of censored participants.

2

Goals & Indications

  • Survival Trajectory Audit: Construct a high-fidelity 'Step-Curve' that maps the probability of remaining event-free over time.
  • Censoring Forensics: Account for participants who 'drop out' or 'finish the study' without experiencing the event.
  • Group Divergence Discovery: Quantify the 'Survival Gap' between treatment and control using the definitive Log-Rank strike.
3

Core Idea Diagram

S(t) = 1.0Event (Drop)Censored (Tick)Survival Prob.Time (t) →
4

Claims tested

H₀: H₀: S₁(t) = S₂(t) for all time points t (survival functions are identical across groups)
Hₐ: Hₐ: S₁(t) ≠ S₂(t) for at least one time point (survival functions differ between groups)
5

How it works

  1. Sort all observed times (events and censorings) in chronological order.
  2. For each time point, count the number of subjects at risk immediately before.
  3. Calculate the conditional survival rate as 1 minus events divided by at risk.
  4. Multiply conditional rates cumulatively to yield the step-wise survival curve.
6

Assumptions

Time-to-event data with clearly defined event and time origin: Outcome is time until event occurs
Censoring is independent and non-informative: Censored subjects have same survival prospects as those still at risk
Independence of observations: Survival times are independent across subjects
7

Important Note

For log-rank test comparing groups. Single-group Kaplan-Meier is descriptive only (no hypothesis test). Can be one-tailed if directional survival hypothesis is pre-specified.

8

Worked Example

Time (t)At Risk (n)Events (d)Censored (c)S(t)
010001.000
510100.900
89010.900
128200.675
Interactive Sandbox

Kaplan-Meier Step Survival & Log-Rank Laboratory

Simulate right-censored time-to-event outcomes. Adjust hazard rates (λ) and censoring rate (γ) to observe step curves, censoring tick marks, and the Log-Rank test statistic in real-time.

Treatment Group Hazard (λ₁)0.12
Lower hazard indicates slower event rate (longer survival).
Control Group Hazard (λ₂)0.25
Higher hazard indicates faster event rate (shorter survival).
Censoring Hazard Rate (γ)0.15
Censoring rate controls how fast participants are lost to follow-up or administrative exit.
Sample Size per Group (N)40
Log-Rank Test Results
Chi-Square Statistic (χ²): 6.821
p-value: 0.0090Significant
GroupObserved (O)Expected (E)
Treatment (Group 1)1624.26
Control (Group 2)2715.74
Kaplan-Meier Step Curves & Censored Ticks
0.00.20.40.60.81.0048121620
Treatment (G1, λ = 0.12)
Control (G2, λ = 0.25)
|Censored Ticks
Numbers At Risk over Time
Groupt = 0t = 4t = 8t = 12t = 16t = 20
Treatment (G1)40144220
Control (G2)40110000
Clinical Interpretation

The Log-Rank test identifies a statistically significant difference in survival trajectories (p = 0.0090). Treatment group (G1) hazard rate is lower than Control (G2), which translates to a prolonged survival benefit.

The 12-Stage Precision Workflow
01Curve Parity
Hypotheses
We test the null of 'Identical Trajectories' across groups against the discovery of a non-zero shift in survival probability.
02Random Censoring
Assumptions
The ultimate prerequisite: assuming 'Censored' participants represent a random subset, not a biased signal of failure.
03The At-Risk Table
Diagnostics
Utilizing the 'Numbers at Risk' row to ensure the curve's precision hasn't collapsed due to participant depletion over time.
04focus
Mapping 'Time to Return-to-Sport' in FlowMotion athletes vs. Standard PT—visualizing the speed of the intervention.
05Life Table Pivot
Alternatives
Knowing when to switch to Actuarial Life Tables if data is grouped into large temporal intervals rather than exact dates.
06Log-Rank Strike
Significance
Executing the Log-Rank test—the definitive strike on the global difference between survival curves.
07Median Survival
Effect Size
Interpreting the 'Median Recovery Time'—the moment when 50% of the population has reached the clinical milestone.
08The Event Count
Sample Size
Accounting for the power advantage of events: a study with 10 events in 100 people is less powerful than 10 events in 20 people.
09Curve Visualization
Reporting
Providing the KM-Curve with 95% Confidence Intervals (Hall-Wellner bands) to prove the stability of the trajectory.
10survfit Logic
Software
Executing 'survfit(Surv(time, status) ~ group)' commands, ensuring the event indicators are correctly mapped.
11focus
The fatal error of reporting the 'Mean Survival Time' in a study with censored data—which consistently underestimates the true truth.
12focus
Tracing the model back to Edward Kaplan and Paul Meier (1958) and the most cited breakthrough in clinical statistics.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

A hypothesis is a question sharpened to a point. Ambiguity is the enemy of inference.
Logic Core
Null · H₀

H₀: S₁(t) = S₂(t) for all time points t (survival functions are identical across groups)

Alternative · Hₐ

Hₐ: S₁(t) ≠ S₂(t) for at least one time point (survival functions differ between groups)

Why it matters two-tailed

For log-rank test comparing groups. Single-group Kaplan-Meier is descriptive only (no hypothesis test). Can be one-tailed if directional survival hypothesis is pre-specified.

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Build your analysis on rock, not sand. Verify the mathematical foundation before building the model.
Integrity Shield
6
Assumptions
3
Critical / High Severity
How to check
Quick
Verify each subject has: (1) time origin (e.g., diagnosis, treatment start), (2) time scale (days, months, years), (3) event status (occurred vs censored), (4) follow-up time. Check data structure: one row per subject with time and status variables
Rigorous
Validate event definition matches research question; ensure time origin is consistent across all subjects; verify no negative or zero survival times; check that event is binary and irreversible (e.g., death, disease recurrence)
If violated
If event is not time-to-event → use different analysis (logistic regression for binary outcomes, linear regression for continuous outcomes). If multiple events per subject → use recurrent event models (Andersen-Gill). If event is reversible → use multi-state models. If time origin unclear → conduct sensitivity analyses with different time origins
logistic regressioncox ph
How to check
Quick
Review reasons for censoring (end of study, loss to follow-up, withdrawal). Calculate censoring rate by group (should be balanced). Plot censoring pattern over time to detect informative censoring patterns
Rigorous
Compare baseline characteristics of censored vs uncensored subjects (should be similar). Test association between covariates and censoring using Cox model with censoring as event. Check if censoring is related to prognosis (e.g., patients dropping out due to disease progression = informative censoring)
If violated
If informative censoring suspected: (1) Use inverse probability of censoring weighting (IPCW) to adjust for informative censoring; (2) Conduct sensitivity analyses assuming different censoring mechanisms; (3) Use competing risks analysis if subjects can experience alternative events; (4) Collect and report reasons for censoring to assess informativeness
How to check
Quick
Check study design for clustering (patients within hospitals, family members, matched pairs). Verify no subject appears multiple times in dataset. Look for correlated survival times (e.g., siblings, twins)
Rigorous
Calculate intraclass correlation (ICC) for survival times within clusters. Use frailty models to test for significant random effects indicating dependence. Check for temporal clustering (e.g., patients treated by same surgeon)
If violated
If clustered data (e.g., patients nested in hospitals): (1) Use frailty models (Cox model with random effects for clusters); (2) Use robust standard errors clustered by site/family; (3) Use stratified analysis by cluster if small number of clusters. If matched pairs: use stratified Cox model with strata=pair_id
How to check
Quick
Review data collection protocol. Check if event times are exact (e.g., date of death from registry) or interval-based (e.g., 'event occurred between 6-month and 12-month visits'). Look for tied event times suggesting interval censoring
Rigorous
Examine distribution of event times for suspicious patterns (e.g., all events at 30, 60, 90 days suggests interval assessment). Check if many subjects have identical event times at scheduled visit dates (indicates interval censoring)
If violated
If interval censoring present: (1) Use interval-censored survival methods (e.g., Turnbull estimator, parametric models with interval censoring); (2) Use midpoint imputation (assign event to midpoint of interval) with sensitivity analyses; (3) Use nonparametric MLE for interval-censored data. Kaplan-Meier assumes exact times, so interval censoring causes bias
How to check
Quick
Plot survival curves by enrollment period (e.g., early vs late recruits). Compare median survival times across enrollment cohorts. Check if treatment standards or technology changed during recruitment
Rigorous
Stratify analysis by enrollment period and test for differences using log-rank test. Use Cox model with calendar time as covariate to test for temporal trends. Compare baseline characteristics and outcomes across enrollment periods
If violated
If time trends detected: (1) Stratify Kaplan-Meier by enrollment period; (2) Use Cox model adjusting for calendar time or enrollment cohort; (3) Restrict analysis to stable enrollment period; (4) Include time-varying covariates to capture trends. Document treatment or protocol changes during study period
cox ph
How to check
Quick
Visually inspect survival curves - should not cross (crossing suggests non-proportional hazards). Compare early vs late hazard ratios. Log-log survival plots should be parallel
Rigorous
Use Schoenfeld residuals test on Cox model. Plot log(-log(S(t))) vs log(t) for each group - lines should be parallel. Use time-stratified log-rank tests to test hazard ratio constancy. Fit Cox model and test time*group interaction
If violated
Log-rank test is most powerful when proportional hazards hold, but still valid test of overall survival difference even with non-proportional hazards (tests H₀: survival curves identical). If non-proportional hazards: (1) Report this limitation; (2) Use alternative tests: Gehan-Wilcoxon (weights early times), Tarone-Ware, or restricted mean survival time (RMST) comparison; (3) Use Cox model with time-varying effects; (4) Report survival at specific timepoints instead of hazard ratio
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. The outliers often hold more truth than the averages.
System Health
Essential checks
  1. Log-Rank test for global statistical divergence between survival curves.
  2. Proportionality check: Visual audit of KM curves to ensure they do not cross significantly.
  3. Number at Risk table audit across all major timepoint milestones.
  4. Median Survival Time calculation with high-precision 95% Confidence Intervals.
  5. Censoring distribution check to identify patterns in participant dropouts.
Recommended checks
  1. Hall-Wellner 95% confidence bands to visualize the global trajectory stability.
  2. Cumulative Hazard function audit to identify periods of peak risk.
  3. Restricted Mean Survival Time (RMST) comparison for a non-parametric summary.
  4. Sensitivity analysis for 'Informative Censoring' (checking dropout drivers).
  5. Comparison with Cox Proportional Hazards if baseline covariate adjustments are required.
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

Lung Cancer Treatment Survival (Standard vs Experimental Chemotherapy)

Research question: Does experimental chemotherapy improve survival compared to standard treatment in advanced non-small cell lung cancer? Design: Randomized controlled trial (Standard n=68, Experimental n=65, 24-month follow-up). Outcome: Overall survival (time from randomization to death from any cause). Event rate: 72% (96/133 deaths), 28% censored at study end or lost to follow-up.

DesignRandomized controlled trial with right-censored survival data
GroupsStandard · Experimental
Total n133
Outcome ScaleOverall survival (months from randomization to death)
# Kaplan-Meier Survival Analysis with Log-Rank Test
# Lung cancer RCT: Standard vs Experimental chemotherapy

# Install/load required packages
library(survival)     # For survfit, Surv, survdiff
library(survminer)    # For ggsurvplot (enhanced visualization)
library(dplyr)        # Data manipulation

# Simulate realistic lung cancer survival data (or load: data <- read.csv("lung_trial.csv"))
set.seed(2025)

# Standard treatment: median survival 11.5 months
standard_times <- rweibull(68, shape=1.2, scale=13)
standard_event <- rbinom(68, 1, 0.75)  # 75% event rate

# Experimental: median survival 16.2 months (HR~0.70)
experimental_times <- rweibull(65, shape=1.2, scale=18.5)
experimental_event <- rbinom(65, 1, 0.68)  # 68% event rate

# Administrative censoring at 24 months
standard_times <- pmin(standard_times, 24)
experimental_times <- pmin(experimental_times, 24)

# If time reaches 24 and subject alive, mark as censored
standard_event[standard_times >= 24] <- 0
experimental_event[experimental_times >= 24] <- 0

data <- data.frame(
  treatment = c(rep("Standard", 68), rep("Experimental", 65)),
  time = c(standard_times, experimental_times),
  status = c(standard_event, experimental_event)
)

# === STEP 1: Data Summary ===
cat("=== Dataset Summary ===\n")
cat("Total patients:", nrow(data), "\n")
cat("Events(deaths):", sum(data$status), "\n")
cat("Censored:", sum(1 - data$status), "\n")
cat("Censoring rate:", round(mean(1 - data$status)*100, 1), "%\n\n")

data %>%
  group_by(treatment) %>%
  summarise(
    n = n(),
    events = sum(status),
    censored = sum(1 - status),
    median_followup = median(time)
  )

# === STEP 2: Kaplan-Meier Survival Curves ===

# Create survival object: Surv(time, status)
# status = 1 for event (death), 0 for censored
surv_object <- Surv(time = data$time, event = data$status)

# Fit Kaplan-Meier curves by treatment group
km_fit <- survfit(surv_object ~ treatment, data = data)

# Print survival summary
print(km_fit)
# Output shows: n, events, median survival, 95% CI

# Detailed summary at specific timepoints
summary(km_fit, times = c(6, 12, 18, 24))

# Extract median survival times with 95% CI
cat("\n=== Median Survival Times ===\n")
print(surv_median(km_fit))

# === STEP 3: Log-Rank Test (Compare Survival Curves) ===

logrank_test <- survdiff(Surv(time, status) ~ treatment, data = data)
print(logrank_test)

# Extract chi-square and p-value
chi_sq <- logrank_test$chisq
p_value <- 1 - pchisq(chi_sq, df = 1)

cat("\n=== Log-Rank Test Results ===\n")
cat("Chi-square:", round(chi_sq, 2), "\n")
cat("df: 1\n")
cat("p-value:", round(p_value, 4), "\n")

if (p_value < 0.001) {
  cat("Interpretation: Highly significant difference in survival(p < .001)\n")
} else if (p_value < 0.05) {
  cat("Interpretation: Significant difference in survival(p < .05)\n")
} else {
  cat("Interpretation: No significant difference in survival(p ≥ .05)\n")
}

# === STEP 4: Hazard Ratio (from Cox model for effect size) ===
library(survival)
cox_model <- coxph(Surv(time, status) ~ treatment, data = data)
summary(cox_model)

HR <- exp(coef(cox_model))
HR_CI <- exp(confint(cox_model))

cat("\n=== Hazard Ratio(Experimental vs Standard) ===\n")
cat("HR:", round(HR, 2), "\n")
cat("95% CI: [", round(HR_CI[1], 2), ",", round(HR_CI[2], 2), "]\n")
cat("Interpretation: Experimental treatment reduces hazard of death by", 
    round((1-HR)*100, 0), "%\n")

# === STEP 5: Visualize Survival Curves ===

# Method 1: Base R plot
plot(km_fit, 
     col = c("red", "blue"),
     lwd = 2,
     xlab = "Time(months)",
     ylab = "Overall Survival Probability",
     main = "Kaplan-Meier Survival Curves\nLung Cancer RCT: Standard vs Experimental Chemotherapy")
legend("topright", 
       legend = c("Standard", "Experimental"),
       col = c("red", "blue"),
       lwd = 2)

# Add median survival lines
abline(h = 0.5, lty = 2, col = "gray")

# Method 2: Enhanced plot with survminer (publication-ready)
library(survminer)

ggsurvplot(
  km_fit,
  data = data,
  pval = TRUE,              # Show log-rank p-value
  pval.method = TRUE,       # Show test name
  conf.int = TRUE,          # Show 95% CI bands
  risk.table = TRUE,        # Add risk table below plot
  risk.table.height = 0.25,
  ggtheme = theme_bw(),
  palette = c("#E7B800", "#2E9FDF"),
  xlab = "Time(months)",
  ylab = "Overall Survival Probability",
  title = "Kaplan-Meier Survival Analysis: Lung Cancer RCT",
  legend.title = "Treatment",
  legend.labs = c("Experimental", "Standard"),
  break.time.by = 6,        # X-axis breaks every 6 months
  surv.median.line = "hv",  # Add median survival lines
  tables.theme = theme_cleantable()
)

# === STEP 6: Additional Diagnostics ===

# Check proportional hazards assumption
test_ph <- cox.zph(cox_model)
print(test_ph)
# If p > .05: proportional hazards OK (log-rank test appropriate)
# If p < .05: consider reporting curves cross or using RMST

plot(test_ph)

# Cumulative hazard plot
ggsurvplot(
  km_fit,
  data = data,
  fun = "cumhaz",
  conf.int = TRUE,
  palette = c("#E7B800", "#2E9FDF"),
  xlab = "Time(months)",
  ylab = "Cumulative Hazard",
  title = "Cumulative Hazard Function"
)

# === APA-Style Reporting ===
cat("\n=== APA-Style Report ===\n")
cat("A Kaplan-Meier survival analysis was conducted to compare overall survival\n")
cat("between standard and experimental chemotherapy in advanced NSCLC(N=133).\n")
cat("Median follow-up was 16.3 months. The experimental group(n=65) had significantly\n")
cat("longer median survival(16.2 months, 95% CI [13.8, 19.1]) compared to the\n")
cat("standard group(n=68, median 11.5 months, 95% CI [9.7, 13.6]). Log-rank test\n")
cat("showed significant difference in survival distributions(χ²(1) = 8.45, p = .004).\n")
cat("Hazard ratio indicated 30% reduction in death risk with experimental treatment\n")
cat("(HR = 0.70, 95% CI [0.48, 0.96]). At 12 months, survival probability was 62%\n")
cat("in experimental vs 48% in standard group. At 24 months: 35% vs 22%.\n")
Interpretation Blueprint

Log-rank χ²(1) = 8.45, p = .004. Experimental treatment significantly improved survival compared to standard chemotherapy. Median survival: 16.2 vs 11.5 months (4.7-month benefit). Hazard ratio 0.70 (95% CI [0.48, 0.96]) indicates 30% reduction in death risk. At 12 months, 62% vs 48% survival; at 24 months, 35% vs 22%. Clinically meaningful and statistically significant survival advantage for experimental treatment.

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Time-to-Event + Binary Status
Ratio (Time)
Maintain KM logic. Optimal for auditing 'When' a milestone occurs without distributional assumptions.
Peak Signal
Interval
Ideal for Primary Recovery. Ensure censoring is non-informative (random).
Standard Precision
Nominal
Abandon Survival. Use McNemar or Chi-Square if the 'Time' dimension is irrelevant.
Identity Loss
Temporal Trajectory Audit Dynamic Survival Flow
Survival Trajectory
Continuous time-to-event.
Stay with Kaplan-Meier. Visualize the step-by-step probability of recovery.
Competing Risks
Multiple failure types.
Pivot to Cumulative Incidence Functions (CIF) to account for secondary risks.
Adaptive Technical Safeguards · adaptive safeguards
crossing survival curves
  • Restricted Mean Survival Time (RMST) — Quantify the clinical gain in event-free days despite curve intersection.
  • Fleming-Harrington Strike — Apply tail-weighted p-values to capture late-stage divergence.
need to adjust for covariates
  • Cox Proportional Hazards — Pivot to multivariable modeling to account for baseline severity.
  • Stratified Log-Rank — Control for a single categorical confounder while preserving the curve.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons

Post-hoc pairwise tests defined for this model.


Correction methods
Pairwise Log-Rank Strikes with Bonferroni correctionPeto-Peto Test (Focus on Early Divergence)Tarone-Ware Test (Weighted by At-Risk Counts)Fleming-Harrington (Tail-weighted Sensitivity)
Interpretation Guidelines

KM post-hoc is an audit of temporal separation. Use RMST to provide a clinically intuitive effect size (days of life gained) alongside the global Log-Rank p-value.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Significance is noise. Magnitude is the signal. Measure the impact, not just the probability.
Impact Magnitude

Time at which 50% of the sample has experienced the event of interest. Compare across groups.

Estimated proportion of individuals surviving past a specific time milestone (e.g., 5-year survival rate).

Ratio of hazard rates between groups. HR > 1 indicates higher risk of event in treatment group; HR < 1 indicates lower risk (protective effect).

Recommended Metric: median survival time
Small
0.2
Medium
0.5
Large
0.8
0.50
median survival time
Recommended Measure
3
Available Metrics
ReportUse median survival time to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

The 'Event Currency' Mandate: Survival power is 100% dependent on the number of 'Failures' (Events), not just the total N. A minimum of 30 total events is required to stabilize the KM step-curve.

Effect SizeParametersRequired n
Small EffectHR = 1.5 (Small)n ≈ 200 total events
Medium EffectHR = 2.0 (Medium)n ≈ 60 total events
Large EffectHR = 3.0 (Large)n ≈ 25 total events
Key considerations

The 'Follow-up' Strike: Power can be increased in two ways: recruit more people or extend the follow-up time. Longer studies accumulate more events, effectively increasing your power without adding new participants.

G*Power StrategyBenchmark: Log-Rank Test. Parameters: Hazard Ratio (HR), Event Probability, α = .05, Power = .80. Note: If your treatment is very effective, you may need a larger N to accumulate enough events to prove it.
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Data does not speak for itself. It requires a translator. Be clear, be precise, be honest.
Narrative Arc
Worked APA paragraph example
A Kaplan-Meier survival analysis was conducted to compare the survival distributions of cancer patients receiving a new immunotherapy regimen (n = 75) versus the standard chemotherapy regimen (n = 75). Patients on standard chemotherapy had a median survival time of 14.5 months (95% CI [12.1, 16.9]), whereas those on immunotherapy had a median survival time of 22.8 months (95% CI [19.4, 26.2]). A log-rank test showed that this difference in survival distributions was statistically significant, χ²(1) = 6.42, p = .011, hazard ratio (HR) = 0.62 (95% CI [0.43, 0.90]), indicating a 38% reduction in the risk of death for patients on the immunotherapy regimen.
Reusable template

A Kaplan-Meier survival analysis was conducted to compare the survival distributions of Group A and Group B over time unit. The median survival time was X.XX time unit (95% CI X.XX, X.XX) for Group A and X.XX time unit (95% CI X.XX, X.XX) for Group B. A log-rank test revealed a significant/non-significant difference in survival distributions between the groups, χ²(df) = X.XX, p = .XXX, hazard ratio (HR) = X.XX (95% CI X.XX, X.XX).

Essential statistics to report
  • sample size per group and number of events (deaths/failures)
  • median survival times with 95% confidence intervals per group
  • survival rates at key time milestones (e.g., 1-year, 5-year)
  • log-rank statistic (χ²), degrees of freedom, and p-value
  • hazard ratio (HR) with 95% confidence interval
10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: Kaplan-Meier Survival Estimates by Treatment Arm
GroupMedian Survival95% CIEventsCensoredLog-Rank χ²p-value
New Protocol42.5[38.2, 48.5]455512.45< .001
Standard Care28.4[24.1, 32.8]7228
Note. Median survival time in months. N = 200. Comparison via Log-Rank Test.
Median (42.5 vs 28.4)Powerful Clinical Benefit. The new protocol extends the median survival time by over 14 months—a 50% increase.
p < .001Confirms 'Golden Divergence'. The curves separate early and remain distinct, proving the treatment's sustained effectiveness.
Header glossary

The 'Halfway' Marker. The time point at which 50% of the subjects in the group have experienced the event.

The 'Hidden' Data. Participants who either finished the study without the event or dropped out—K-M handles these correctly.

The Curve Comparison. Tests if the entire survival trajectory of Group A is significantly different from Group B.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Fit Kaplan-Meier Curve
km_fit <- survival::survfit(Surv(time, event) ~ group, data = df)
summary(km_fit)

# 2. Visualize with Risk Table
survminer::ggsurvplot(km_fit, data = df, risk.table = TRUE, pval = TRUE)

# 3. Execute Log-Rank Test
survival::survdiff(Surv(time, event) ~ group, data = df)
Library stack
R
survivalsurvminerggplot2
Python
lifelines
Elite Forensic Strike

If survival curves cross, the Log-Rank test is invalid. Always check the 'Proportional Hazards' assumption or use the Gehan-Breslow test for early-time differences.

# Execute Number at Risk Audit
# Ensure you have enough subjects in the 'tail' of the curve to trust the estimates.
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
Censored observations contribute crucial information to survival estimates up until their censoring time. Simply excluding them biases results downward (underestimates survival) because you lose follow-up time. Kaplan-Meier correctly accounts for censored observations by updating the risk set at each event time - censored subjects contribute to denominator until their censoring time.
The correction
Always include censored observations in analysis with proper status coding (status=0 for censored, status=1 for event). In R: Surv(time, status). Verify censoring is non-informative (censored and uncensored subjects have similar prognosis). Report censoring rate and pattern. Never exclude censored observations - they are essential data.
Why it's wrong
Kaplan-Meier assumes exact event times are known. With interval censoring (e.g., 'cancer recurrence detected at 6-month visit, occurred sometime between 3-6 months'), KM treats event as occurring exactly at detection time, which biases survival estimates and underestimates uncertainty. Interval censoring is common in clinical trials with periodic assessments.
The correction
If events detected at scheduled visits with all/most events at visit times → you have interval censoring. Use: (1) Interval-censored survival methods (Turnbull estimator, parametric models with interval censoring); (2) Multiple imputation for event times within intervals; (3) Sensitivity analyses varying event times within intervals. If interval censoring is minor (<10% of events), KM may be acceptable with this limitation noted.
Why it's wrong
Overlapping confidence intervals do NOT mean groups are statistically equivalent - this is a common misinterpretation. CI overlap is too conservative for testing difference (leads to false negatives). Conversely, non-overlapping CIs don't guarantee significance at α=.05. Log-rank test properly tests H₀: survival curves are identical, accounting for correlation structure across time.
The correction
Always use log-rank test (or other formal survival comparison test) to compare groups. In R: survdiff(Surv(time, status) ~ group). Report chi-square statistic, df, and p-value. Confidence bands are for descriptive purposes only. For >2 groups, perform omnibus log-rank test first, then pairwise tests with multiplicity correction if significant.
Why it's wrong
p-value indicates statistical significance but provides no information about magnitude or clinical importance of survival difference. Without median survival times or HR, readers cannot assess practical significance. For example, p=.001 could indicate 2-month or 12-month survival difference - vastly different clinical implications.
The correction
Always report: (1) Median survival time per group with 95% CI; (2) Hazard ratio from Cox model with 95% CI and interpretation (e.g., 'HR=0.70 indicates 30% reduction in death risk'); (3) Survival probabilities at clinically meaningful timepoints (e.g., 1-year, 5-year survival rates); (4) Log-rank test results (χ², df, p); (5) Number at risk, events, censored per group. Include survival curve plot with at-risk table.
Why it's wrong
Kaplan-Meier assumes non-informative censoring: censored subjects have same survival prospects as those remaining at risk. When censoring is informative (related to prognosis), this assumption is violated and survival estimates are biased - typically overestimated because sicker patients censor earlier. For example, if patients stop treatment due to worsening disease, ignoring this creates upward bias.
The correction
Investigate censoring mechanism: compare baseline characteristics of censored vs uncensored patients; check if censoring rate differs by group; collect and report reasons for censoring. If informative censoring suspected: (1) Use inverse probability of censoring weighting (IPCW); (2) Treat competing events properly with competing risks analysis; (3) Conduct sensitivity analyses assuming different censoring mechanisms; (4) Use pattern mixture models. Always report censoring reasons and rates by group.
Why it's wrong
Log-rank test is most powerful when proportional hazards assumption holds (constant hazard ratio over time). When curves cross, log-rank test loses power because early and late hazards cancel out - may fail to detect real survival differences. Test is still valid (correct Type I error) but not optimal. Alternative tests may be more powerful for crossing curves.
The correction
Always visually inspect survival curves for crossing. If curves cross: (1) Still report log-rank results but note 'curves crossed, suggesting non-proportional hazards'; (2) Use alternative tests: Gehan-Wilcoxon (weights early times more), Tarone-Ware (intermediate), or weighted log-rank tests; (3) Report restricted mean survival time (RMST) difference - provides effect size interpretable with non-PH; (4) Use Cox model with time-varying coefficients; (5) Report survival differences at specific timepoints separately.
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
In survival analysis, the silence of the 'Censored' participants is just as important as the noise of the 'Events'. Respect the steps, for every drop in the curve is a life changed.
The Interpretive Rigor Directive
statminds · Kaplan-MeierMind reference · v2.2 · updated 2026-01-1715 of 15 sections