Skip to main content
Glama

enaho_tabla_cruzada

Read-onlyIdempotent

Perform weighted cross-tabulation with Rao-Scott corrected independence test to avoid false significance from survey clustering.

Instructions

Cruce ponderado con prueba de independencia corregida por diseno.

El chi-cuadrado de Pearson asume muestreo aleatorio simple: bajo conglomerados infla el estadistico y sale significativo lo que no lo es. Aqui se aplica la correccion de Rao-Scott por la traza de la matriz de efectos de diseno generalizados, con ajuste de segundo orden de los grados de libertad.

Se devuelven ambos estadisticos para que se vea la diferencia, mas el efecto de diseno promedio y cuantas celdas quedan bajo frecuencia esperada 5.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filaYesVariable categorica de las filas.
factorNoColumna del factor de expansion.
pruebaNoCalcula la prueba de independencia corregida.
columnaYesVariable categorica de las columnas.
datasetYesDataset preparado.
encuestaNoEncuesta del INEI sobre la que operar. Por defecto 'enaho'. Valores: enaho, enaho-panel, endes, enapres, enut, enares, ena, epen-departamentos, epen-ciudades, epen-lima, epe-lima, enapref, enco, cenagro, mapa-pobreza. Cada encuesta tiene sus propias llaves de union y su propio factor de expansion; no se pueden mezclar entre si.
estratosNoColumna de estratos.
conglomeradosNoColumna de UPM.
peso_adicionalNo'mieperho' para expandir un archivo de hogares a poblacion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description goes beyond the annotations by disclosing specific return values: both uncorrected and corrected statistics, average design effect, and count of cells with expected frequency below 5. This rich output behavior is not implicit in readOnlyHint/idempotentHint and adds valuable transparency. Slightly more could be said about edge cases, but it is strong.

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

Conciseness5/5

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

The description is well-structured and efficient: first sentence states purpose, second explains the statistical problem, third lists outputs. Every sentence earns its place, and it is front-loaded with the core function. Despite some technical density, it remains concise and scannable.

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 (9 parameters, survey design, statistical correction), the description is complete enough for an agent to understand what it does and what it returns. It covers the methodological rationale and output diagnostics. It doesn't mention every caveat, but the schema and output schema fill the remaining gaps, making a 4 appropriate.

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 baseline is 3. The description does not add explicit parameter-level semantics beyond what the schema already provides; it focuses on the statistical method rather than explaining individual parameters. The context about design effects indirectly informs parameters like estratos/conglomerados, but not enough to raise the score.

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 starts with 'Cruce ponderado con prueba de independencia corregida por diseno', clearly identifying the tool as a weighted cross-tabulation with a design-corrected independence test. It further specifies the Rao-Scott correction, distinguishing it from generic cross-tab or chi-square tools and from sibling tools like enaho_estimar or enaho_comparar.

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 provides clear context for when to use this tool: when Pearson's chi-square is inappropriate due to complex survey design (clustering), and a corrected test is needed. It explains why the correction is necessary, but does not explicitly state alternatives or exclusions, earning a 4 rather than 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnderMC66/enaho-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server