proximal_regression
Estimate causal treatment effects from observational data when confounding is unmeasured by leveraging proxy variables (Z, W) in a doubly-robust regression.
Instructions
Doubly-robust regression-based PCI estimator for the ATE. Assumptions: A treatment-inducing confounding proxy Z and an outcome-inducing confounding proxy W are observed; Outcome and treatment confounding bridge functions exist (proximal-g and proximal-h completeness conditions); Latent confounding is fully captured by (Z, W, X) -- no residual unmeasured confounding outside the proxy span. Pre-conditions: data has outcome, binary treatment, z_proxy and w_proxy columns; treatment is binary for the bridge logistic step. Failure modes: Treatment-bridge logistic regression fails to converge; propensity collapses to the marginal P(D=1) -> Check detail['propensity_fallback']; the DR correction is neutralised -- improve proxies or covariates. Alternatives: sp.proximal, sp.double_negative_control, sp.frontdoor. Typical minimum N: 200.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | Yes | Outcome column. | |
| alpha | No | Significance level for confidence intervals and tests. | |
| treat | Yes | Binary treatment 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 |
| w_proxy | Yes | Outcome-inducing confounding proxy W. | |
| z_proxy | Yes | Treatment-inducing confounding proxy Z. | |
| 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 | No | Measured covariates X. | |
| 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. | |
| propensity_bounds | No | propensity_bounds parameter (tuple). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||