Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

rd_bias_aware_fuzzy

Read-only

Compute bias-aware confidence intervals for fuzzy regression discontinuity designs, robust to weak first stages and avoiding asymmetric power issues.

Instructions

Bias-aware confidence interval for fuzzy RD via Anderson-Rubin test inversion (Noack-Rothe 2024 Econometrica). Robust to weak first stages and avoids the power asymmetry of conventional 2SLS-style fuzzy RD CIs (Kaliski-Keane-Neal 2025). Assumptions: Continuity of potential outcomes in x at c (Hahn, Todd, van der Klaauw 2001); No manipulation of x at c (McCrary density test); Local randomization only in a neighborhood of c -- extrapolation away from c is not identified. Pre-conditions: running variable x is continuous with support on both sides of c; treatment assignment is determined by the cutoff c (sharp) or probabilistically at c (fuzzy); sufficient mass of observations within the optimal bandwidth. Failure modes: McCrary density test p < 0.05 -> Use donut-hole RD (donut=) or partial-identification bounds; Covariate imbalance at cutoff (sp.rdbalance rejects) -> Include covariates as controls, narrow bandwidth, or report as caveat; Effect unstable across bandwidth halvings -> Report sp.rdbwsensitivity and sp.rd_honest (Armstrong-Kolesar honest CI). Alternatives: sp.rdrobust, sp.rd_honest, sp.rdrbounds, sp.bounds. Typical minimum N: 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cNoc parameter (float).
hNoBandwidth used for local smoothing or kernel weighting.
xYesPrimary running variable, regressor, or feature input for this estimator.
yYesOutcome variable column name or outcome array.
M_dNoBound on |g_D''|; auto if None
M_yNoBound on |g_Y''|; auto if None
alphaNoSignificance level for confidence intervals and tests.
fuzzyYesTreatment indicator column
detailNoPayload 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
kernelNoKernel function used for weighting or smoothing.triangular
as_handleNoIf 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_pathYesAbsolute 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_idNoOptional 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.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint=true already covering non-mutation, the description adds meaningful methodological behavior: it is based on Anderson-Rubin test inversion, is designed for weak first stages, and only identifies local effects near the cutoff. It also warns about extrapolation away from the cutoff not being identified. No contradiction with the read-only annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded and the rest is organized into assumptions, preconditions, and failure modes, all relevant to correct use. It is longer than strictly necessary (citations, typical minimum N, detailed failure-mode remedies), but that length is mostly earned for a nuanced econometric tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity, the 100%-covered schema, and the presence of an output schema, the description is complete: it covers what the estimator does, when it is valid, what conditions are needed, what to do when they fail, and which alternatives exist. It leaves no critical gap for an agent deciding whether and how to call this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by clarifying that c is the cutoff, x must be continuous with support on both sides of c, and fuzzy means probabilistic treatment assignment at c. This helps map data columns to the RD design.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific action and object: computing a bias-aware confidence interval for fuzzy RD via Anderson-Rubin test inversion. It also distinguishes the method from conventional 2SLS-style fuzzy RD CIs and lists named alternatives, so an agent can tell it apart from the many RD siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear applicability (robust to weak first stages, avoids power asymmetry), states assumptions/preconditions, and provides failure-mode-specific redirections to alternatives. It is not a perfect 5 because the alternatives are referenced with an 'sp.' prefix (e.g., sp.rdrobust, sp.bounds) that does not match the actual sibling tool names, making the routing slightly less directly actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools