Modified McNemar Test

This paper proposes and presents a test statistic that intrinsically and structurally adjusts the usual McNemar test statistic for the possible presence of tied responses between the paired populations of cases and control subjects that may be measurements on any scale. The method also enables the researcher readily estimates not only the chances that among a random selected pair of case and control subjects the case responds positive and the control responds negative, or the case responds negative and the control responds positive, but also even when both case and control subjects have similar responses, it enables one easily estimate the probability that both respond positive or both respond negative. The proposed method, which is shown to be relatively more efficient and hence likely to be more powerful than the usual McNemar test statistic is illustrated with some data.


INTRODUCTION
The two sample statistical tests are used when the research interest is in determining whether there is statistical difference between two populations from which the samples are drawn. These two populations may be similar or independent, but our interest here is in when the two populations are related and not easily amenable to analysis using parametric methods because the data may not satisfy the necessary assumptions. Example of similar or related populations include those situations in which repeated measurements or observations are made on the same individuals or subjects at two different points in time or when individuals of similar characteristics are being compared [1,2]. For example, the subjects in the two populations may be the same individuals, except that they may have received one treatment, drug, procedure, or some exposure at one occasion and then received a different treatment, drug, procedure or exposure at a second occasion. The two populations may also be such that subjects are first paired or matched on some characteristics before the administration of a procedure of interest. In each case the population which has undergone treatment or procedure is compared with the population which has undergone the other treatment or procedure to ascertain whether the two populations are statistically different. McNemar has developed a non-parametric statistical method for this purpose [3]. In this paper, we briefly present McNemars's procedure and then propose its modification.
*Address corresponding to this author at the Department of Applied Statistics, Nnamdi Azikiwe University, Awka Nigeria; Tel: +238052563956; E-mail: cyprianoyeka@yahoo.com

THE McNEMAR TEST
The McNemar test for differences in responses in related or matched pairs is particularly used in study designs or experiments in which each subject serves as his own control or his own matched pair and in which measurements are in either nominal or ordinal scale. Thus it may be used to test the effectiveness of a particular treatment, drug, procedure, exposure or experience of a population of subjects. In each of these situations, subjects may serve as their own control because the experience or exposure by the subjects may be at two points in time or space. The observations being analyzed may be measurements on any scale.
To test the significance of any observed change using the McNemar test, one sets up a fourfold table of frequencies to represent the first and the second sets of responses from the same individuals. Thus suppose in a controlled clinical trial involving case and control subjects, each case is matched with a single control and the relative frequency of the outcome of interest among the cases is to be compared with that among the controls. Because of the matching of cases with controls, the proper unit of analysis is the matched pair rather than the individual subjects [4,5]. Results from such case-control studies are usually presented in a format as in Table 1 for use with the McNemar test.
In Table 1 there are altogether n=n.. pairs of casecontrol subjects studied. Of these n 11 are such that case and control subjects both respond positive; n 12 are such that the case responds positive and the control responds negative;n 21 are such that the case responds negative and the control responds positive; and n 22 are such that the case and control subjects both respond negative. The proportion of control subjects studied who respond positive is while the proportion of cases studied who respond positive is The difference between the proportions of case and control subjects who respond positive is which is independent of n 11 and n 22 the number of outcomes in which the case and control subjects both respond positive or both respond negative respectively. The standard error of the difference between the two proportion is Se( p 2 p 1 ) = n 12 + n 21 n (4) which is also unaffected by n 11 and n 22. If 1 and 2 are respectively the proportions of control and cases in the sampled populations who respond positive then a hypothesis that may be of interest is versus either a one-sided or two sided alternative hypothesis. The McNemar test statistic [3,6] for testing the null hypothesis of Eqn. 5 is (n 12 n 21 ) 2 n 12 + n 21 which has a chi-square distribution with 1 degree of freedom. The null hypothesis of equal population proportions is rejected at the level of significance in favour of the alternative hypothesis if

