cross_validate
Cross-validate an estimand across independent statistical engines and report agreement (AGREE, PARTIAL, DISAGREE, INSUFFICIENT). Use to honor the cross-package reproducibility rule: trust only when >=2 independent implementations match.
Instructions
Cross-validate ONE estimand across INDEPENDENT engines (StatsPAI, pyfixest, linearmodels, DoubleML, R's fixest, Stata) and report whether they agree (AGREE / PARTIAL / DISAGREE / INSUFFICIENT). Use this to honour the cross-package reproducibility rule: trust a number only when >=2 independent implementations reproduce it. Needs a data_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| g | No | DiD only: cohort / first-treatment period (0 = never treated). | |
| i | No | DiD only: unit-id column. | |
| t | No | DiD only: time column. | |
| y | No | Outcome column. | |
| vcov | No | ||
| endog | No | Endogenous regressors (IV). | |
| 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 |
| engines | No | Engines to run, e.g. ['statspai','R::fixest','pyfixest','Stata']. Omit for 'auto' (all installed + applicable). | |
| formula | No | fixest-style 'y ~ x | fe | endog ~ z'. | |
| estimand | Yes | Model family to fit in every engine. | |
| 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. | |
| treatment | No | Focal regressor (reconciled coefficient). | |
| covariates | No | ||
| instruments | No | ||
| 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. | |
| fixed_effects | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||