Skip to contents

Compare posterior means against an external (lm) reference

Usage

morie_bayes_compare(fit)

Arguments

fit

A morie_bayes_fit.

Value

A data.frame of posterior vs OLS coefficient estimates.

Examples

d <- data.frame(x = rnorm(60)); d$y <- 1 + 2 * d$x + rnorm(60)
morie_bayes_compare(morie_bayes_lm(y ~ x, d, chains = 2, iter = 800,
                                   warmup = 300))
#>     parameter posterior_mean      ols
#> 1 (Intercept)      0.9027492 0.913038
#> 2           x      2.1055828 2.109956