Logo

statsmodels.sandbox.stats.runs.cochran_q

statsmodels.sandbox.stats.runs.cochran_q(x)[source]

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.

what’s this ? Test that the number of successes is the same for each case. The alternative is that at least two treatements come from different populations.

Parameters:

x : array_like, 2d (N,k)

data with N cases and k variables

Returns:

q_stat : float

test statistic

pvalue : float

pvalue from the chisquare distribution

others ???? :

currently some test output, table and expected

Notes

not verified,

In Wikipedia terminology, rows are blocks and N should be large for the chisquare distribution to be a good approximation; columns are treatments. 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

Previous topic

statsmodels.sandbox.stats.runs.runstest_2samp

Next topic

statsmodels.sandbox.stats.runs.Runs

This Page