pcX {eba}R Documentation

Paired-Comparison Design Matrix

Description

Computes a paired-comparison design matrix.

Usage

pcX(nstimuli)

Arguments

nstimuli number of stimuli in the paired-comparison design

Details

The design matrix can be used when fitting a Bradley-Terry-Luce (BTL) model or a Thurstone-Mosteller (TM) model by means of glm.

See Critchlow & Fligner (1991) for more details.

Value

A matrix having (nstimuli-1)*nstimuli/2 rows and nstimuli columns.

References

Critchlow, D.E., & Fligner, M.A. (1991). Paired comparison, triple comparison, and ranking experiments as generalized linear models, and their implementation in GLIM. Psychometrika, 56, 517–533.

See Also

eba, thurstone, glm, balanced.pcdesign, linear2btl.

Examples

data(celebrities)        # absolute choice frequencies
btl <- eba(celebrities)  # fit BTL model using eba
summary(btl)

y1 <- t(celebrities)[lower.tri(celebrities)]
y0 <- celebrities[lower.tri(celebrities)]

## Fit BTL model using glm
btl.glm <- glm(cbind(y1, y0) ~ pcX(9) - 1, binomial)
summary(btl.glm)  # BTL model does not fit these data!

## Fit Thurstone Case V model using glm
tm.glm <- glm(cbind(y1, y0) ~ pcX(9) - 1, binomial(probit))
summary(tm.glm)   # neither fits the TM model

[Package eba version 1.5-2 Index]