weakrobust
Run weak-instrument-robust tests (AR, CLR, K) and confidence sets for instrumental variable models, delivering verdicts on instrument strength and endogeneity.
Instructions
Stata-style unified weak-instrument-robust diagnostic panel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | Yes | Outcome and single endogenous regressor (column names in ``data``). | |
| h0 | No | Null value for the endogenous coefficient. All under-H0 tests (AR, CLR, K) are evaluated at ``beta = h0``. | |
| exog | No | Included exogenous controls. An intercept is always added. | |
| vcov | No | Used by the Olea-Pflueger effective F. | HC1 |
| alpha | No | Significance level for the robust confidence sets. | |
| endog | Yes | Outcome and single endogenous regressor (column names in ``data``). | |
| 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 |
| 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://. | |
| grid_size | No | Grid resolution used by AR/CLR/K confidence-set inversion. | |
| include_k | No | Also run the Kleibergen K score test and K confidence set. | |
| 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. | |
| include_clr | No | Also run the CLR test and invert it for a CLR confidence set. | |
| instruments | Yes | Excluded instruments. | |
| 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. | |
| clr_simulations | No | Monte-Carlo draws for the CLR null distribution. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||