Cochran’s Q test for identical effect of k treatments
Cochran’s Q is a k-sample extension of the McNemar test. If there are only two treatments, then Cochran’s Q test and McNemar test are equivalent.
Test that the probability of success is the same for each treatment. The alternative is that at least two treatments have a different probability of success.
Parameters : | x : array_like, 2d (N,k)
|
---|---|
Returns : | q_stat : float
pvalue : float
|
Notes
In Wikipedia terminology, rows are blocks and columns are treatments. The number of rows N, should be large for the chisquare distribution to be a good approximation. The Null hypothesis of the test is that all treatments have the same effect.
References
http://en.wikipedia.org/wiki/Cochran_test SAS Manual for NPAR TESTS