Learn R Programming

mixtur

mixtur is an R package for designing, analysing, and modelling continuous report visual short-term memory studies. The package allows users to implement the 2-component (Zhang & Luck, 2008) and 3-component (Bays, Catalao, & Husain, 2009) mixture models of continuous-report visual short-term memory data. The package can also fit & simulate the slots and slots-plus averaging models of Zhang & Luck.

The package allows users to:

  • Obtain summary statistics of response error and response precision of behavioural data
  • Produce publication-ready plots of behavioural data
  • Fit both the 2- and 3-component models to user data
  • Plot the goodness of model fit to user data
  • Simulate artificial data from both models
  • Conduct formal model competition analysis

Installation

You can install the released version of mixtur (v1.2.0) from CRAN with:

install.packages("mixtur")

The development version can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("JimGrange/mixtur")

Publication

We have an academic publication showing users how to use the package. Here we provide the link to the final publication, as well as a link to the pre-print of the paper:

  • Grange, J.A. & Moore, S.B. (2022). mixtur: An R package for designing, analysing, and modelling continuous report visual short-term memory studies. Behavior Research Methods, 54, 2071–2100.

The paper also includes several simulation studies exploring some properties of the models (including parameter recovery simulations, model recovery simulations) and provides concrete recommendations to researchers wishing to use mixture modelling in their own research.

Acknowledgements & References

  • We are grateful to Ed. D.J. Berry who contributed to the package development.

  • Portions of the package code have been adapted from code written by Paul Bays in Matlab, with permission. We are extremely grateful to Paul Bays for this permission. See https://paulbays.com.

  • Bays, P. M., Catalao, R. F. G., & Husain, M. (2009). The precision of visual working memory is set by allocation of a shared resource. Journal of Vision, 9(10): 7, 1–11.

  • Zhang, W., & Luck, S. J. (2008). Discrete fixed-resolution representations in visual working memory. Nature, 453, 233–235.

Copy Link

Version

Install

install.packages('mixtur')

Monthly Downloads

222

Version

1.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

James Grange

Last Published

April 6th, 2023

Functions in mixtur (1.2.1)

fit_mixtur

Fit the mixture model.
plot_summary_statistic

Plot summary statistics of behavioural data
plot_model_parameters

Plot best-fitting parameters of model fit
simulate_mixtur

Generate simulated data from mixture models
plot_model_fit

Plot model fit against human error data (target errors)
oberauer_2017

Data set from Oberauer & Lin (2017)
get_summary_statistics

Obtain summary statistics of response error
bays2009_full

Full data set from Bays et al. (2009)
berry_2019

Data set from Berry et al. (2019)
bays2009_sample

Sample data set from Bays et al. (2009)
plot_error

Plot response error of behavioural data relative to target values.