synth_survival
Estimates treatment effect on survival: fits donor Kaplan-Meier curves to pre-treatment data and reports post-treatment gap with placebo UCBs.
Instructions
Synthetic Survival Control (Han & Shah 2025, arXiv:2511.14133). Fits a convex combination of donor Kaplan-Meier curves on the complementary log-log scale to match the treated arm's pre-treatment survival, then reports the post-treatment survival gap with placebo UCBs. Assumptions: A convex (or regularized) combination of donor units reproduces the treated unit's pre-treatment outcome path; No interference: the treatment does not affect the donor units (SUTVA); No anticipation before the treatment date. Pre-conditions: Panel of one or more treated units plus an untreated donor pool, observed over time; Pre-treatment window long enough to fit donor weights (rule of thumb: more pre-periods than donors used); Outcome observed for every unit in every period. Failure modes: Large pre-treatment RMSPE -- the synthetic unit fails to track the treated unit before treatment -> Add donors / predictors, lengthen the pre-period, or use a bias-corrected estimator (sdid, augsynth); Placebo / permutation inference shows the estimate is not extreme relative to donors -> Report the placebo distribution honestly; the effect may not be distinguishable from noise; Pre-treatment RMSPE > post-treatment e...
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducible stochastic steps. | |
| time | Yes | Time period column. | |
| unit | Yes | Unit/panel-id column | |
| alpha | No | Significance level for confidence intervals and tests. | |
| detail | No | Payload depth: 'minimal' (~150 tokens) for sub-step calls where only the point estimate is needed; 'standard' (~1K tokens) for diagnostics + coefficient table; 'agent' (~2K tokens, default) adds violations / next_steps / suggested_functions so the LLM can plan its next call without another round-trip. | agent |
| treated | Yes | Boolean column or name of the single treated unit | |
| survival | Yes | Column with survival probability S_i(t) | |
| as_handle | No | If true, cache the fitted result on the server and return result_id + result_uri alongside the JSON payload so a subsequent tools/call can chain without re-running. | |
| data_path | Yes | Absolute path or URL to a data file. Supported: .csv / .tsv / .txt (delimited), .parquet / .pq, .feather / .arrow, .xlsx / .xls, .dta (Stata), .json / .jsonl. Schemes: file://, s3://, gs://, https://. | |
| result_id | No | Optional handle to a previously-fitted result (returned by an earlier call when as_handle=true). Tools that operate on a fitted object accept this in place of re-supplying data_path + columns. | |
| n_placebos | No | Number of placebos. | |
| treat_time | Yes | treat_time parameter (float). | |
| data_columns | No | Optional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads. | |
| data_sample_n | No | Optional uniform random subsample size (seed=0, deterministic) — useful on huge panels. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||