Skip to contents

About bmm

These pages provide a summary of the functionality available in bmm

bmm() fit_model()
Fit Bayesian Measurement Models
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

sdm() sdmSimple()
Signal Discrimination Model (SDM) by Oberauer (2023)
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).

Distributions

Functions for special distributions

dimm() pimm() qimm() rimm()
The Interference Measurement Model (IMM)
dsdm() psdm() qsdm() rsdm()
The Signal Discrimination Model (SDM) Distribution
dmixture2p() pmixture2p() qmixture2p() rmixture2p()
The two-parameter mixture model (mixture2p)
dmixture3p() pmixture3p() qmixture3p() rmixture3p()
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()
checks if the formula is valid for the specified model
check_model()
Checks if the model is supported, and returns the model function
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)