Skip to main content
Glama

Stat Pairwise Tests

stat_pairwise_tests

Run pairwise comparisons after ANOVA to identify which groups differ, with optional multiple-comparison correction to control false positives.

Instructions

Pairwise comparisons with optional multiple-comparison correction.

WHEN TO USE

  • After a significant ANOVA / RM-ANOVA / mixed ANOVA, to identify which pairs differ.

  • For planned pairwise comparisons, including for main effects and interactions.

WHEN NOT TO USE: as an exploratory scan of every possible pair without a correction — that is p-hacking.

Set padjust to control the error rate. Reporting only the significant pairs from an uncorrected set is the most common mistake in post-hoc reporting; the tool warns when padjust='none' with multiple comparisons.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "dv": "<dv>"
    },
    "name": "stat_pairwise_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvYes
nameYes
alphaNo
withinNo
betweenNo
effsizeNohedges (default) | cohen | r.hedges
padjustNonone | bonf | sidak | holm | fdr_bh | fdr_by. Use 'fdr_bh' for many exploratory comparisons, 'holm' for a few planned ones.none
subjectNo
parametricNoTrue for t-based tests, False for Mann-Whitney/Wilcoxon pairs.
interactionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses one runtime behavior (the tool warns when padjust='none' with multiple comparisons), but it does not explain what the tool requires of the data/model reference, how missing within/between specification is handled, or what the paired tests actually are.

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?

Front-loaded one-line purpose followed by clearly labeled WHEN TO USE / WHEN NOT TO USE blocks; every sentence is functional. Minor redundancy between the closing paragraphs about padjust and the p-hacking warning.

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 10-parameter statistical tool with no annotations, the description covers intent and error-rate policy but omits design specification and model referencing. The output schema is covered elsewhere, so return-values omission is acceptable, but parameter gaps leave it only partially complete.

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

Parameters2/5

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

Schema description coverage is only 30% across 10 parameters, and the description only elaborates on padjust. The structurally critical parameters (name, dv, within, between, subject, interaction) get no explanation anywhere, leaving the agent to guess how to declare a between/within design.

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 first line states a specific verb and resource: pairwise comparisons with optional multiple-comparison correction. That distinguishes it reasonably from stat_pairwise_tukey (fixed Tukey procedure) and stat_multicomp_correction (correction only), though no sibling is named explicitly.

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?

Explicit WHEN TO USE (follow-up to a significant ANOVA/RM-ANOVA/mixed ANOVA, planned comparisons) and WHEN NOT TO USE (uncorrected exploratory scanning = p-hacking). It gives clear selection context but never names the alternative procedures an agent should route to instead, such as the Tukey variant.

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