FAQ/mcnequiv - CBU statistics Wiki

You can't save spelling words.

Clear message
location: FAQ / mcnequiv

Equivalence test for McNemar's test

McNemar's test is described in the Categorical Data talk here.

δ represents the true difference p10-p01 where pij = P(time 1 = i, time 2 = j) for dichotomous responses measured on each subject at times 1 and 2.

H0: δ -t or δ t

HA: -t δ t

Time 2

-

+

Time 1

-

n00

n01

+

n10

n11

The R code uses the formulae of Wellek (2003) to test if the observed difference in proportions provides sufficient evidence to say that there is a relationship between times 1 and 2 by comparing the difference in proportions to a specified criterion difference 'tdel' between 0 and 1.

p01 and p10 are estimated using the inputted observed frequencies n01 and n10 from a sample of size, n. Type II error is beta (usually 0.05).

If ind equals 1 then we reject nonequivalence so -t δ t otherwise we accept the null hypothesis for the given type II error, beta.

[TYPE INTO R THE DESIRED INPUTS N, DELTA, N10, N01 AND BETA USING VALUES IN FORM BELOW].

n <- 72
tdel <- 0.20
n10 <- 5
n01 <- 4 
beta <- 0.05

[THEN COPY AND PASTE THE BELOW INTO R]

tstat <- (sqrt(n)*abs((n10-n01))) / sqrt(n*(n10+n01) - (n10-n01)^2 ) 
nc <- n^(3)*tdel^2 / (n*(n10+n01) - (n10-n01)^2)
cv <- sqrt(qchisq(p=beta,df=1,ncp=nc))
ind <- 0
if (tstat < cv) ind = 1
print(ind)

Reference

Wellek S (2003) Testing statistical hypotheses of equivalence. Chapman & Hall/CRC Press.

None: FAQ/mcnequiv (last edited 2013-03-08 10:17:10 by localhost)