A common explanation of many human behaviours is that people internally generate a small number of examples (i.e., samples) which they use to make judgments, estimates, etc. Behaviours, then, should depend both on how those samples are acquired and on how they are used. The SAMPLING project investigated whether people the way in which people generate samples can be described by one of a family of local sampling algorithms called Markov Chain Monte Carlo (MCMC). An initial model, the Bayesian Sampler (ABS, Zhu, Sanborn, and Chater 2020), uses iid samples for probability judgments and a later model, the Autocorrelated Bayesian Sampler (ABS, Zhu et al. 2024) used MCMC samples to explain probability judgments as well as choices, confidence judgments, response times, estimates, and confidence intervals.
The samplr
package includes the BS and ABS models, so
that they can easily be applied to new data. It also provides provide
functions that produce samples using a variety of MCMC algorithms, as
well as diagnostic tools to compare human data to the performance of
these sampling algorithms.
We provide six MCMC algorithms that have previously been compared to human data (Castillo et al. 2024; Spicer et al. 2022a, 2022b; Zhu et al. 2022). For an introduction on how to use these see the How to Sample vignette, which covers most use cases. If you want to use them in multivariate mixture distributions or with custom functions, see the Multivariate Mixtures and Custom Density Functions vignettes respectively.
We provide several diagnostic tools to compare human data to MCMC algorithms (listed in the Reference section).