bmm
  • Get started
  • Functions
  • Articles
  • Changelog
  • Develop
  • Parameter recovery
  • Model explorer
  1. Continuous reproduction tasks
  2. Two-parameter mixture model
  • All models
  • How to read a page
  • Categorical decision tasks
    • Memory Measurement Model
    • Multinomial processing tree, span task
  • Continuous reproduction tasks
    • Interference Measurement Model
    • Two-parameter mixture model
    • Three-parameter mixture model
    • Signal discrimination model
  • Signal detection
    • Signal detection theory, yes/no
    • Signal detection theory, m-alternative forced choice
    • Signal detection theory, confidence ratings
  • Response times
    • EZ Diffusion Model
    • Censored Shifted Wald Model
    • Diffusion Decision Model
  1. Continuous reproduction tasks
  2. Two-parameter mixture model

Two-parameter mixture model

Continuous reproduction: responses centred on the target, or guesses

The task
Task settings

No task setting enters the likelihood. The model describes the response error, the distance on the wheel between the colour the participant chose and the target's colour, and nothing else about the trial: not the set size, not the other items.

Parameters
Probability that the target is recalled. On those trials the error scatters around 0 with precision kappa; on the other 1 − p_mem the participant guesses and every error is equally likely. At the start, p_mem = 0.5 puts half of the responses in the peak and half in the flat floor. bmm's formulas call it thetat and estimate it on the logit scale.
Precision of the recalled colour: the concentration of the von Mises peak around the target. Higher kappa gives a narrower peak and smaller errors on recalled trials; it moves no weight between memory and guessing. At the start, raising kappa from 7.39 to 20.1 moves the share of responses within ±20° of the target from 0.38 to 0.49, while p_mem stays at 0.5.
Predicted error distribution
Draws N trials from the predicted distribution and shows their response errors as bars of 10° behind the curves. Each bar averages the density over its 10°, so the bars stay below a peak narrower than that. Below the legend: the expected mean |error|, circular SD and share within ±20°, against the same for this sample. The circular SD is √(−2 ln R), with R the length of the mean error vector; it grows without bound as the errors approach uniform, so above 140° only that bound is shown, and in a small sample of widely spread errors it comes out lower than expected. The sample keeps its random numbers while the sliders move, so it changes with the parameters; New sample draws other ones. In bmm: rmixture2p(), in the code under In bmm; R draws its own sample, so its numbers differ from the page's.
Solid: now; dashed: starting values (see Explore); band: ±20° around the target, the window the readout counts. Shaded: the memory component, stacked on the guessing floor.
Mixture weights
Weights of memory (M) and guessing (G), now and at the starting values ("start").

What the model says

The two-parameter mixture model (Zhang & Luck, 2008), as implemented in the R package bmm, describes errors in continuous reproduction with two kinds of trials. On a fraction p_mem of the trials the participant recalls the target, and the response error follows a von Mises distribution (the circular counterpart of the normal) around 0 with the precision kappa. On all other trials the participant guesses, and every error from −π to π is equally likely. The density of the response error \(x\) is the mixture:

\[ f(x) = p_\text{mem}\,\text{vM}(x;\, \mu = 0,\, \kappa) + \frac{1 - p_\text{mem}}{2\pi} \]

where \(\text{vM}(x;\, \mu, \kappa)\) is the von Mises density with mean direction \(\mu\) and precision \(\kappa\). In bmm’s model formulas p_mem is called thetat and is estimated on the logit scale.

p_mem sets how much of the distribution sits in the peak and how much in the flat floor, and kappa sets how narrow the peak is. The two do not trade off: changing kappa moves no weight, and changing p_mem leaves the width of the peak alone. bmm fixes the location of the memory component, mu1 in its formulas, at 0 by default; a systematic bias in the responses can be estimated by adding mu1 ~ 1 to the formula.

The task

One trial is a colour reproduction. The participant sees a display of coloured items, then one item is cued, and the participant chooses its colour on a wheel. The response error is the angle between the chosen colour and the target’s colour on the wheel, in radians from −π to π. This is all the model uses of the trial. The colours of the other items, their locations and the set size are not inputs of the density, which is why the Task settings panel is empty.

Explore

The Predicted error distribution panel shows the density with the memory component (blue) stacked on the guessing floor (grey). Move p_mem and the blue area grows or shrinks while the floor drops or rises; move kappa and the blue area keeps its size and changes its shape. The bars under it show the weights, and the readout gives the share of responses within ±20° of the target, the window shaded in the density panel.

p_mem runs over its whole range, 0 to 1. bmm estimates kappa on the log scale with a normal(2, 1) prior; its slider spans the prior mean ± 3 SD and moves evenly in log units, while the number field shows natural units, from \(e^{-1} = 0.37\) to \(e^{5} = 148\). The starting values, which the dashed curve and the “start” bar keep, are p_mem = 0.5 (logit 0, the middle of bmm’s logistic(0, 1) prior on the logit scale) and kappa = \(e^{2} = 7.39\). Typed kappa values outside the slider range are used as long as they are 0 or more. Reset returns both parameters to their starting values.

Across task settings

The likelihood of mixture2p has no set-size variable: the density uses the response error and nothing else about the trial. How precisely the target is recalled (kappa) and how much of the distribution goes to guessing (1 - p_mem) are set by the parameters alone, whatever the number of items on the display. Set size can change them only if the parameters differ between the conditions of an experiment, for example between set sizes. In bmm that is a formula such as thetat ~ 0 + set_size with set_size coded as a factor (a factor column in the data, or factor(set_size) in the formula): 0 + drops the intercept, so every set size gets its own value of the parameter (formula syntax). A numeric set_size in the same formula estimates a single slope for set size instead, which without the intercept runs through the origin. What the model then predicts at each set size is whatever the estimated values say: how the parameters differ between set sizes comes from the data, and the model makes no prediction about it. No slider on this page makes a parameter depend on set size for that reason. The interference measurement model (IMM) is the contrast, as the Across set size panel on that page shows: every item on the display adds its own activation \(c\,e^{-s d_i} + a\) to the sum that each weight is divided by, so with the parameters fixed the target’s weight falls with set size, unless a = 0 and s is so large that the non-targets’ activations vanish.

In bmm


  

The code updates with the controls. dmixture2p() returns the density of the response error in radians. mixture2p() defines the model for a data set in which each row is a trial and resp_error holds the response error in radians. The comment in the code gives thetat, which is p_mem on the logit scale. bmf() writes the formula and bmm() estimates the parameters; my_data stands for your own data, and fitting runs Stan through brms. See the mixture models article and the reference pages for mixture2p() and dmixture2p().

bmm model explorer · source · code GPL-2, text CC BY 4.0

 
  • Report an issue

Built with Quarto. No R, no server: everything runs in your browser.