Stat Rm Correlation
stat_rm_correlationComputes a repeated-measures correlation to measure the within-subject association between two variables when each participant contributes multiple observations, avoiding the inflation of a standard Pearson correlation.
Instructions
Repeated-measures correlation — the correct correlation for within-subject data.
WHEN TO USE: whenever each participant contributes more than one observation and you want the association between x and y.
WHEN NOT TO USE: when each participant appears once — use stat_correlation.
Why it matters: a standard Pearson correlation on repeated measures is inflated by between-subject differences. rm_corr reports the within-subject association, which is usually the quantity of interest, and tests whether within- and between-subject slopes differ.
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>",
"x": "<x>",
"y": "<y>",
"subject": "<subject>"
},
"name": "stat_rm_correlation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| name | Yes | ||
| subject | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |