get_BayesFactor {EMC2} | R Documentation |
Bayes Factors
Description
returns the Bayes Factor for two models
Usage
get_BayesFactor(MLL1, MLL2)
Arguments
MLL1 |
Numeric. Marginal likelihood of model 1. Obtained with |
MLL2 |
Numeric. Marginal likelihood of model 2. Obtained with |
Value
The BayesFactor for model 1 over model 2
Examples
## Not run:
# First get the marginal likelihood for two_models
# Here the full model is an emc object with the hypothesized effect
# The null model is an emc object without the hypothesized effect
MLL_full <- run_bridge_sampling(full_model, cores_per_prop = 3)
MLL_null <- run_bridge_sampling(null_model, cores_per_prop = 3)
# Now we can calculate their Bayes factor
get_BayesFactor(MLL_full, MLL_null)
## End(Not run)
[Package EMC2 version 2.0.2 Index]