mcnemarQ: McNemar's test

View source: R/cata.R

mcnemarQR Documentation

McNemar's test

Description

Pairwise tests are conducted using the two-tailed binomial test. These tests can be conducted after Cochran's Q test.

Usage

mcnemarQ(X, quiet = FALSE, digits = getOption("digits"))

Arguments

X

matrix of I assessors (rows) and J products (columns) where values are 0 (not checked) or 1 (checked)

quiet

if FALSE (default) then it prints information related to the test; if TRUE it returns only the test statistic (Q)

digits

for rounding

Value

Test results for all McNemar pairwise tests conducted via the binomial test

Author(s)

J.C. Castura

References

Cochran, W.G. (1950). The comparison of percentages in matched samples. Biometrika, 37, 256-266. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2332378")}

McNemar, Q. (1947). Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2), 153-157. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02295996")}

Meyners, M., Castura, J.C., & Carr, B.T. (2013). Existing and new approaches for the analysis of CATA data. Food Quality and Preference, 30, 309-319, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.foodqual.2013.06.010")}

See Also

cochranQ

Examples

data(bread)

# McNemar's exact pairwise test for all product pairs
# on the first 50 consumers and the first attribute ("Fresh")
mcnemarQ(bread$cata[1:50, , 1])

# Same, returning only results for the first 4 attributes
(res <- apply(bread$cata[1:50, , 1:4], 3, mcnemarQ, quiet=TRUE, simplify=FALSE))

cata documentation built on April 4, 2025, 5:17 a.m.

Related to mcnemarQ in cata...