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).
m3()
The Multinomial / Memory Measurement Model
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)
dm3() rm3()
Distribution functions for the Memory Measurement Model (M3)
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)
rejection_sampling()
Rejection Sampling

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.
construct_m3_act_funs()
Get Activation Functions for different M3 versions
k2sd()
Transform kappa of the von Mises distribution to the circular standard deviation
restructure(<bmmfit>)
Restructure Old bmmfit Objects
softmax() softmaxinv()
Softmax function and its inverse
wrap()
Wrap angles that extend beyond (-pi;pi)

Datasets

Available datasets for fitting the models

oberauer_lewandowsky_2019_e1
Data from Experiment 1 reported by Oberauer & Lewandowsky (2019)
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

apply_links()
Apply link functions for parameters in a formula or bmmformula
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)