The samplr package: A tool for modeling human cognition with sampling algorithms
Authors:
Open Access
- 14 October 2026
- journal article
- Published by Springer Nature in Behavior Research Methods
- Vol. 58 (11) , 319
Abstract
Many models of cognition have sampling as a central component. Researchers have used them to explain human performance across a wide range of tasks involving perception, probability reasoning, and choice. One family of these models takes inspiration from sampling approaches developed in statistics, either by adjusting samples with prior beliefs or by implementing a sampling algorithm that overcomes the difficulty of independent samples at the expense of autocorrelation. While these models have been successful in modeling human behavior, their adoption has been slowed by the technical difficulties in applying them. Here, we introduce the package, which includes a variety of these algorithms and cognitive models built upon them. We show how models in this package can match qualitative patterns found in human data, and walk readers through examples of how to compare these models quantitatively to human data. This tool aims to make these methods accessible to many more researchers.Keywords
This publication has 83 references indexed in Scilit:
- Likelihood-Free Methods for Cognitive Science2018
- People’s conditional probability judgments follow probability theory (plus noise)Cognitive Psychology, 2016
- Explaining High Conjunction Fallacy Rates: The Probability Theory Plus Noise AccountJournal of Behavioral Decision Making, 2016
- Random Forests2008
- The simplest complete model of choice response time: Linear ballistic accumulationCognitive Psychology, 2008
- The conjunction fallacy and the many meanings of andCognition, 2008
- Perseverative Behavior and Adaptive Control in Older Adults: Performance Monitoring, Rule Induction, and Set ShiftingBrain and Cognition, 2002
- A generalized guided Monte Carlo algorithmPhysics Letters B, 1991
- Effects of alternating set for speed or accuracy on response time, accuracy and confidence in a unidimensional discrimination taskActa Psychologica, 1982
- Speed-accuracy tradeoff and information processing dynamicsActa Psychologica, 1977