Skip to contents

About bmm

These pages provide a summary of the functionality available in bmm

bmm-package
Easy and Accesible Bayesian Measurement Models Using 'brms'
supported_models()
Measurement models available in bmm
bmm_options()
View or change global bmm options

Fitting models

Main functions for model fitting

bmm() fit_model()
Fit Bayesian Measurement Models
bmmformula() bmf()
Create formula for predicting parameters of a bmmodel
update(<bmmfit>)
Update a bmm model
summary(<bmmfit>)
Create a summary of a fitted model represented by a bmmfit object

Extract model information

Utility functions for extracting default priors, generate stan code, stan data, etc.

default_prior(<bmmformula>)
Get Default priors for Measurement Models specified in BMM
fit_info()
Extract information from a brmsfit object
stancode(<bmmformula>)
Generate Stan code for bmm models
standata(<bmmformula>)
Stan data for bmm models

Specifying models

Functions for specifying which model to fit

imm() IMMfull() IMMbsc() IMMabc()
Interference measurement model by Oberauer and Lin (2017).
mixture2p()
Two-parameter mixture model by Zhang and Luck (2008).
mixture3p()
Three-parameter mixture model by Bays et al (2009).
sdm() sdmSimple()
Signal Discrimination Model (SDM) by Oberauer (2023)

Distributions

Functions for special distributions

dimm() pimm() qimm() rimm()
Distribution functions for the Interference Measurement Model (IMM)
dsdm() psdm() qsdm() rsdm()
Distribution functions for the Signal Discrimination Model (SDM)
dmixture2p() pmixture2p() qmixture2p() rmixture2p()
Distribution functions for the two-parameter mixture model (mixture2p)
dmixture3p() pmixture3p() qmixture3p() rmixture3p()
Distribution functions for the three-parameter mixture model (mixture3p)

Data, model and parameter transformations

Utility functions for transforming data and parameters

c_sqrtexp2bessel() c_bessel2sqrtexp()
Convert between parametrizations of the c parameter of the SDM distribution
calc_error_relative_to_nontargets()
Calculate response error relative to non-target values
deg2rad() rad2deg()
Convert degrees to radians or radians to degrees.
k2sd()
Transform kappa of the von Mises distribution to the circular standard deviation
restructure(<bmmfit>)
Restructure Old bmmfit Objects
softmax() softmaxinv()
Softmax and logsoftmax functions and their inverse functions
wrap()
Wrap angles that extend beyond (-pi;pi)

Datasets

Available datasets for fitting the models

oberauer_lin_2017
Data from Experiment 1 reported by Oberauer & Lin (2017)
zhang_luck_2008
Data from Experiment 2 reported by Zhang & Luck (2008)

Developers’ corner

Functions to assist in developing new models

bmf2bf()
Convert bmmformula objects to brmsformula objects
check_data()
Generic S3 method for checking data based on model type
check_formula()
Generic S3 method for checking if the formula is valid for the specified model
check_model()
Generic S3 method for checking if the model is supported and model preprocessing
configure_model()
Generic S3 method for configuring the model to be fit by brms
configure_prior()
Generic S3 method for configuring the default prior for a bmmodel
postprocess_brm()
Generic S3 method for postprocessing the fitted brm model
revert_postprocess_brm()
Generic S3 method for reverting any postprocessing of the fitted brm model
use_model_template()
Create a file with a template for adding a new model (for developers)

Deprecated

Deprecated functions (will be removed in future versions)

bmm() fit_model()
Fit Bayesian Measurement Models
imm() IMMfull() IMMbsc() IMMabc()
Interference measurement model by Oberauer and Lin (2017).
sdm() sdmSimple()
Signal Discrimination Model (SDM) by Oberauer (2023)