Cognitivemodels is an R packages that provides a number of cognitive models, using a formula interface similar to the aov- or lm-syntax. The models can be fit to data by maximum likelihood, minimum MSE, and more fit measures using optimization routines like rsolnp or Nelder-Mead, and various others. Also, the package provides a model development back end: a class that you can use to develop new cognitive models easily.


For new features in the latest package version, see NEWS.

Getting Started and Installation

To use this package, ensure you have a working installation of R and the Rcpp package, install.packages("Rcpp"), for problems see Installation Troubleshooting

    if (!require(pacman)) install.packages(pacman)
    update.package("matlib") # needed

You will see a prompt, please type Yes into the console.

    Do you want to install from sources the packages which need compilation? (Yes/no/cancel) 

(Optional) This installs the latest development version of the package:


To use the package:


Installation Troubleshooting

Here are some error messages during the installation and how to troubleshoot them:

Models in this Package

The following models are implemented:

Model | Reference | Documentation of the Function ------------ | ------------- | ------------- Memory-based preference model | Jarecki & Rieskamp (submitted) | ?mem Generalized context model | Medin & Schaffer (1976); Nosofsky (1986) | ?ebm Optimal risk-sensitive foraging model | Houston & McNamara (1988) | ?hm1988 Cumulative prospect theory | Kahneman & Tversky (1979); Tversky & Kahneman (1992) | ?cpt Bayesian cognitive model | Hoffart, Jarecki, Duthil, & Rieskamp (under review) | ?bayes Power utility | Tversky (1967); Wakker (2008)| ?utility_pow Soft-max choice rule | Sutton & Barto (1998) | ?softmax Arg-max choice rule | | ?argmax Epsilon-greedy choice rule | | ?epsilon Baseline model | | ?baseline Shortfall model | Andraszewicz (2014) | ?shortfall


Jana B. Jarecki, Florian I. Seitz


This project is licensed under CC-By Attribution 4.0 International

JanaJarecki/cogscimodels documentation built on Sept. 8, 2020, 7:28 p.m.