From a567d5ef0b64c9bfb67e09bb8aaf82c6f4ed0675 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 29 Jun 2023 17:45:03 +0200 Subject: [PATCH] vig --- vignettes/bayes_factors.Rmd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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