---
title: The Kaplan-Meier Tab
description: Estimate survival curves with the Kaplan-Meier tab and compare groups using RMST.
priority: 0.7
audience: Kaplan-Meier タブで生存時間データを分析する読者。データセットの基本操作は仮定する。生存分析の理論は仮定しない
criteria: Kaplan-Meier タブの操作と結果の読み方を扱う。統計理論の詳細は concepts-survival に委ね、概要 1 文とリンクに留める。画面に表示される文言・列名は実装と一致させる
---

# The Kaplan-Meier Tab {#kaplan-meier}

The Kaplan-Meier tab estimates the survival function nonparametrically and compares groups using RMST ([formulation](concepts-survival#kaplan-meier-estimator)). Visually assess differences in survival between groups and quantify them using restricted mean survival time. See [Survival Analysis Fundamentals](concepts-survival) for the mathematical background.

To estimate the effect of covariates on [hazard](concepts-survival#survival-function-and-hazard-function), use [The Cox Regression Tab](cox-regression).

## Data Requirements {#data-requirements}

Kaplan-Meier analysis requires two variables:

- **Time variable**: Time to event (numeric)
- **Event variable**: Indicates whether the event occurred. The following formats are supported:
  - int64: 1 = event, 0 = censored
  - Boolean: true = event, false = censored

float64 columns cannot be selected as the event variable. If a column stores 0/1 values as decimals, convert it to int64 with [The Convert Column Types Tab](column-type-conversion).

See [Survival Analysis Fundamentals](concepts-survival#time-to-event-data-and-censoring) for how censoring is handled. MIDAS only supports right censoring. Left censoring, interval censoring, and competing risks are not supported.

## Basic Usage {#basic-usage}

1. Select **Analysis > Survival Analysis > Kaplan-Meier...** from the menu bar
2. Select the **Time Variable**
3. Select the **Event Variable**
4. Optionally select a **Group Variable** for group comparison
5. Click **Run Analysis**

The Group Variable dropdown lists only columns whose scale of measurement is Nominal or Ordinal. A column encoded as 0/1 integers, such as `anaemia`, is read as numeric and cannot be selected as is. Change its scale of measurement to Nominal in the Data Table tab first. See [the Kaplan-Meier tutorial](tutorial-kaplan-meier#set-anaemia-to-a-nominal-scale) for the steps.

![Kaplan-Meier form configuration](../shared/images/kaplan-meier-form.webp)

## Understanding Results {#understanding-results}

![Group comparison results (survival curves, Summary Statistics, Number at Risk, RMST)](../shared/images/tutorial-kaplan-meier-anaemia.webp)

### Survival Curve {#survival-curve}

Plots survival probability $S(t)$ against time. Displayed as a step function that decreases at each event time. Censoring times are marked with a + symbol on the curve. A + mark on a flat segment indicates that subjects were lost to follow-up during that interval. A pointwise confidence band (95% by default) is shown. A pointwise band consists of individual intervals at each time point and does not guarantee simultaneous coverage of the entire curve, computed using the log transformation method ([details](concepts-survival#kaplan-meier-estimator)).

Adjust the confidence level with the **Confidence Level** input.

### Summary Statistics {#summary-statistics}

| Column | Description |
|--------|-------------|
| Group | Group name (when Group Variable is specified) |
| n | Number of observations |
| Events | Number of events |
| Median | Median survival time, the earliest time when $S(t) \leq 0.5$. Displayed as NR (Not Reached) if not reached within the observation period |
| *nn*% CI | Confidence interval for the median, obtained by inverting the pointwise confidence band of the survival function. A bound is displayed as NR when the corresponding survival CI bound does not cross $0.5$ |

### Number at Risk {#number-at-risk}

Shows the risk set size (the number of subjects who have not yet experienced the event and have not been censored) at each time point.

### RMST (Restricted Mean Survival Time) {#rmst}

The average survival time estimated as the area under the Kaplan-Meier curve from 0 to a restriction time $\tau$ ([formulation](concepts-survival#rmst)). Per-group RMST with SE and confidence interval is displayed.

| Column | Description |
|--------|-------------|
| Group | Group name |
| RMST | Restricted mean survival time estimate |
| SE | Standard error (Greenwood variance-based) |
| *nn*% CI | Confidence interval for RMST (Wald-type) |

#### Restriction Time $\tau$ {#restriction-time}

RMST is the area under the KM curve up to $\tau$, so the choice of $\tau$ affects the result. The default is the upper bound of the range commonly observed across all groups (the smallest of each group's maximum observed time). Change it with the **RMST Restriction Time** input. In the interval after the last observed event, the integration assumes the KM curve stays at its last value (this also happens within the maximum observed time when only censoring follows the last event). The longer this interval, the more the uncertainty of RMST may be underestimated.

#### Group Differences {#rmst-difference}

When a Group Variable is specified and there are two or more groups, pairwise RMST differences and their confidence intervals are displayed. For three or more groups, the per-pair confidence intervals are unadjusted for multiplicity.

## Notes {#notes}

- Rows with missing values in the time or event variable are automatically excluded (listwise deletion; see [Missing Data Mechanisms](concepts-missing-data#listwise-deletion-and-mcar) for validity conditions). When rows are excluded, the results show the number of excluded rows as "N rows excluded due to missing values."

## Adding to Reports {#adding-to-reports}

Click **Add to Report** to add the survival curve to a report.

## See also {#see-also}

- **[Survival Analysis Fundamentals](concepts-survival)** - Mathematical background of time-to-event data, Kaplan-Meier, and Cox model
- **[The Cox Regression Tab](cox-regression)** - Estimating the effect of covariates on hazard
- **[Tutorial: Kaplan-Meier Analysis](tutorial-kaplan-meier)** - A practical example with sample data
