Stat Chi2 Mcnemar
stat_chi2_mcnemarRuns McNemar's test to compare paired categorical outcomes, such as before/after or matched-pair data, by analyzing discordant pairs and returning the test statistic and p-value.
Instructions
McNemar's test — paired categorical data (before/after, matched pairs, twins).
WHEN TO USE: the same units contribute a categorical value under two conditions (pre/post intervention, two raters, matched pairs).
WHEN NOT TO USE: for independent groups — use stat_chi2_independence.
Only the two discordant cells contribute to the statistic.
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_chi2_mcnemar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| name | Yes | ||
| correction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |