Multinomial models with linear inequalities
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
inst/include
man-roxygen
man
src
tests
.Rbuildignore
.gitignore
DESCRIPTION
NAMESPACE
README.md
multinomineq.Rproj

README.md

R package multinomineq

Implements Gibbs sampling and Bayes factors for multinomial models with convex, linear-inequality constraints on the probability parameters. This includes models that predict a linear order of binomial probabilities (e.g., p1 < p2 < p3 < .50) and mixture models, which assume that the parameter vector p must be inside the convex hull of a finite number of vertices. Inequality-constrained multinomial models have applications in the area of judgment and decision making to fit and test random utility models (Regenwetter, M., Dana, J., & Davis-Stober, C. P. (2011). Transitivity of preferences. Psychological Review, 118, 42–56, doi:10.1037/a0021150) or to perform outcome-based strategy classification (i.e., to select the strategy that provides the best account for a vector of observed choice frequencies; Heck, D. W., Hilbig, B. E., & Moshagen, M. (2017). From information processing to decisions: Formalizing and comparing probabilistic choice models. Cognitive Psychology, 96, 26–40. doi:10.1016/j.cogpsych.2017.05.003).

Details and Citation

The following paper provides a detailed description of the implemented methods:

  • Heck, D. W., & Davis-Stober, C. P. (2018). Multinomial models with linear inequality constraints: Overview and improvements of computational methods for Bayesian inference. Manuscript submitted for publication. Retrieved from https://arxiv.org/abs/1808.07140

If you use multinomineq in publications, please cite the paper above or the R package:

Installation

To get the most recent version of multinomineq, the package can directly be installed from GitHub via:

# install.packages("devtools", "RcppArmadillo", "RcppProgress",
#                  "Rglpk", "quadprog")
devtools::install_github("danheck/multinomineq")

Note that the pacakge rPorta is required to transform between the vertex (V) and the inequality (A*x<b) representation of a poyltope. The package is available on GitHub here: https://github.com/TasCL/rPorta

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 http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /