Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

continuous_iv_late

Read-only

Estimates causal effects with a continuous instrument via quantile-bin Wald ratios, identifying the LATE for the maximal complier class.

Instructions

LATE with a continuous instrument (Xie et al. 2025). Estimates the LATE on the maximal complier class via quantile-bin Wald ratios, weighted by the bin-pair with the largest first-stage response. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Instrument relevance (non-zero first stage); Exclusion restriction: the instrument affects the outcome only through the treatment; Independence/exogeneity of the instrument; for LATE, monotonicity (no defiers). Pre-conditions: An instrument plausibly affecting treatment, an endogenous treatment, and an outcome; A strong first stage (assess instrument strength before interpreting estimates); formula includes the (endog ~ instruments) parenthesised block. Failure modes: Weak first stage -- biased point estimates and unreliable conventional SEs -> Report first-stage F / effective F and use weak-IV-robust inference (Anderson-Rubin); First-stage F < 10 (Stock-Yogo 5% bias) -> Use weak-IV-robust inference (Anderson-Rubin) or LIML; Over-identification test rejects (sp.estat 'overid') -> At least one instrument is invalid; drop instruments or switch to just-identified LIML. Alterna...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome variable column name or outcome array.
seedNoRandom seed for reproducible stochastic steps.
alphaNoSignificance level for confidence intervals and tests.
treatYesTreatment indicator or first-treatment-period 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
n_bootNoNumber of bootstrap replications.
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.
instrumentYesContinuous instrument
n_quantilesNoNumber of instrument quantile bins
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

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description does not contradict this. It adds behavioral context beyond annotations by documenting assumptions, validation tier, and failure modes such as weak first stage and over-identification. No destructive behavior is claimed, so no additional safety disclosure is needed.

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

Conciseness3/5

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

The description is front-loaded and uses labeled sections (Validation, Assumptions, Pre-conditions, Failure modes), which aids scanning. However, it is long and ends abruptly at 'Alterna...', indicating truncated content, and includes some boilerplate ('validated evidence tier') that may not be tool-specific.

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

Completeness3/5

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

For a complex estimator with an output schema and 13 documented parameters, the description covers assumptions, preconditions, and failure modes, which is useful. It is incomplete because the alternatives section is truncated and the formula-related precondition does not map cleanly onto the parameterized interface.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 13 parameters; baseline is 3. The description's only parameter-adjacent note, the '(endog ~ instruments)' formula block, is a precondition rather than an explanation of the actual data_path/instrument/treat/y parameters. Thus it adds little beyond the schema.

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

Purpose4/5

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

Description opens with a specific method statement: 'LATE with a continuous instrument (Xie et al. 2025)' and then defines the estimator as 'Estimates the LATE on the maximal complier class via quantile-bin Wald ratios, weighted by the bin-pair with the largest first-stage response.' This clearly identifies the operation and resource. It does not explicitly name a sibling tool for contrast, so it falls just short of full differentiation.

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?

Lists explicit pre-conditions (instrument plausibly affecting treatment, endogenous treatment, outcome, strong first stage) and assumption requirements (relevance, exclusion restriction, independence, monotonicity). Failure modes give conditional guidance ('First-stage F < 10 -> Use weak-IV-robust inference...'). It lacks explicit 'use X instead of Y' sibling comparisons, so not a 5.

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