Learn R Programming

eba (version 1.5-2)

eba: Elimination-By-Aspects (EBA) Models

Description

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

Usage

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 class 'eba': summary(object, \dots)

## S3 method for class 'eba': anova(object, \dots, 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.

Value

  • estimatea vector of parameter estimates
  • sea vector of standard errors of the parameter estimates
  • ci95a vector of 95% confidence intervals for the parameters
  • logL.ebathe log-likelihood of the fitted model
  • logL.satthe log-likelihood of the saturated (binomial) model
  • goodness.of.fitthe 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.scalethe u-scale of the stimuli; one u-scale value is defined as the sum of aspect values (parameters) that characterize a given stimulus
  • hessianthe Hessian matrix of the likelihood function
  • cov.pthe covariance matrix of the model parameters
  • chi.altthe Pearson chi-square goodness of fit statistic
  • fittedthe fitted paired-comparison matrix
  • y1the data vector of the upper triangle matrix
  • y0the data vector of the lower triangle matrix
  • nthe number of observations per pair (y1 + y0)
  • muthe predicted choice probabilities for the upper triangle

Details

eba is a wrapper function for OptiPt. Both functions can be used interchangeably.

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

A 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 parameter values is carried out by nlm. The Hessian matrix, however, is approximated by fdHess{nlme}. The likelihood functions L.constrained and L are called automatically.

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

References

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.

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.

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

Tversky, A., & Sattath, S. (1979). Preference trees. Psychological Review, 86, 542--573.

See Also

strans, cov.u, wald.test, group.test, plot.eba, residuals.eba, logLik.eba, kendall.u, circular, thurstone, nlm.

Examples

Run this code
data(celebrities)                     # absolute choice frequencies
btl1 <- eba(celebrities)              # fit a 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 a preference tree model

summary(eba1)      # goodness of fit
plot(eba1)         # residuals versus predicted values
anova(btl1, eba1)  # model comparison based on likelihoods

ci <- 1.96 * sqrt(diag(cov.u(eba1)))    # 95\% CI for preference scale values
a <- barplot(eba1$u, ylim = c(0, .35))  # plot the scale
arrows(a, eba1$u-ci, a, eba1$u+ci, .05, 90, 3)  # error bars

Run the code above in your browser using DataLab