This app is available online here
If you would prefer to launch this app via GitHub, you can run the following script in RStudio:
if (!require('shiny')) install.packages('shiny'); library('shiny')
if (!require('shinythemes')) install.packages('shinythemes')
if (!require('rmarkdown')) install.packages('rmarkdown')
runGitHub(rep = "BF_cmP_Calculator", username = "Robert-Fox1", ref = "main")
This calculator estimates the Bayes Factor (BF) and Approximate Correct Model Probability (cmP) values by using the Bayesian Information Criteria (BIC) [1,2] values (which can be obtained by common statistical software, such as Mplus). These values can be useful in determining the appropriate number of latent classes in finite mixture models, such as latent class analysis and latent profile analysis. For an overview and description of these statistics see [2].
This calculator can be used as a quick means to estimate the BF and cmP values, which are not readily available in all structural equation modelling (SEM) software.
All you need to calculate the BF and cmP values are the Bayesian Information Criterion (BIC) values for each model tested.
- Enter the number of models you wish to compare.
- Enter each of the BIC values from your output.
- Once you have entered the BIC values, the BF and cmP values will be estimated. You can view these by switching to the 'BF Values' tab and the 'cmP Values' tab.
The BF can be used to make a pairwise comparison of relative fit between two adjacent models (Model K and Model K + 1, where K is the number of latent classes).
- A BF less than 3 is generally considered as weak evidence in support of Model K over Model K + 1.
- A BF greater than or equal to 3 and less than 10 is generally considered as moderate evidence in support of Model K over Model K + 1.
- A BF greater than or equal to 10 is generally considered as strong evidence in support of Model K over Model K + 1.
The cmP estimates the probability of each model being the "correct" model, relative to all models tested, assuming that the "true" model is among those examined [2]. Based on the cmP, the model with the highest value is selected.
- Schwarz, G. (1978). Estimating the dimension of a model. The Annals of Statistics, 6(2), 461-464. https://doi.org/10.1214/aos/1176344136
- Masyn, K. E. (2013). Latent class analysis and finite mixture modeling. In T. D. Little (Ed.), The Oxford handbook of quantitative methods (Vol. 2, pp. 551-611). Oxford University Press.
If you found this app useful, please use the following citation:
Fox, R. (2021). BF & cmP Calculator: A Web App for Calculating Bayes Factors and Approximate Correct Model Probability Values [Computer software]. https://doi.org/10.17605/OSF.IO/Q4Z2F
Dr Robert Fox is a Lecturer in Psychology at the National College of Ireland, Dublin, Ireland.