cluster_cross_interference
Estimates direct and spillover treatment effects in cluster-randomized trials where treatment in neighboring clusters influences outcomes, using precomputed neighbor treatment shares.
Instructions
Cluster-randomised trial under cross-cluster interference (Ding et al. 2025). Estimates direct + spillover effects when treatment of one cluster affects outcomes in adjacent clusters. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Partial interference: spillovers operate within clusters but not across cluster boundaries; Exposure mapping correctly captured by neighbour_treat_share (user-precomputed share of treated neighbours); Cluster-level treatment is binary and randomized (cluster RCT). Pre-conditions: Cluster identifier column plus individual-level outcome; Cluster-level binary treatment column; Precomputed neighbour_treat_share column from spatial/network adjacency. Failure modes: neighbour_treat_share missing or not a valid 0-1 share -> Precompute the treated-neighbour share per cluster from your adjacency matrix before calling; Too few clusters for cluster-robust inference -> Increase the number of clusters or use a design with weaker cluster requirements. Alternatives: sp.inward_outward_spillover, sp.network_hte, sp.interference, sp.spillover. Typical minimum N: 30.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | Yes | Outcome variable column name or outcome array. | |
| treat | Yes | Treatment indicator or first-treatment-period column. | |
| 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 |
| cluster | Yes | Cluster identifier column for clustered standard errors. | |
| 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. | |
| 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. | |
| neighbour_treat_share | Yes | Column with neighbours' treatment share |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||