Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

xtabond

Read-only

Run Arellano-Bond or Blundell-Bond GMM on panel data to correct for endogeneity and dynamic effects, including tests for instrument validity and serial correlation.

Instructions

Arellano-Bond / Blundell-Bond GMM for dynamic panels (standalone). Validation: certified parity evidence. Assumptions: No second-order serial correlation in differenced errors; Internal instruments are valid and not too numerous. Pre-conditions: Panel data include unit, time, outcome, and lagged dependent variable structure; Number of time periods is moderate relative to units. Failure modes: Instrument proliferation or AR(2) test rejects -> Collapse instruments, reduce lag depth, or compare with fixed-effects estimates. Alternatives: sp.panel, sp.feols. Typical minimum N: 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hNoxtabond2 h(): one-step error covariance; 3 is xtabond2's default, 2 zeroes the system cross quadrants (Stata xtdpdsys), 1 the identity.
xNoExogenous regressors
yYesDependent variable
idNoUnit identifierid
lagsNolags parameter (int).
timeNoTime columntime
stepsNoNumber of GMM steps, or 'iterated' / 'cue'
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
methodNodifference (Arellano-Bond), system (Blundell-Bond) or ah (Anderson-Hsiao IV)difference
clusterNoCluster SEs on a coarser unit than the panel id (must be constant within unit)
twostepNotwostep parameter (bool).
collapseNoCollapse instruments (Roodman 2009) to curb proliferation
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.
endogenousNoEndogenous regressors (own lags 2+ as instruments)
orthogonalNoForward orthogonal deviations instead of first differences
iv_equationNoSystem GMM: equation(s) the exogenous regressors instrument; None means 'both' (xtabond2), 'diff' is Stata xtdpdsys.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
time_dummiesNoAdd period dummies as regressors and instruments
ah_instrumentNoAnderson-Hsiao instrument for method='ah'levels
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
predeterminedNoPredetermined regressors (own lags 1+ as instruments)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only carry readOnlyHint=true and openWorldHint=false, which already signal a read operation. The description goes well beyond annotations by disclosing assumptions (no second-order serial correlation, valid internal instruments), failure modes (instrument proliferation, AR(2) test rejection), and remediation paths (collapse instruments, reduce lag depth, compare with fixed effects). It does not detail the exact return payload, but the output schema exists and the detail parameter covers payload depth.

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 description is dense but efficient: it front-loads the method identification, then packs assumptions, pre-conditions, failure modes, alternatives, and minimum N into a compact block. It is on the longer side, but every sentence earns its place for a specialized estimator with many diagnostics; a structured list format would be slightly cleaner, hence 4 rather than 5.

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?

For a complex dynamic-panel GMM estimator with 23 parameters and rich output schema, the description covers what an agent needs to decide and invoke it: validation status, statistical assumptions, data pre-conditions, failure modes, sample-size guidance, and sibling alternatives. The detail parameter even tells the agent how to request minimal vs agent-level payloads for chaining calls, and as_handle/result_id are documented in the schema.

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 even with no additional parameter context. The description adds meaning for key parameters: it ties h to xtabond2 defaults, explains collapse as Roodman 2009 instrument collapsing, and contextualizes method, endogenous/predetermined instruments, iv_equation, ah_instrument, and detail payload sizes. It does not touch every parameter, but it adds genuine meaning for the specialized GMM knobs, so a 4 is warranted.

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 description opens with a specific verb+resource: 'Arellano-Bond / Blundell-Bond GMM for dynamic panels (standalone)' and immediately gives validation, assumptions, pre-conditions, failure modes, and alternatives. It clearly distinguishes itself from xtdpdsys, sp.panel, and sp.feols, so an agent can tell it apart from siblings without opening the schema.

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

Usage Guidelines5/5

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

The description names explicit when-to-use conditions: panel data with unit, time, outcome, lagged dependent variable structure; moderate time periods relative to units; minimum N of 100. It also names alternatives (sp.panel, sp.feols) and failure-mode remedies, giving clear context for when to choose this tool vs others.

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