Cochran's Q Test
See Also
Cochran's Q test is an extension to the McNemar test for related samples that provides a method for testing for differences between three or more matched sets of frequencies or proportions. The matching samples can be based on k characteristics of N individuals that are associated with the response. Alternatively N individuals may be observed under k different treatments or conditions (e.g. different questions or one question at different times).

The data must be supplied as dichotomous variables containing 0 to represent failure (or absence), and 1 to represent success (or presence). The variables can be stored in separate variates, or alternatively, all the data can be stored in a single variate, with a factor to indicate which variable is recorded in each unit of the variate. Note that it is assumed the individuals are recorded in the same order for each variable.

In its original form, Cochran's Q test leads to a chi-square test. However, this may be inaccurate when there are small numbers of subjects or samples. Therefore, the menu also provides an exact probability (based on the exact distribution of Q under a permutation model). For further details of the methods see QCOCHRAN.

Data Arrangement

The data can be supplied either as a list of variates or as a single variate with a factor defining the groups.
List of VariatesThe variables must be supplied as a list of variates, whose names should be entered in the List of Data box
One Variate with GroupsThe data must be supplied in one variate, specified as the Data Set. Membership of the different samples is then indicated by the Groups factor

Data

A variate containing dichotomous data containing 0 to represent failure (or absence), and 1 to represent success (or presence) for all variables.

Groups

A factor specifying the groups for the different variables.

List of Data

For multiple data this allows you to specify two or more variates containing dichotomous data for the different variables. Multiple selections can be transferred from the Available data list by clicking the button.

Method

Specifies the form of the test. This can be set to either Chi-square or Exact. Alternatively, the setting Automatic can be selected to let GenStat automatically use an appropriate test. When this is selected an exact test will be used if the number of values in the samples is less than 4 and the product of this value with the number of samples is less than 24, otherwise the Chi-square method will be used.

Available Data

List variates and factors that can be used to supply the data sets and groups. The contents may change as you move from one input field to another, so that appropriate types of data structure are listed. Double-click on a name to copy it into the current input field; alternatively you can enter the name directly using the keyboard.

See Also