> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/user/cohort-browser/chart-types/survival-plot-tile.md). Agents can also search and read this documentation through its [MCP server](https://documentation.dnanexus.com/~gitbook/mcp).

# Kaplan-Meier Survival Curve

Learn to build and use Kaplan-Meier Survival Curve charts in the Cohort Browser.

{% hint style="info" %}
An Apollo license is required to use Cohort Browser on the DNAnexus Platform. Org approval may also be required. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## Building a Kaplan-Meier Survival Curve Chart

To generate a survival chart, select one numerical field representing time, and one categorical field, which is transformed into the individual's status.

The chart recognizes the following 4 case-insensitive categorical field values as a status of "Living": `living`, `alive`, `diseasefree`, `disease-free`.

For multi-entity datasets, survival curve charts only support data fields from the main entity, or entities with a 1:1 relation to the main entity.

## Calculating Survival Percentage

To calculate survival percentage at the current event the system evaluates the following formula:

$$S\_T = \frac{L\_{T0} - D}{L\_{T0}}$$

* $$S\_T$$: Survival at the current event
* $$L\_{T0}$$: Number of subjects living at the start of the period or event
* $$D$$: Number of subjects that died

For each time period the following values are generated:

* **Status**: Each individual is considered *Dead* unless they qualify as *Living*.
* **Number of Subjects Living at the Start** ($$L\_{T0}$$)
  * For the initial value this is the total number of records returned by the backend from survival data with *Living* or *Dead* Status.
  * For followup events this is the number of subjects at the start of the previous event minus the number of subjects that died in the previous event and the subjects that dropped out or were censored in the previous event.
* **Number of Subjects Who Died** ($$D$$): 1 for each individual who at the event does not have a status of *Living*.
* **Number of Subjects Dropped or Censored**: 1 for each individual who at the event has a status of *Living*.
* **Survival Percentage at the Current Event** ($$S\_T$$): $$S\_T = \frac{L\_{T0} - D}{L\_{T0}}$$
* **Cumulative Survival** ($$S$$): $$S = S\_{T-1} \cdot S\_T$$ where $$S\_{T-1}$$ is the survival percentage at the previous event.

This is the actual point drawn on the survival plot.

## Learn More

* [Survival Curve Wikipedia](https://en.wikipedia.org/wiki/Survival_function)
* [Kaplan-Meier Wikipedia](https://en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.dnanexus.com/user/cohort-browser/chart-types/survival-plot-tile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
