rosenbaum_bounds
Test whether a paired observational study's treatment effect is robust to unmeasured confounding by computing Rosenbaum bounds and gamma-critical values.
Instructions
Compute Rosenbaum bounds on a paired observational study.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y | No | Outcome variable column name or outcome array. | |
| alpha | No | Significance level used to report ``gamma_critical``. | |
| treat | No | Treatment indicator or first-treatment-period 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 |
| method | No | Wilcoxon signed-rank bound (continuous) or binomial sign test (robust / binary). | wilcoxon |
| control | No | Outcome in the treated / control unit of each matched pair (same length). Ignored if ``data`` is provided. | |
| pair_id | No | pair_id parameter (Optional[str]). | |
| treated | No | Outcome in the treated / control unit of each matched pair (same length). Ignored if ``data`` is provided. | |
| 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. | |
| gamma_grid | No | Gamma values (>= 1) over which to compute bounding p-values. | |
| alternative | No | Direction of the alternative hypothesis for the treatment effect. | greater |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||