Skip to content

Commit

Permalink
vig
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jun 29, 2023
1 parent 57b9db8 commit a567d5e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion vignettes/bayes_factors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -920,14 +920,22 @@ 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)
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
Expand Down

0 comments on commit a567d5e

Please sign in to comment.