Skip to main content
Glama

SanYu Research Engine

act_lmm_formula

Read-only

【线性混合模型(纵向/重复测量,公式模式)】 同一受试者在多个时间点被反复测量(治疗前后各测一次、多次随访、多个时间点重复观察、每人测三四次、每例随访若干次),要比较各组随时间的变化趋势、要看组与时间的交互;也是重复测量方差分析的现代替代(允许缺失、不必球形检验) 返回:固定效应系数/SE/Wald z/P/95%CI(按真实变量名,不是 X1/X2)、各项整体检验 omnibus、交互项检验、primary_test、ICC、方差成分、n_subjects/n_obs、组间例数、缺失与收敛告警 (真实算法引擎执行,非大模型生成)

Input Schema

NameRequiredDescriptionDefault
dataYes长格式数据:每行一次观测 [{受试者ID, 分组, 时点, 结局}, ...];也接受列式 {列名: [值, ...]}。注意必须是**长表**(每行一次测量),不是每人一行多列
remlNo默认 true(REML)
formulaYesR 风格公式,如 '收缩压 ~ 分组 * 时点'(组×时间交互);左端=结局
subjectYes受试者/病案号列名(随机截距的分组依据)
referenceNo参照水平,如 {"分组": "对照组"} —— 报告表里「与对照组相比」必须是它
re_formulaNo随机效应,默认 '1'(随机截距);随机斜率用 '1 + 时点'
categoricalNo显式声明哪些列按分类处理(如 ["分组"]);数值编码的 0/1 分组必须声明,否则会被当连续变量
time_valuesNo把字符串时点映射成数值以估线性趋势,如 {"时点": {"基线":0,"4周":1,"12周":2}}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

The annotations already cover the safety profile (readOnly=true, non-destructive, closed-world), so the description's job is to disclose behavior beyond that, and it does: it enumerates the statistical outputs (fixed effects with real variable names, omnibus tests, interaction tests, primary_test, ICC, variance components, subject/observation counts), states that missingness and convergence warnings are surfaced, and notes allowance for missing data. It also distinguishes itself from model-generated text by stating a real algorithmic engine executes the computation.

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?

Purpose is front-loaded, which is good, but the opening bracketed header essentially restates the annotation title, and the parenthetical enumeration of follow-up patterns (measured once before/after, three or four per person...) is repetitive hedging rather than new information. The return-value sentence is a useful but very dense run-on list.

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?

With eight parameters, nested objects, and no output schema, the description carries the burden of telling the agent what comes back, and it does so thoroughly (coefficients, omnibus, ICC, variance components, counts, warnings). The main residual gap is that model-type choices such as link functions or assumption checks are left entirely to the schema.

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 every parameter (formula, subject, re_formula, reference, categorical, time_values, reml) already carries its own explanation, and the description adds little beyond reiterating the group-by-time interaction pattern. Baseline 3 is the correct ceiling when the schema already does the parameter-level work.

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 names a specific method (linear mixed model) plus a specific mode (formula-based), then scopes it precisely to the longitudinal/repeated-measures case: the same subject measured at multiple time points, comparing group-by-time trends and interaction effects. That scoping alone lets an agent separate it from cross-sectional siblings such as act_two_way_anova or act_survival_analyze without reading the schema.

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?

It gives a concrete trigger list (pre/post, multiple follow-ups, three or four measurements per subject) and an explicit comparison against repeated-measures ANOVA, framed as the modern replacement that tolerates missing data without sphericity testing. What's absent is an explicit when-not-to-use clause and mention of the sibling it should defer to for non-longitudinal comparisons, so the routing is strongly implied rather than spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources