evaluate_model_BF: Evaluate the model Bayes Factor

Description Usage Value See Also Examples

View source: R/generics.R

Description

The model Bayes Factor computes the evidence of the model versus the evidence found in the intercept-only model. To compute the model Bayes Factor, the user needs to explicitly state that they want to compute the null model (see examples). This Bayes Factor value is approximated using Wagemakers' approximation (see below for citation).

Usage

1

Value

blm object with additional slot called 'model_BF' containing Bayes Factor information

See Also

Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p values. Psychonomic bulletin & review, 14(5), pp. 796-799.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Load the directors data
data("directors")
# Fit a blm model
fit <- blm("Compensation ~ Age", data=directors) %>%
   # Compute the null model next to the desired model
   compute_null_model() %>%
   # Sample posterior data
   sample_posterior()
# Check the convergence of the null model
plot(fit, "nullmodel")
# The Bayes Factor is in the summary
summary(fit)

JasperHG90/blm documentation built on Sept. 4, 2019, 11:16 a.m.