
Distribution functions for the two-parameter mixture model (mixture2p)
Source:R/distributions.R
mixture2p_dist.RdDensity, distribution, and random generation functions for the
two-parameter mixture model with the location of mu, precision of memory
representations kappa and probability of recalling items from memory
p_mem.
Usage
dmixture2p(
x,
mu = 0,
kappa = 5,
p_mem = 0.6,
tau = 0,
K = 3,
set_size = NULL,
version = "simple",
vp_nodes = 81L,
log = FALSE
)
pmixture2p(q, mu = 0, kappa = 7, p_mem = 0.8)
qmixture2p(p, mu = 0, kappa = 5, p_mem = 0.6)
rmixture2p(
n,
mu = 0,
kappa = 5,
p_mem = 0.6,
tau = 0,
K = 3,
set_size = NULL,
version = "simple"
)Arguments
- x
Vector of observed responses
- mu
Vector of locations
- kappa
Vector of precision values. With
tau > 0this is the concentration of the average trial, whose Fisher informationJ(kappa)is the mean ofJ.- p_mem
Vector of probabilities for memory recall, i.e.
thetatofmixture2p()on its native scale. Used by the"simple"version; the other versions derive it fromKandset_size, and warn ifp_memis given.- tau
Vector of scales for trial-to-trial variability in precision. The Fisher information
Jof a memory representation is drawn fromgamma(mean = J(kappa), scale = tau).tau = 0, the default, is constant precision.- K
Vector of memory capacities. Used by the
"slot"and"slot_averaging"versions;"simple"ignores it and warns if it is given.- set_size
Vector of set sizes. Required by the
"slot"and"slot_averaging"versions, which stop without it;"simple"ignores it and warns if it is given.- version
A character string selecting the storage model:
"simple","slot"or"slot_averaging". Seemixture2p().- vp_nodes
Number of quadrature nodes used when
tau > 0; must be an odd number of at least 41. Seemixture2p(). The random generation function needs no nodes: it drawsJfrom its gamma distribution and then the response, which is exact.- log
Logical; if
TRUE, values are returned on the log scale. Pass it by name: in bmm 1.4 it was the fifth argument, which is nowtau. Until bmm 1.6.0 a logical value in that position is still read aslog, with a warning.- q
Vector of quantiles
- p
Vector of probability
- n
Number of observations to generate data for
Value
dmixture2p gives the density of the two-parameter mixture model,
pmixture2p gives the cumulative distribution function of the
two-parameter mixture model, qmixture2p gives the quantile function of
the two-parameter mixture model, and rmixture2p gives the random
generation function for the two-parameter mixture model.
References
Zhang, W., & Luck, S. J. (2008). Discrete fixed-resolution representations in visual working memory. Nature, 453(7192), 233-235.
van den Berg, R., Shin, H., Chou, W.-C., George, R., & Ma, W. J. (2012). Variability in encoding precision accounts for visual short-term memory limitations. PNAS, 109(22), 8780-8785.
