honest_did
Assess sensitivity of event-study estimates to parallel-trends violations, returning robust confidence intervals. Use when pre-trend tests reject, instead of abandoning the design.
Instructions
Rambachan-Roth (2023) 'honest' DID sensitivity analysis. Operates on a fitted event-study / DID result: pass result_id from a prior sp.event_study / sp.callaway_santanna / sp.did_imputation / sp.sun_abraham fit run with as_handle=true (or use the honest_did_from_result tool, which auto-extracts the event-study coefficients). Returns honest confidence intervals under varying degrees of parallel-trends violation (smoothness or relative-magnitude restrictions). Call this when a pre-trend test rejects at low power instead of abandoning the design. Validation: certified parity evidence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| e | No | Event-time period (post-treatment horizon) to build the honest CI for. | |
| alpha | No | Significance level for the honest CI. | |
| 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 |
| m_grid | No | Grid of M bounds on the parallel-trends violation to sweep. | |
| method | No | Restriction family: 'smoothness' (second differences) or 'relative_magnitude'. | smoothness |
| 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 | No | 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. | |
| 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 | |||