Description Usage Arguments Examples
Computes the inclusion Bayes factor for two sets of models (e.g., A={M1,M2} vs. B={M3,M4}).
1 
logml 
a vector with logmarginal likelihoods. Alternatively, a list
with metaanalysis models (fitted via 
include 
integer vector which models to include in inclusion Bayes
factor/posterior probability. If only two marginal likelihoods/metaanalyses
are supplied, the inclusion Bayes factor is identical to the usual Bayes factor
BF_{M1,M2}. One can include models depending on the names of the models (such as

prior 
prior probabilities over models (possibly unnormalized). For instance, if the first model is as likely as models 2, 3 and 4 together: 
1 2 3 4 5 6 7 8 9 10 11 12 13  #### Example with simple Normaldistribution models
# generate data:
x < rnorm(50)
# Model 1: x ~ Normal(0,1)
logm1 < sum(dnorm(x, log = TRUE))
# Model 2: x ~ Normal(.2, 1)
logm2 < sum(dnorm(x, mean = .2, log = TRUE))
# Model 3: x ~ Studentt(df=2)
logm3 < sum(dt(x, df = 2, log = TRUE))
# BF: Correct (Model 1) vs. misspecified (2 & 3)
inclusion(c(logm1, logm2, logm3), include = 1)

Loading required package: Rcpp
Warning message:
In file(con, "r") : cannot open file '/proc/stat': Permission denied
### Inclusion Bayes factor ###
Model Prior Posterior included
1 Model 1 0.333 0.98326 x
2 Model 2 0.333 0.01497
3 Model 3 0.333 0.00177
Inclusion posterior probability: 0.983
Inclusion Bayes factor: 117.507
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.