callaway_santanna
Estimate group-time average treatment effects for staggered difference-in-differences with doubly robust, IPW, or regression-adjusted methods, handling heterogeneous effects where TWFE fails.
Instructions
Staggered DID (Callaway-Sant'Anna 2021): group-time ATT with doubly-robust, IPW, or regression-adjusted estimators. Robust to heterogeneous treatment effects where TWFE fails. Requires a cohort column g (first-treatment period; 0 = never-treated). Validation: certified evidence with scoped limitations. Known limitations: clustervars accepts a cluster that varies within unit only with panel=False (repeated cross-sections, as Stata csdid without ivar()); on a panel the influence functions are per unit.
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": {
"g": "<g>",
"i": "<i>",
"t": "<t>",
"y": "<y>"
},
"name": "callaway_santanna"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| g | Yes | First-treatment-period cohort column (0 for never-treated). | |
| i | Yes | Unit ID column | |
| t | Yes | Time column | |
| y | Yes | ||
| detail | No | Payload depth; agent is the fullest. | agent |
| data_id | No | Data handle (d_...) from load_data; replaces data_path. | |
| data_csv | No | Small inline table as CSV text. | |
| as_handle | No | Cache the fit and return its result_id. | |
| data_path | No | Absolute path of a data file on the server. | |
| estimator | No | dr | |
| result_id | No | Handle of an earlier fit made with as_handle=true. | |
| data_records | No | Small inline table as row objects. | |
| control_group | No | nevertreated | |
| max_output_bytes | No | Result byte budget (default 262144; 0 = none). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||