Table2x2.symmetry()

statsmodels.stats.contingency_tables.Table2x2.symmetry

Table2x2.symmetry(method='bowker')

Test for symmetry of a joint distribution.

This procedure tests the null hypothesis that the joint distribution is symmetric around the main diagonal, that is

p_{i, j} = p_{j, i} for all i, j

Returns:

A bunch with attributes:

statistic : float

chisquare test statistic

p-value : float

p-value of the test statistic based on chisquare distribution

df : int

degrees of freedom of the chisquare distribution

See also

mcnemar, homogeneity

Notes

The implementation is based on the SAS documentation. R includes it in mcnemar.test if the table is not 2 by 2. However a more direct generalization of the McNemar test to larger tables is provided by the homogeneity test (TableSymmetry.homogeneity).

The p-value is based on the chi-square distribution which requires that the sample size is not very small to be a good approximation of the true distribution. For 2x2 contingency tables the exact distribution can be obtained with mcnemar

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.contingency_tables.Table2x2.symmetry.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部