Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danheck/multinomineq
Multinomial models with linear inequalities
https://github.com/danheck/multinomineq
Last synced: 27 days ago
JSON representation
Multinomial models with linear inequalities
- Host: GitHub
- URL: https://github.com/danheck/multinomineq
- Owner: danheck
- Created: 2018-08-21T15:52:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T00:48:53.000Z (9 months ago)
- Last Synced: 2024-09-25T23:10:38.568Z (about 1 month ago)
- Language: R
- Size: 2.4 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/multinomineq)](https://cran.r-project.org/package=multinomineq)
[![R-CMD-check](https://github.com/danheck/multinomineq/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/danheck/multinomineq/actions/workflows/R-CMD-check.yaml)
[![Coverage status](https://codecov.io/gh/danheck/multinomineq/branch/master/graph/badge.svg)](https://codecov.io/github/danheck/multinomineq?branch=master)
[![License](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![monthly downloads](https://cranlogs.r-pkg.org/badges/multinomineq)](https://cranlogs.r-pkg.org/badges/multinomineq)
[![total downloads](https://cranlogs.r-pkg.org/badges/grand-total/multinomineq)](https://cranlogs.r-pkg.org/badges/grand-total/multinomineq)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:* Heck, D. W., & Davis-Stober, C. P. (2019). Multinomial models with linear
inequality constraints: Overview and improvements of computational methods
for Bayesian inference. *Journal of Mathematical Psychology, 91*, 70-87.
https://doi.org/10.1016/j.jmp.2019.03.004
* Preprint version: https://arxiv.org/abs/1808.07140
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`:
```
vignette('multinomineq_intro')
```The vignette is also available .
## Installation
The package `multinomineq` can directly be installed from CRAN via:
```
install.packages("multinomineq")
```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:
install.packages("devtools","RcppArmadillo","RcppProgress",
"Rglpk", "quadprog", "RcppXPtrUtils")### install from Github:
devtools::install_github("danheck/multinomineq")
```To transform between the vertex (V) and the inequality (A*x=4.0.0.
For older R versions, the precompiled package can be installed via:
```
install.packages("rPorta", repos = "https://danheck.github.io/drat/")
```## 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](https://cran.r-project.org/bin/windows/Rtools/) and
[Xcode Command Line Tools](https://www.maketecheasier.com/install-command-line-tools-without-xcode/), 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`](http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/)):```
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 /
```