Fits a (multi-attribute) probabilistic choice model by maximum likelihood.

eba(M, A = 1:I, s = rep(1/J, J), constrained = TRUE)

OptiPt(M, A = 1:I, s = rep(1/J, J), constrained = TRUE)

# S3 method for eba
summary(object, ...)

# S3 method for eba
anova(object, ..., test = c("Chisq", "none"))

Arguments

M

a square matrix or a data frame consisting of absolute choice frequencies; row stimuli are chosen over column stimuli

A

a list of vectors consisting of the stimulus aspects; the default is 1:I, where I is the number of stimuli

s

the starting vector with default 1/J for all parameters, where J is the number of parameters

constrained

logical, if TRUE (default), parameters are constrained to be positive

object

an object of class eba, typically the result of a call to eba

test

should the p-values of the chi-square distributions be reported?

...

additional arguments; none are used in the summary method; in the anova method they refer to additional objects of class eba.

Details

eba is a wrapper function for OptiPt. Both functions can be used interchangeably. See Wickelmaier and Schmid (2004) for further details.

The probabilistic choice models that can be fitted to paired-comparison data are the Bradley-Terry-Luce (BTL) model (Bradley, 1984; Luce, 1959), preference tree (Pretree) models (Tversky and Sattath, 1979), and elimination-by-aspects (EBA) models (Tversky, 1972), the former being special cases of the latter.

A represents the family of aspect sets. It is usually a list of vectors, the first element of each being a number from 1 to I; additional elements specify the aspects shared by several stimuli. A must have as many elements as there are stimuli. When fitting a BTL model, A reduces to 1:I (the default), i.e. there is only one aspect per stimulus.

The maximum likelihood estimation of the parameters is carried out by nlm. The Hessian matrix, however, is approximated by nlme::fdHess. The likelihood functions L.constrained and L are called automatically.

See group.test for details on the likelihood ratio tests reported by summary.eba.

Value

coefficients

a vector of parameter estimates

estimate

same as coefficients

logL.eba

the log-likelihood of the fitted model

logL.sat

the log-likelihood of the saturated (binomial) model

goodness.of.fit

the goodness of fit statistic including the likelihood ratio fitted vs. saturated model (-2logL), the degrees of freedom, and the p-value of the corresponding chi-square distribution

u.scale

the unnormalized utility scale of the stimuli; each utility scale value is defined as the sum of aspect values (parameters) that characterize a given stimulus

hessian

the Hessian matrix of the likelihood function

cov.p

the covariance matrix of the model parameters

chi.alt

the Pearson chi-square goodness of fit statistic

fitted

the fitted paired-comparison matrix

y1

the data vector of the upper triangle matrix

y0

the data vector of the lower triangle matrix

n

the number of observations per pair (y1 + y0)

mu

the predicted choice probabilities for the upper triangle

nobs

the number of pairs

Author

Florian Wickelmaier

References

Bradley, R.A. (1984). Paired comparisons: Some basic procedures and examples. In P.R. Krishnaiah & P.K. Sen (eds.), Handbook of Statistics, Volume 4. Amsterdam: Elsevier. doi: 10.1016/S0169-7161(84)04016-5

Luce, R.D. (1959). Individual choice behavior: A theoretical analysis. New York: Wiley.

Tversky, A. (1972). Elimination by aspects: A theory of choice. Psychological Review, 79, 281--299. doi: 10.1037/h0032955

Tversky, A., & Sattath, S. (1979). Preference trees. Psychological Review, 86, 542--573. doi: 10.1037/0033-295X.86.6.542

Wickelmaier, F., & Schmid, C. (2004). A Matlab function to estimate choice model parameters from paired-comparison data. Behavior Research Methods, Instruments, and Computers, 36, 29--40. doi: 10.3758/BF03195547

See also

Examples

data(celebrities) # absolute choice frequencies btl1 <- eba(celebrities) # fit Bradley-Terry-Luce model A <- list(c(1,10), c(2,10), c(3,10), c(4,11), c(5,11), c(6,11), c(7,12), c(8,12), c(9,12)) # the structure of aspects eba1 <- eba(celebrities, A) # fit elimination-by-aspects model summary(eba1) # goodness of fit
#> #> Parameter estimates: #> Estimate Std. Error z value Pr(>|z|) #> 1 0.223609 0.024875 8.989 < 2e-16 *** #> 2 0.121112 0.019596 6.181 6.39e-10 *** #> 3 0.087820 0.016368 5.365 8.08e-08 *** #> 4 0.040326 0.009573 4.212 2.53e-05 *** #> 5 0.016307 0.004648 3.508 0.000451 *** #> 6 0.040139 0.010089 3.979 6.93e-05 *** #> 7 0.036679 0.006549 5.601 2.13e-08 *** #> 8 0.093101 0.012080 7.707 1.29e-14 *** #> 9 0.143109 0.015352 9.322 < 2e-16 *** #> 10 0.071635 0.028935 2.476 0.013296 * #> 11 0.054775 0.009606 5.702 1.19e-08 *** #> 12 0.056997 0.011805 4.828 1.38e-06 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Model tests: #> Df1 Df2 logLik1 logLik2 Deviance Pr(>Chi) #> Overall 1 72 -763.65 -235.22 1056.85 <2e-16 *** #> EBA 11 36 -119.01 -103.93 30.17 0.218 #> Effect 0 11 -632.36 -119.01 1026.68 <2e-16 *** #> Imbalance 1 36 -131.29 -131.29 0.00 1.000 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> AIC: 260.03 #> Pearson X2: 30.05
plot(eba1) # residuals versus predicted values
anova(btl1, eba1) # model comparison based on likelihoods
#> Analysis of Deviance Table #> #> Model 1: btl1 #> Model 2: eba1 #> Resid. Df Resid. Dev Df Deviance Pr(>Chi) #> 1 28 78.217 #> 2 25 30.166 3 48.051 2.077e-10 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
confint(eba1) # confidence intervals for parameters
#> 2.5 % 97.5 % #> 1 0.174854396 0.27236420 #> 2 0.082705367 0.15951936 #> 3 0.055739133 0.11990028 #> 4 0.021563011 0.05908851 #> 5 0.007197446 0.02541694 #> 6 0.020365925 0.05991297 #> 7 0.023843491 0.04951395 #> 8 0.069424871 0.11677803 #> 9 0.113018925 0.17319861 #> 10 0.014924158 0.12834630 #> 11 0.035946311 0.07360305 #> 12 0.033860384 0.08013394
uscale(eba1) # utility scale
#> LBJ HW CDG JU CY AJF BB #> 0.21830768 0.14252010 0.11790307 0.07031851 0.05255887 0.07018075 0.06926518 #> ET SL #> 0.11098488 0.14796095
ci <- 1.96 * sqrt(diag(cov.u(eba1))) # 95% CI for utility scale values dotchart(uscale(eba1), xlim=c(0, .3), main="Choice among celebrities", xlab="Utility scale value (EBA model)", pch=16) # plot the scale
arrows(uscale(eba1)-ci, 1:9, uscale(eba1)+ci, 1:9, .05, 90, 3) # error bars
abline(v=1/9, lty=2) # indifference line
mtext("(Rumelhart and Greeno, 1971)", line=.5)
## See data(package = "eba") for application examples.