mixed_lm
Fit linear mixed-effects models with specified random effects, returning fixed-effect estimates, standard errors, p-values, random-intercept variance, AIC/BIC, and convergence status.
Instructions
Fit a linear mixed-effects model with a random-effects structure.
``data`` is either a ``{column: list}`` mapping or an ``"@<path>.csv"``
reference (relative paths resolve against ``output_dir()``). ``groups``
names the grouping column. ``re_formula`` optionally describes the random
effects (e.g. ``"~1"`` for random intercepts only). ``reml`` selects REML
(default) or maximum likelihood.
Returns fixed-effect estimates with standard errors, z values and p values,
the random-intercept variance, AIC/BIC and the convergence flag.
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": {
"formula": "<formula>",
"data": "<data>",
"groups": "<groups>"
},
"name": "mixed_lm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| reml | No | ||
| groups | Yes | ||
| formula | Yes | ||
| re_formula | No |