Dataplot Vol 1 Vol 2

# COCHRAN TEST

Name:
COCHRAN TEST
Type:
Analysis Command
Purpose:
Perform a Cochran test that c treatments have identical effects.
Description:
The Cochran test is a non-parametric test for analyzing randomized complete block designs where the response variable is a binary variable (i.e., there are only two possible outcomes, which are coded as 0 and 1).

The Cochran test assumes that there are c experimental treatments (c >= 2). The observations are arranged in r blocks, that is

Treatment
Block 1 2 ... c
1 X11 X12 ... X1c
2 X21 X22 ... X2c
3 X31 X32 ... X3c
... ... ... ... ...
r Xr1 Xr2 ... Xrc

The Friedman test is the usual non-parametric test for this kind of design. The Cochran test is applied for the special case of a binary response variable (i.e., it can have only one of two possible outcomes).

Then the Cochran test is

 H0: The treatments are equally effective. Ha: There is a difference in effectiveness among treatments. Test Statistic: The Cochran test statistic is $$T = c(c-1) \frac{\sum_{i=1}^{c}{(C_j - \frac{N}{c})^2}} {\sum_{i=1}^{r}{R_i(c - R_i)}}$$ with c, Ci r, Ri and N denoting the number of treatments, the column total for the ith treatment, the number of blocks, the row total for the ith block, and the grand total, respectively. Significance Level: $$\alpha$$ Critical Region: T > $$\chi_{1-\alpha,c-1}^{2}$$ where $$\chi^{2}$$ is the chi-square percent point function. Note that this is based on a large sample approximation. In particular, it assumes that r is "large". Conclusion: Reject the null hypothesis if the test statistic is in the critical region.

Syntax:
COCHRAN TEST <y> <block> <treat>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<block> is a variable that identifies the block;
<treat> is a variable that identifies the treatment;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
COCHRAN TEST Y BLOCK TREATMENT
COCHRAN TEST Y X1 X2
COCHRAN TEST Y BLOCK TREATMENT SUBSET BLOCK > 2
Note:
In Dataplot, the variables should be given as:

Y BLOCK TREAT

X11 1 1
X12 1 2
... 1 ...
X1c 1 c
X21 2 1
X22 2 2
... 2 ...
X2c 2 c
... ... ...
Xr1 r 1
Xr2 r 2
... r ...
Xrc b c

If your data are in a format similar to that given in the DESCRIPTION section (i.e., you have colums Y1 to Yc, each with r rows), you can convert it to the format required by Dataplot with the commands:

LET NTREAT = 5
LET NBLOCK = SIZE Y1
LET NTOTAL = K*NBLOCK
LET BLOCK = SEQUENCE 1 1 NBLOCK FOR I = 1 1 NTOT
LET Y2 TREAT= STACK Y1 Y2 Y3 Y4 Y5
COCHRAN TEST Y2 BLOCK TREAT
Note:
The Cochran test is based on the following assumptions:

1. The blocks were randomly selected from the population of all possible blocks.

2. The outcomes of the treatments can be coded as binary responses (i.e., a "0" or "1") in a way that is common to all treatments within each block.
Note:
The case where there are exactly two treatments is equivalent to the McNemar test. The McNemar test is equivalent to a two-tailed sign test.
Note:
If the Cochran test rejects the null hypothesis of equally effective treatments, pairwise multiple comparisons can be made by applying the Cochran test on the two treatments of interest. For example, to test treatments 3 and 5, you can do something like the following

COCHRAN TEST Y BLOCK TREATMENT SUBSET TREATMENT = 3 5
Default:
None
Synonyms:
None
Related Commands:
 FRIEDMAN TEST = Perform a Friedman test. KRUSKAL WALLIS TEST = Perform a Kruskal Wallis test. ANOVA = Perform an analysis of variance. SIGN TEST = Perform a sign test. MEDIAN POLISH = Carries out a robust ANOVA. T TEST = Carries out a t test. RANK SUM TEST = Perform a rank sum test. SIGNED RANK TEST = Perform a signed rank test.
Reference:
Conover (1999), "Practical Nonparametric Statistics", Third Edition, Wiley, pp. 250-256.
Applications:
Analysis of Binary Two-Way Randomized Block Designs
Implementation Date:
2005/12
Program:

. Following example from p. 253 of Conover
1 1 1
1 1 1
0 1 0
1 1 0
0 0 0
1 1 1
1 1 1
1 1 0
0 0 1
0 1 0
1 1 1
1 1 1
END OF DATA
LET N1 = SIZE Y1
LET NTOT = 3*N1
LET BLOCK = SEQUENCE 1 1 N1 FOR I = 1 1 NTOT
LET Y TREAT = STACK Y1 Y2 Y3
COCHRAN Y BLOCK TREAT

This example generates the following output

Cochran Test for Two-Way Randomized Complete Block Designs
(Dichotomous Data)

Response Variable: Y
First Group-ID Variable: BLOCK
Second Group-ID Variable: TREAT

H0: Treatments Have Identical Effects
Ha: Treatments Do Not Have Identical Effects

Summary Statistics:
Total Number of Observations:                36
Number of Blocks:                            12
Number of Treatments:                        3

Test:
Cochran Test Statistic:                        2.800000
CDF of Test Statistic:                        0.7534030
P-Value:                                      0.2465970

Percent Points of the Chi-Square Reference Distribution
-----------------------------------
Percent Point               Value
-----------------------------------
0.0    =          0.000
50.0    =          1.386
75.0    =          2.773
90.0    =          4.605
95.0    =          5.991
97.5    =          7.378
99.0    =          9.210
99.9    =         13.816

Conclusions (Upper 1-Tailed Test)
----------------------------------------------
Alpha    CDF   Critical Value     Conclusion
----------------------------------------------
10%    90%            4.605      Accept H0
5%    95%            5.991      Accept H0
2.5%  97.5%            7.378      Accept H0
1%    99%            9.210      Accept H0


NIST is an agency of the U.S. Commerce Department.

Date created: 12/5/2005
Last updated: 10/13/2015