This is the parent R6 class of the Auto-correlated Bayesian Sampler (ABS, Zhu et al. 2024) . It is a sequential sampling model assuming people draw autocorrelated samples from memory or beliefs, i.e., posterior of hypotheses.

References

Zhu J, Sundh J, Spicer J, Chater N, Sanborn AN (2024). “The Autocorrelated Bayesian Sampler: A Rational Process for Probability Judgments, Estimates, Confidence Intervals, Choices, Confidence Judgments, and Response Times.” Psychological Review, 131(2), 456–493. doi:10.1037/rev0000427 .

Public fields

n_chains

an integer of the number of chains for the sampler.

nd_time

a numeric value of the non-decision time (in seconds).

s_nd_time

a numeric value of the inter-trial-variability of the non-decision time (in seconds).

distr_name

a character string indicating the type of the posterior hypothesis distribution.

distr_params

a numeric vector of the additional parameters for the posterior hypothesis distribution.

custom_distr

a list of functions that define the posterior hypothesis distribution.

custom_start

a numeric value of the starting point if "custom_distr" is provided.

sim_results

a data frame for saving the simulation results.

Methods


Method new()

Create a new 'CoreABS' object.

Usage

CoreABS$new(
  n_chains,
  nd_time,
  s_nd_time,
  distr_name = NULL,
  distr_params = NULL,
  custom_distr = NULL,
  custom_start = NULL
)

Arguments

n_chains

an integer of the number of chains for the sampler.

nd_time

a numeric value of the non-decision time (in seconds).

s_nd_time

a numeric value of the inter-trial-variability of the non-decision time (in seconds).

distr_name

a character string indicating the type of the posterior hypothesis distribution. The package currently only supports norm, which represents normal distribution.

distr_params

a numeric vector of the additional parameters for the posterior hypothesis distribution.

custom_distr

a list of functions that define the posterior hypothesis distribution.

custom_start

a numeric value of the starting point if "custom_distr" is provided.

Returns

A new 'CoreABS' object.


Method clone()

The objects of this class are cloneable with this method.

Usage

CoreABS$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.