ivqreg
Estimate causal quantile treatment effects with instrumental variables, handling endogeneity via Chernozhukov-Hansen quantile regression.
Instructions
Instrumental-variable quantile regression (Chernozhukov-Hansen). Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | Yes | Outcome variable. | |
| tau | No | Quantile(s) of interest in ``(0, 1)``. | |
| exog | No | Exogenous controls ``X`` (may be empty). | |
| alpha | No | Significance level for confidence intervals. | |
| endog | Yes | Endogenous regressor(s) ``D``. | |
| 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_grid | No | Grid resolution for the profile search over ``alpha`` (scalar case) -- ignored when ``endog`` is multi-dimensional. | |
| refine | No | After the grid search, refine ``alpha`` with a local optimizer. | |
| verbose | No | verbose parameter (bool). | |
| 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. | |
| bootstrap | No | Number of pairs-bootstrap replications for standard errors. ``0`` disables bootstrap; asymptotic rank-test inversion is not implemented in this MVP. | |
| 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. | |
| instruments | Yes | Instrument(s) ``Z``. Must be at least as many as ``endog``. | |
| add_constant | No | add_constant parameter (bool). | |
| 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 | |||