Number of circular triads and coefficient of consistency.

circular(mat, alternative = c("two.sided", "less", "greater"),
         exact = NULL, correct = TRUE, simulate.p.value = FALSE,
         nsim = 2000)

Arguments

mat

a square matrix or a data frame consisting of (individual) binary choice data; row stimuli are chosen over column stimuli

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "less" or "greater"

exact

a logical indicating whether an exact p-value should be computed

correct

a logical indicating whether to apply continuity correction in the chi-square approximation for the p-value

simulate.p.value

a logical indicating whether to compute p-values by Monte Carlo simulation

nsim

an integer specifying the number of replicates used in the Monte Carlo test

Details

Kendall's coefficient of consistency, $$zeta = 1 - T/T_{max},$$ lies between one (perfect consistency) and zero, where T is the observed number of circular triads, and the maximum possible number of circular triads is \(T_{max} = n(n^2 - 4)/24\), if \(n\) is even, and \(T_{max} = n(n^2 - 1)/24\) else, and \(n\) is the number of stimuli or objects being judged. For details see Kendall and Babington Smith (1940) and David (1988).

Kendall (1962) discusses a test of the hypothesis that the number of circular triads T is different (smaller or greater) than expected when choosing randomly. For small \(n\), an exact p-value is computed, based on the exact distributions listed in Alway (1962) and in Kendall (1962). Otherwise, an approximate chi-square test is computed. In this test, the sampling distribution is measured from lower to higher values of T, so that the probability that T will be exceeded is the complement of the probability for chi2. The chi-square approximation may be incorrect if \(n < 8\) and is only available for \(n > 4\).

Value

T

number of circular triads

T.max

maximum possible number of circular triads

T.exp

expected number of circular triads \(E(T)\) when choices are totally random

zeta

Kendall's coefficient of consistency

chi2, df, correct

the chi-square statistic and degrees of freedom for the approximate test, and whether continuity correction has been applied

p.value

the p-value for the test (see Details)

simulate.p.value, nsim

whether the p-value is based on simulations, number of simulation runs

References

Alway, G.G. (1962). The distribution of the number of circular triads in paired comparisons. Biometrika, 49, 265--269. doi: 10.1093/biomet/49.1-2.265

David, H. (1988). The method of paired comparisons. London: Griffin.

Kendall, M.G. (1962). Rank correlation methods. London: Griffin.

Kendall, M.G., & Babington Smith, B. (1940). On the method of paired comparisons. Biometrika, 31, 324--345. doi: 10.1093/biomet/31.3-4.324

See also

Examples

# A dog's preferences for six samples of food # (Kendall and Babington Smith, 1940, p. 326) dog <- matrix(c(0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0), 6, 6, byrow=TRUE) dimnames(dog) <- setNames(rep(list(c("meat", "biscuit", "chocolate", "apple", "pear", "cheese")), 2), c(">", "<")) circular(dog, alternative="less") # moderate consistency
#> #> Circular triads (intransitive cycles) #> #> T = 5, max(T) = 8, E(T) = 5, zeta = 0.375, p-value = 0.5093 #> alternative hypothesis: T is smaller than expected by chance #>
subset(strans(dog)$violdf, !wst) # list circular triads
#> triple perm p12 p23 p13 wst mst sst #> 7 2 meat.biscuit.apple 1 1 0 FALSE FALSE FALSE #> 25 5 meat.chocolate.apple 1 1 0 FALSE FALSE FALSE #> 44 8 meat.pear.apple 1 1 0 FALSE FALSE FALSE #> 50 9 meat.cheese.apple 1 1 0 FALSE FALSE FALSE #> 91 16 biscuit.pear.cheese 1 1 0 FALSE FALSE FALSE