diff --git a/vignettes/bayes_factors.Rmd b/vignettes/bayes_factors.Rmd index 6f6fe5286..7d8d9b77e 100644 --- a/vignettes/bayes_factors.Rmd +++ b/vignettes/bayes_factors.Rmd @@ -920,7 +920,7 @@ posterior distribution, and estimate the HDI. In `bayestestR`, we can do this with the `weighted_posteriors()` function: -```{r} +```{r eval=FALSE} BMA_draws <- weighted_posteriors(mod, mod_carb, verbose = FALSE) BMA_hdi <- hdi(BMA_draws, ci = 0.95) @@ -928,6 +928,14 @@ BMA_hdi plot(BMA_hdi) ``` +```{r echo=FALSE} +BMA_draws <- weighted_posteriors(mod, mod_carb, verbose = FALSE) + +BMA_hdi <- hdi(BMA_draws, ci = 0.95) +BMA_hdi + +plot(BMA_hdi, data = BMA_draws) +``` We can see that across both models under consideration, the posterior of the `carb` effect is almost equally weighted between the alternative model and the