cochranQ {cata}R Documentation

Cochran's Q test

Description

Calculate Cochran's Q test statistic. The null hypothesis that is assumed is that product proportions are all equal. The alternative hypothesis is that product proportions are not all equal.

Usage

cochranQ(X, na.rm = TRUE, 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)

na.rm

should NA values be removed?

quiet

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

digits

significant digits (to display)

Value

Q test statistic

References

Cochran, W. G. (1950). The comparison of percentages in matched samples. Biometrika, 37, 256-266.

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, doi:10.1016/j.foodqual.2013.06.010

See Also

mcnemarQ

Examples

data(bread)

# Cochran's Q test on the first 25 consumers on the first attribute ("Fresh")
cochranQ(bread$cata[1:25,,1])

[Package cata version 0.1.0.5 Index]