Skip to main content
Glama

Stat Rm Anova

stat_rm_anova

Run repeated-measures ANOVA for one within-subjects factor with three or more levels. Use it when the same participants are measured across conditions, with effect size and sphericity correction.

Instructions

Repeated-measures ANOVA — one within-subjects factor with three or more levels.

WHEN TO USE: the same participants measured under 3+ conditions. WHEN NOT TO USE:

  • Only two conditions → a paired t-test is simpler and equivalent.

  • Missing data → a linear mixed-effects model uses all available data, whereas RM-ANOVA deletes whole cases.

  • Badly non-normal → Friedman test.

Always check sphericity first (stat_sphericity_test) and report the corrected p-value if it is violated.

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>",
      "within": "<within>",
      "subject": "<subject>"
    },
    "name": "stat_rm_anova"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvYes
nameYes
withinYes
effsizeNong2 (generalized eta-squared, default) | np2.ng2
subjectYes
correctionNoauto (recommended) | True (always Greenhouse-Geisser) | False (never).auto

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does disclose a real behavioral consequence: RM-ANOVA deletes whole cases under missing data, which materially affects results and sample size. It also signals that a correction (Greenhouse-Geisser) may be applied and that the p-value may need reporting differently. It stops short of stating what the result object contains or what happens when the within factor has fewer than three levels.

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?

Front-loaded with the one-line definition, then labeled WHEN TO USE / WHEN NOT TO USE blocks and a final prerequisite sentence. Every line carries decision-relevant information; there is no restatement of the title or filler.

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?

The statistical decision context is complete and an output schema exists, so return values need not be described. However, for a six-parameter tool with no annotations and only a third of parameters documented in schema, the definition leaves the four required parameters (name, dv, within, subject) semantically underspecified.

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 33%, so the description should compensate, but it never mentions the parameters by name. It implies the meaning of `within` (a factor with 3+ levels) and `subject` (repeated participants), yet `name` and `dv` are unexplained in both the schema and the description, and `effsize`/`correction` are documented only in the schema. An agent knows the statistical model but must guess how to bind column names to name/dv.

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 first sentence names a specific method and its structural constraint: one within-subjects factor with three or more levels. That scope statement alone lets an agent distinguish this from stat_anova (between-subjects), stat_mixed_anova, and stat_nonparametric_k, rather than relying on the name.

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?

Explicit WHEN TO USE condition (same participants measured under 3+ conditions) and three WHEN NOT TO USE branches, each naming the concrete alternative: paired t-test for two conditions, linear mixed-effects model for missing data, Friedman for non-normality. It also prescribes an ordering dependency (run stat_sphericity_test first and report the corrected p-value if violated).

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