ml_bounds
Estimate partial-identification bounds on the average treatment effect using ML cross-fitting, yielding an interval under weak assumptions when point identification is not credible.
Instructions
ML-enhanced partial-identification bounds on the ATE. Assumptions: Only weak (set-identifying) assumptions are imposed; the result is an interval, not a point; Lee bounds add monotonicity of selection; Oster's delta adds proportional selection on observed vs. unobserved. Pre-conditions: The data needed for the point-identifying analysis, plus the weakest credible identifying restriction; For Lee bounds: a binary selection/attrition indicator. Failure modes: Bounds are too wide to be informative -> Add a credible auxiliary restriction (monotone treatment response, instrument) to tighten the bounds. Alternatives: sp.oster_delta, sp.lee_bounds, sp.manski_bounds. Typical minimum N: 100.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | Yes | Outcome and 0/1 treatment column names. | |
| alpha | No | Significance level of the band. | |
| treat | Yes | Outcome and 0/1 treatment column names. | |
| y_max | No | A priori bounds on Y. Defaults to the empirical min/max. **Tighter** external bounds (e.g. if Y is a probability, use ``[0, 1]``) give tighter ML bounds. | |
| y_min | No | A priori bounds on Y. Defaults to the empirical min/max. **Tighter** external bounds (e.g. if Y is a probability, use ``[0, 1]``) give tighter ML bounds. | |
| 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 |
| learner | No | "random_forest" Outcome-regression learner. Ignored if ``custom_learner`` is set. | random_forest |
| n_splits | No | Number of cross-fitting folds. | |
| 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. | |
| covariates | Yes | Covariates X used for the outcome / propensity regressions. | |
| n_bootstrap | No | Non-parametric bootstrap replicates for the 2-sided frequentist band. Set to 0 to return the raw plug-in bounds only. | |
| 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. | |
| custom_learner | No | Any ``.fit()`` / ``.predict()``-compatible regressor. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||