Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

xtlsdvc

Read-only

Corrects fixed-effects bias in dynamic panel regressions by estimating bias-corrected LSDV coefficients, with optional bootstrap standard errors, to produce reliable causal evidence for decisions.

Instructions

Bias-corrected LSDV (LSDVC) estimator for dynamic panels. Validation: certified parity evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoStrictly exogenous regressors. Accepts the same lag-operator syntax
yYesDependent variable. Its first lag is added automatically -- do **not** pass a hand-built lag in ``x``.
idNoUnit and period identifiers.id
seedNoSeed for the bootstrap.
timeNoUnit and period identifiers.time
alphaNoSignificance level.
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
initialNoConsistent estimator used to evaluate the bias expression: Arellano-Bond, Anderson-Hsiao, or Blundell-Bond system GMM. The correction is only as good as this input, and the three can disagree materially on a persistent series -- ``'bb'`` is the safer choice there, for the same reason system GMM is.ab
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.
bootstrapNoNumber of parametric-bootstrap replications for the standard errors. **The reported analytic standard errors are the LSDV ones and do not account for the bias correction**, exactly as in Stata's ``xtlsdvc``; set this to get honest ones. 0 skips the bootstrap and warns.
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.
bias_orderNoHow many terms of the Bun-Kiviet expansion to subtract: ``O(1/T)``, ``O(1/NT)``, or ``O(1/NT^2)``. Bun & Kiviet (2003) find diminishing returns beyond the second.
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

C2.2/5.0
Behavior1/5

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

The description adds no behavioral detail beyond what annotations already provide (readOnlyHint=true). It does not mention the bootstrap behavior, bias-correction caveats, or the meaning of 'certified parity evidence.' With read-only annotations, the description fails to add context like limitations or side effects.

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

Conciseness2/5

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

The description is a single sentence, which is under-specification rather than effective conciseness. It lacks front-loaded essential information and omits key details that would help an agent decide whether to invoke the tool.

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

Completeness1/5

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

For a complex estimator with 15 parameters and no output schema shown, the description is grossly insufficient. It does not explain what the tool does beyond the name, what inputs are expected beyond the schema, what outputs look like, or when it is appropriate. The schema is detailed but the description does not synthesize this into usable context.

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%, and each parameter has detailed descriptions (e.g., 'bootstrap', 'initial', 'bias_order'). The description itself adds no parameter-specific meaning, so the baseline 3 applies as the schema carries the burden.

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?

The description names a specific estimator (bias-corrected LSDV) for dynamic panels, which clearly identifies the tool's purpose. However, it does not differentiate it from sibling dynamic panel estimators like xtdpdsys or xtabond, so it is clear but not fully distinguishing.

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

Usage Guidelines1/5

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

There is no guidance on when to use this tool versus alternatives. The description does not mention prerequisites, data requirements, or scenarios where LSDVC is preferred over other estimators. The only additional text, 'Validation: certified parity evidence,' offers no actionable usage context.

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