Source: https://guthlabs.ai/docs/instruments/kaplan-meier-survival-curve-plotter/implementation/

instrument implementation / implementation-contract

# Kaplan-Meier Survival Curve Plotter implementation

A source-bound implementation contract for Kaplan-Meier Survival Curve Plotter; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t6-115

**Effect**: Computation or source lookup only

## Input and validation requirements

A malformed dataset can create an event with an empty risk set and a zero denominator, producing an undefined survival estimate. The specification does not state a required rejection behavior. Median survival is also convention-dependent at the exact 0.5 threshold, and status-code conventions are not specified.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "observations": [
      {
        "time": 2,
        "status": 1
      },
      {
        "time": 3,
        "status": 0
      },
      {
        "time": 5,
        "status": 1
      },
      {
        "time": 7,
        "status": 1
      },
      {
        "time": 8,
        "status": 0
      }
    ],
    "time_unit": "days",
    "sampled_times": [
      0,
      2,
      3,
      5,
      6,
      7,
      8
    ]
  },
  "expected_outputs": {
    "sampled_survival_points": [
      {
        "time": 0,
        "survival": 1
      },
      {
        "time": 2,
        "survival": 0.8
      },
      {
        "time": 3,
        "survival": 0.8
      },
      {
        "time": 5,
        "survival": 0.5333333333333333
      },
      {
        "time": 6,
        "survival": 0.5333333333333333
      },
      {
        "time": 7,
        "survival": 0.2666666666666667
      },
      {
        "time": 8,
        "survival": 0.2666666666666667
      }
    ],
    "median_survival_time": 7,
    "key_curve_features": {
      "roots": [],
      "extrema": {
        "maximum": 1,
        "minimum": 0.2666666666666667
      },
      "terminal_plateau": 0.2666666666666667,
      "asymptotes": [],
      "intersections": []
    }
  },
  "working": "Sorted observations: event at 2, censor at 3, event at 5, event at 7, censor at 8. At t=2, n1=5 and d1=1: S(2)=1*(1-1/5)=4/5=0.8. The censoring at 3 removes one subject but does not change survival. At t=5, n2=3 and d2=1: S(5)=0.8*(1-1/3)=0.8*(2/3)=0.5333333333333333. At t=7, n3=2 and d3=1: S(7)=0.5333333333333333*(1-1/2)=0.2666666666666667. The curve first reaches <=0.5 at t=7, so the median is 7 days. There are no roots or curve intersections."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/kaplan-meier-survival-curve-plotter/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/kaplan-meier-survival-curve-plotter/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/kaplan-meier-survival-curve-plotter/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche6/tranche6-results.json`
