cox_regression
Fit Cox proportional hazards regression models to estimate covariate effects on time-to-event data using formula-based input and duration/event columns.
Instructions
Fit a Cox proportional hazards regression with statsmodels PHReg.
``formula`` contains only the covariate terms (for example ``"x1 + x2"``).
``data`` is a ``{column: list}`` mapping or an ``"@<path>.csv"`` reference.
Event indicators must be 0/1 and durations must be positive.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"formula": "<formula>",
"data": "<data>",
"duration_col": "<duration_col>",
"event_col": "<event_col>"
},
"name": "cox_regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| formula | Yes | ||
| event_col | Yes | ||
| duration_col | Yes |