aggte
Aggregate Callaway-Sant'Anna group-time treatment effects into overall, event-study, group, or calendar-time summaries with cluster-robust bootstrap inference.
Instructions
Aggregate Callaway-Sant'Anna group-time ATTs into interpretable summaries -- overall ATT, event-study by relative time, group-specific ATT(g), or calendar-time ATT(t). Inference uses the multiplier bootstrap on the pre-stored influence functions, so SEs are correct under clustering at the unit level. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Same identifying assumptions as the source estimator (parallel trends, no anticipation, SUTVA); For dynamic aggregation: balanced panel within the requested event-time window (use balance_e). Pre-conditions: result was produced by sp.callaway_santanna or sp.did with staggered=True; result.detail contains the per-(g, t) ATT estimates and their influence functions. Failure modes: result.detail is empty or missing influence functions -> Re-run sp.callaway_santanna; aggte requires the per-(g,t) influence functions; Empty event-time aggregation (no overlapping cohorts) -> Widen the (min_e, max_e) window or drop balance_e. Alternatives: sp.callaway_santanna, sp.sun_abraham, sp.did_imputation. Typical minimum N: 50.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Aggregation type | simple |
| alpha | No | Significance level for confidence intervals and tests. | |
| cband | No | Uniform confidence band | |
| max_e | No | max_e parameter (float). | |
| min_e | No | min_e parameter (float). | |
| na_rm | No | Drop ATT(g,t) cells with missing / infinite SE before aggregating | |
| bstrap | No | bstrap parameter (bool). | |
| 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 |
| n_boot | No | Number of bootstrap replications. | |
| result | Yes | Output of sp.callaway_santanna or sp.did with staggered=True | |
| 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. | |
| balance_e | No | For dynamic: cap event time at +/-balance_e for balanced panel | |
| boot_type | No | Bootstrap variant | multiplier |
| 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. | |
| random_state | No | Random seed or RandomState for reproducible stochastic steps. | |
| data_sample_n | No | Optional uniform random subsample size (seed=0, deterministic) — useful on huge panels. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||