posterior_dens: Graphs of the posterior densities of the coefficients

View source: R/posterior_dens.R

posterior_densR Documentation

Graphs of the posterior densities of the coefficients

Description

This function draws graphs of the posterior densities of all the coefficients of interest.

Usage

posterior_dens(bma_list, prior = "binomial", SE = "standard")

Arguments

bma_list

bma object (the result of the bma function)

prior

Parameter indicating which model prior should be used for calculations:

  1. "binomial" - using binomial model prior (default option)

  2. "beta" - using binomial-beta model prior

SE

Parameter indicating which standard errors should be used in calculation of posterior standard deviation:

  1. "standard" - regular standard errors (default option)

  2. "robust" - robust standard errors

Value

A list with the graphs of the posterior densities of coefficients for all the considered regressors.

Examples


library(magrittr)

data_prepared <- badp::economic_growth[, 1:6] %>%
  badp::feature_standardization(
    excluded_cols = c(country, year, gdp)
  ) %>%
  badp::feature_standardization(
    group_by_col  = year,
    excluded_cols = country,
    scale         = FALSE
  )

bma_results <- bma(
  model_space = badp::small_model_space,
  round       = 3,
  dilution    = 0
)

posterior_graphs <- posterior_dens(bma_results, prior = "binomial", SE = "robust")


badp documentation built on Aug. 20, 2026, 9:08 a.m.