![]() | Content Disclaimer Copyright @2020. All Rights Reserved. |
Links : Home Index (Subjects) Contact StatsToDo |
Introduction
McNemar's Test
Sample Size & Power for McNemar's Test
R Codes
The data structure is as shown in the table to the right, where columns represents before and rows represents after.
Example We are going to study whether a major speech by the leader of a political party will affect the voting intentions of the public. We recruited 250 subjects, and recorded their voting intensions before and after the speech. There were 130 subjects who intended to vote against the party before the speech, 45 (18% of the total) of them changed their voting intension towards favouring the party after the speech. There were 120 subjects who intended to vote for the party before the speech, 24 (9,6% of the total) of them changed their voting intension to against the party after the speech. we found Chi Square = 5.8, df = 1, p=0.02. This indicates that the speech was effective in changing voting intensions towards favouring the party. Reference: Siegel S and Castellan Jr. N J (1988) Nonparametric Statistics for the Behavioral Sciences 2nd. Ed. McGraw Hill, Inc. Boston Massachusetts. ISBN 0-07-057357-3 p 75 Sample Size and PowerSample size for the McNemar's test estimates the number of pairs (befre and after) required for anticipated p1 (proportion of cases that will switch one way (+ to -) and p2 (proportion of cases that will switch the other way (- to +). The other parameters are Type I error (α) and power (1-β).Power estimation is the reverse of sample size. It estimate the power of the observed given α, sample size (the total number of pairs in the data), p1 and p2 observed Reference: Machin D, Campbell M, Fayers, P, Pinol A (1997) Sample Size Tables for Clinical Studies. Second Ed. Blackwell Science IBSN 0-86542-870-0 p. 70 - 71 |