Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

License Build Status Coverage status

R package multinomineq

Implements Gibbs sampling and Bayes factors for multinomial models with linear inequality constraints on the vector of probability parameters. As special cases, the model class includes models that predict a linear order of binomial probabilities (e.g., p[1] < p[2] < p[3] < .50) and mixture models assuming that the parameter vector p must be inside the convex hull of a finite number of predicted patterns (i.e., vertices).

Inequality-constrained multinomial models have applications in multiple areas in psychology and beyond:

  • Risky decisions between different gambles to test choice axioms such as transitivity (Regenwetter et al., 2012, 2014).
  • Outcome-based strategy classification of multiattribute decision strategies such as take-the-best (TTB) or weighted additive (WADD; Bröder & Schiffer, 2003; Heck et al., 2017).
  • Testing deterministic axioms of measurement and choice (Karabatsos, 2005; Myung et al., 2005).
  • Fitting and testing nonparametric item response theory models (Karabatsos & Sheu, 2004).
  • Order-constrained contingency tables (Klugkist et al., 2007, 2010).
  • Testing stochastic dominance of response time distributions (Heathcote et al., 2010).
  • Cognitive diagnostic assessment (Klugkist et al., 2007, 2010).

References and Vignette

A formal definition of inequality-constrained multinomial models and the implemented computational methods for Bayesian inference is provided in:

Please cite this paper if you use multinomineq in publications.

The package vignette provides a short introduction of how to apply the main functions of multinomineq:


The vignette is also available


The package multinomineq can directly be installed from CRAN via:


Alternatively, if developer tools for R are installed (see instructions below), the most recent version of multinomineq can also be installed from GitHub via:

### install dependencies:
                 "Rglpk", "quadprog", "RcppXPtrUtils")

### install from Github:

To transform between the vertex (V) and the inequality (A*x<b) representation of a poyltope, it is necessary to install the pacakge rPorta. The package is available on GitHub ( or as a precompiled package via:

install.packages("rPorta", repos = "")

Compilation of Source Packages

On Linux, GLPK libraries have to be installed via the console:

sudo apt-get install libglpk-dev

To compile C++ code, Windows and Mac require Rtools and Xcode Command Line Tools, respectively. Moreover, on Mac, it might be necessary to install the library gfortran manually by typing the following into the console (required to compile the package RcppArmadillo):

curl -O
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /


Multinomial models with linear inequalities



No releases published


No packages published