Cognitivemodels: An R Package for Formal Cognitive Modeling
Date Issued
2020-01-01
Author(s)
DOI
10.31234/osf.io/6kb4w
Abstract
We introduce cognitivemodels-a free software package for formal cognitive modeling in the statistical programming environment R. The package offers novice modelers a collection of models and offers experienced modelers a backend for model development. This paper introduces the syntax of the package by example. The models in the software package include, for instance, the generalized context model for categorization (Nosofsky, 1986), cumulative prospect theory for risky choice (Tversky & Kahneman, 1992), and a Bayesian probability learning model. The package allows modelers to estimate model parameters and to constrain parameters by box constraints and equality constraints; it also allows to select choice rules such as soft maximum, epsilon greedy, or Luce's rule. It further offers modelers a selection of goodness of fit measures such as a binomial or normal log likelihood and meansquared error, and a selection of 22 numeric optimization routines for parameter estimation. We believe this software package may facilitate the usage and testing of formal cognitive theories and may increase the robustness of cognitive modeling.