Kaplan-Meier curve / Kaplan-Meier 曲线
kaplan_meierKaplan-Meier curve / Kaplan-Meier 曲线 | USE WHEN: KM curve and median survival only (no multivariable model) | ALIASES: KM曲线, Kaplan-Meier, 中位生存, 生存曲线, 生存率, log-rank | RETURNS: KM 曲线与中位生存
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"times": [
5,
12,
18,
24,
30,
42
],
"events": [
1,
1,
0,
1,
1,
0
]
},
"name": "kaplan_meier"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| times | Yes | 随访时间(一维数值数组,须 >0)。与 events 等长;负时间会被 400 拒绝(否则会算出负的中位生存期)。 | |
| events | Yes | 事件指示,1=事件发生、0=删失(只接受二值编码,传 2/3 会被 400)。与 times 等长;全删失时不给中位生存期。 | |
| groups | No | 分组标签(一维数组,长度=样本数,如 ["A","B",…])。**不传只出总体曲线、没有 log-rank**;等价字段名 group_ids 也认。 | |
| group_ids | No | 分组标记的**规范字段名**(与 groups 等价,两者都认)。长度=样本数;不传则只出总体曲线、没有 log-rank。 |