statsmodels.stats.contingency_tables.mcnemar¶
-
statsmodels.stats.contingency_tables.mcnemar(table, exact=
True, correction=True)[source]¶ McNemar 同质性检验。
- Parameters:¶
- tablearray_like
一个方形的列联表。
- exactbool
如果 exact 为 true,则将使用二项分布。 如果 exact 为 false,则将使用卡方分布,这是对于大样本量的检验统计量分布的近似。
- correctionbool
如果为真,则对卡方分布使用连续性校正(如果exact为假。)
- Returns:¶
注释
这是Cochran’s Q检验和同质性检验的一个特例。当使用卡方分布时,结果是相同的,除了连续性校正。
Last update:
Oct 16, 2024