MODIFIED McNEMAR TEST
The McNemar test assumes that the data being analysed are frequency or count data measured on the norminal or ordinal scale of measurement already presented in summary form. However in controlled experiments like in many other studies involving data collection, the required data are not usually available in summary form, but mostly collected as raw data from the field which must be processed for subsequent summarization if necessary by the researcher. Also these data may be measurements on at least the interval scale that is they are quantitative rather than qualitative information and may furthermore be continuous data. This means that the probability of obtaining any tied observations is at least theoretically zero. However in practice ties do not occur. Just as the use of summary data leads to loss of information and hence loss of reliability in conclusions reached with the data, too many ties in the data if not adjusted for, also leads to reduction in the power of any test statistic used in data analysis.
Hence the following method may be used to modify the McNemar test statistic to allow for the possibility of ties in the data. Now let ( y i2 , y i1 ) be the responses or scores by the case and control subjects respectively for the ith pair of case and control subjects assumed to have been exposed to two possible experimental conditions or treatments T 2 and T 1 say respectively for i=1,2,..,n pairs of case and control subjects. We further assume that these measurements are at least on the interval scale.
For the ith pair of case and control subjects, for i=1,2,..,n.`

Let
where Now under these specifications the expected value of u i is 1 2 ) and the variance of u i Hence from Eqn 11 and 12, we have that the expected value of W is and from Eqn 13, we have that Note that + , 0 and are respectively the probabilities that for a randomly selected pair of case and control subjects, on the average the case responds positive and the control responds negative or the case and control both respond positive or both respond negative, or the case responds negative and the control responds positive. Their sample estimates are respectively and where f + , f 0 and f are respectively the number of 1's,0's and -1's in the frequency distribution of these numbers in u i ,i=1,2,…,n.In other words f + , f 0 and f are respectively the number of case and control subject pairs in which the case respond positive and the control respond negative, or the case and control subjects both respond positive or both respond negative or the case responds negative and the control subject responds positive. These frequencies can therefore be expressed in terms of the case and control frequency pairs of Table 1  are respectively the number of case and control subject pairs in which the case and control subjects both respond positive or both respond negative; with corresponding relative frequencies and respectively. Now + is a measure of the differential rate of positive responses by subjects in the experimental or treatment condition T 2 namely case, and standard condition T 1 namely control and its sample estimate is with estimated variance obtained from Eqn 15 as (20) Note that the square of W namely (21) is the numerator of the McNemar test statistic of Eqn 6. Now to develop a test statistic for the difference between positive response rates for case and control subjects we note that + is the proportion of pairs of subjects out of a total of n pairs in which the subject (case) administered treatment T 2 say in a given pair responds positive and the subject (control) in the pair administered treatment T 1 say, responds negative; 0 is the proportion of the total number of n pairs of subjects in which members of the pair both respond positive or both respond negative and is the proportion of pairs out of a total of 'n' pairs in which the subject (case) administered treatment T 2 in a given pair responds negative and the subject (control) in the pair administered treatment T 1 responds positive. The case and control differential positive response rate is + , whose sample estimate and variance are given respectively by Eqns 19 and 20.Note that in terms of the sampled proportion in Eqns 1 and 2 ( 2 4 ) such that ( 2 5 ) which provides more detailed and additional useful information. Now testing the null hypothesis H 0 that the proportions of subjects responding positive under the two experimental or treatment conditions T 2 and T 1 difer by some value 0 is equivalent to testing H 0 : The null hypothesis of Eqn 26 may be tested using the test statistic given by (27) or equivalently (28) which has approximately the chi-square distribution with 1 degree of freedom for sufficiently large 'n'.H 0 is rejected at the level of significance if Eqn 7 is satisfied, otherwise H 0 is accepted.
Note that under H 0 the numerators of the test statistic of Eqns 27 and 28 are as in the McNemar test statistic independent of n 11 = f 0+ and n 22 = f 0 the number of pairs in which case and control subjects in each pair both respond positive or both respond negative to the treatments of interest. The denominator of these Equations is also seen to be independent of n 11 and n 22 .Hence the proposed modified test statistic, like the McNemar test statistic is not affected by those pairs in which the subjects in each pair both respond positive or both respond negative to the treatments administered. However unlike the McNemar test statistic the present test statistic has nothing less by specifications been adjusted and corrected for the possible presence of ties in the data. Furthermore, the variance of the modified test statistic in Eqn.28 is smaller than the variance of the usual McNemar test statistic in Eqn 6. This is because from Eqns 20 and 4,we have that since Therefore, the modified test statistic is relatively more efficient and hence likely to be more powerful than the usual McNemar test statistic whenever case and control subjects have differential response rates to the treatments of interest. Note that is the reduction in the variance of the test statistic W due to the fact that this test statistic has by specifications been adjusted for the possible presence of ties in the data, that is for ties between the responses of case and control subjects. Thus in the presence of ties in the data, the McNemar test statistic is likely to have a larger estimated variance than the modified test statistic thereby yielding smaller calculated chi-square values and increasing the chances of accepting a false null hypothesis (Type II error) more frequently than the modified test statistic.

ILLUSTRATIVE EXAMPLE
A dietician is interested in comparing the effectiveness of a certain food ingredient T 2 (Treatment) with a standard food ingredient T 1 (control) in modulating body weight among subjects. She collected a random sample of 60 volunteer subjects. She matched these volunteers each with a single control of the same gender and comparable age. After measuring their initial body weights she then randomly assigned one member of each of the resulting 30 paired samples of subjects to the experimental treatment T 2 and the remaining member of the pair to the standard treatment or control T 1 . After the experimental period, she again measured the body weight of each member of the paired samples and thereafter determined the gain(+) or loss(-) in body weight of each member obtaining the following results ( Table 2) To apply the modified McNemar test, to the data of Table 2 we evaluate the values of u i of Eqn 8 where y i1 and y i2 are respectively the weight gains by the subjects in the ith pair of case and control subjects given the new (T 2 ) and standard (T 1 ) diet preparations. For i=1,2,…,30 the results are shown in Table 2

SUMMARY AND CONCLUSION
We have discussed briefly the McNemar test and proposed its modification which intrinsically and structurally adjusts the test statistic for the possible presence of tied responses between the sampled populations of case and control subjects which may be data on any scale of measurement. The proposed test statistic is shown to be more efficient and hence likely to be more powerful than the regular McNemar test statistic. The method also enables the researcher readily estimate not only the chances that among a randomly selected pair of case and control subjects, the case responds positive and the control responds negative; or the case responds negative and the control responds positive, but also even when both case and control subjects have similar responses, it enables one easily estimate the probability that both respond positive or both respond negative. The proposed method is illustrated with some data.
ACKNOWLEDGEMENT I wish to appreciate Okeh Uchechukwu for typesetting and proofreading this work before it was ready for submission to the journal.