Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

panel

Read-only

Estimate fixed, random, and dynamic panel regression models, then run built-in diagnostics to choose the correct specification for causal analysis.

Instructions

Unified panel regression: FE, RE, between, FD, pooled OLS, two-way FE, Mundlak/Chamberlain CRE, Arellano-Bond, Blundell-Bond system GMM. Results include built-in diagnostics: .hausman_test(), .bp_lm_test(), .f_test_effects(), .pesaran_cd_test(), .compare(method). Validation: certified parity evidence. Assumptions: Static FE: strict exogeneity of regressors conditional on unit fixed effects (E[u_it | x_i, alpha_i] = 0); Random effects: unit effect uncorrelated with regressors; relax with Mundlak / Chamberlain; Dynamic GMM: weak exogeneity and no second-order serial correlation in differenced errors. Pre-conditions: Data is a long-format panel keyed by (entity, time) with at least 2 time periods per entity; Outcome and regressors are numeric or properly encoded; Method-specific structure satisfied (e.g. dynamic GMM needs T moderate, system GMM needs initial-condition validity). Failure modes: Hausman test rejects RE -> Switch to fixed effects (method='fe') or correlated random effects (method='mundlak'); Few clusters (< 30) inflate Type I error with cluster-robust SEs -> Use wild-cluster bootstrap or CR2/CR3 small-sample corrections; High-dimensional fixed effects make the design si...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lagsNoAR lags for dynamic panel (ab/system)
timeYesTime 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
entityYesUnit identifier column
methodNoEstimation methodfe
robustNoStandard errors: nonrobust, robust, kernel, driscoll-kraaynonrobust
clusterNoCluster variable: entity, time, or twoway
formulaYesRegression formula: 'y ~ x1 + x2'
twostepNoTwo-step GMM
gmm_lagsNoGMM instrument lag range(2, 5)
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.2/5.0
Behavior5/5

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

Annotations provide readOnlyHint=true, and the description adds substantial behavioral context: it discloses assumptions (strict exogeneity, random effects uncorrelated), failure modes, and built-in diagnostics. It goes well beyond annotations by explaining what the tool does and when results are reliable, with no contradictions.

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 with the main purpose and method list, but it is quite long and includes extensive assumptions and failure modes that, while valuable, could be more succinctly organized. It appears truncated, which also impacts completeness. It earns its place for a complex tool but is not concise.

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

Completeness4/5

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

Given the tool's complexity (15 parameters, 11 methods), the description covers many critical aspects: methods, diagnostics, assumptions, pre-conditions, and failure modes. However, the truncation and lack of explicit return-format details (though output schema exists) prevent a perfect score. It is largely complete for an agent to plan calls.

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 baseline is 3. The description adds context for the 'method' parameter by explaining when to switch methods (e.g., Hausman test rejection) and discusses diagnostics that relate to output but not individual parameters. It adds value beyond schema for method selection, but does not elaborate on all parameters.

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 clearly states it is a unified panel regression tool listing all supported methods (FE, RE, between, FD, pooled, etc.) and includes built-in diagnostics. This distinguishes it from siblings like 'regress' and 'feols' by specifying the panel scope and comprehensive method coverage.

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

Usage Guidelines3/5

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

The description provides pre-conditions (long-format panel, keyed by entity/time, at least 2 periods) and failure modes (e.g., Hausman rejection → switch to fe/mundlak), which guide when to use the tool. However, it does not explicitly contrast with alternative tools or state when not to use this tool, leaving some inference needed for tool selection.

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