The samplr package: A tool for modeling human cognition with sampling algorithms

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 samplr 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.

Authors

Institutions

Publication Details

Journal
Behavior Research Methods
Published
2026-10-14
DOI
https://doi.org/10.3758/s13428-026-03188-6
Primary Topic
Cognitive Science and Education Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The samplr package: A tool for modeling human cognition with sampling algorithms

Yun-Xiao Li, Adam N. Sanborn, Lucas Castillo
1 links
Behavior Research Methods
Cognitive Science and Education Research
article

The samplr package: A tool for modeling human cognition with sampling algorithms

Yun-Xiao Li, Adam N. Sanborn, Lucas Castillo
article en

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 samplr 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.

Behavior Research MethodsVol. 58(11)
University of Warwick (GB)
Openalex Percentile: Top 99%
Cognitive Science and Education Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.