Stat Correlation
stat_correlationComputes Pearson, Spearman, Kendall, or robust correlations between two continuous variables and reports r or rho with confidence intervals, helping assess linear or monotonic association.
Instructions
Correlation between two continuous variables.
WHEN TO USE
pearson: both continuous, relationship linear, no severe outliers.
spearman: ordinal data, monotonic but non-linear relationships, or outliers.
kendall: small n with many ties.
percbend / shepherds / bicor: robust alternatives when outliers are a concern.
WHEN NOT TO USE
Repeated measurements on the same participants →
stat_rm_correlation; a plain correlation is inflated by between-subject variance.To establish agreement between two measurement methods →
stat_plot_blandaltman; correlation measures association, not agreement.To claim "no relationship" from a non-significant r → check
stat_distance_correlation, which detects non-linear dependence.
Always report r (or rho) with its CI, not just the p-value.
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>"
},
"name": "stat_correlation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| name | Yes | ||
| method | No | pearson | |
| alternative | No | two-sided |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |