SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Contacts SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Auxillary Chapter

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)*SUM[i=1 to c][(C(j) - N/c)**2/SUM[i=1 to 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 > CHSPPF 1-alpha,c-1

    where CHSPPF 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: Reference:
    "Practical Nonparametric Statistics", Third Edition, Wiley, 1999, pp. 250-256.
Applications:
    Analysis of Binary Two-Way Randomized Block Designs
Implementation Date:
    2005/12
Program:
     
     . Following example from p. 253 of Conovover
     READ Y1 Y2 Y3
     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 X1
     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 NON-PARAMETRIC TEST FOR RANDOMIZED COMPLETE BLOCK DESIGN
            FOR DICHOTOMOUS DATA
         
        1. STATISTICS
              NUMBER OF SUBJECTS (ROWS)           =       11
              NUMBER OF TREATMENTS                =        3
              COCHRAN TEST STATISTIC             =    2.800000
         
        2. PERCENT POINTS OF THE LARGE SAMPLE CHI-SQUARE REFERENCE DISTRIBUTION
           FOR COCHRAN TEST STATISTIC
              0          % POINT    =    0.000000
              50         % POINT    =    1.386294
              75         % POINT    =    2.772589
              90         % POINT    =    4.605170
              95         % POINT    =    5.991464
              99         % POINT    =    9.210342
              99.9       % POINT    =    13.81554
         
         
                 75.34030       % Point:     2.800000
         
        3. CONCLUSION (AT THE 5% LEVEL):
              THE        3 TREATMENTS HAVE EQUAL EFFECTS
        

Date created: 12/5/2005
Last updated: 12/5/2005
Please email comments on this WWW page to alan.heckert@nist.gov.