Learn R Programming

bdsm (version 0.3.0)

model_pmp: Graphs of the prior and posterior model probabilities for the best individual models

Description

This function draws four graphs of prior and posterior model probabilities for the best individual models:
a) The results with binomial model prior (based on PMP - posterior model probability)
b) The results with binomial-beta model prior (based on PMP - posterior model probability)
Models on the graph are ordered according to their posterior model probability.

Value

A list with three graphs with prior and posterior model probabilities for individual models:

  1. The results with binomial model prior (based on PMP - posterior model probability)

  2. The results with binomial-beta model prior (based on PMP - posterior model probability)

  3. On graph combining the aforementioned graphs

Arguments

bma_list

bma_list object (the result of the bma function)

top

The number of the best model to be placed on the graphs

Examples

Run this code
# \donttest{
library(magrittr)

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

bma_results <- bma(
  model_space = bdsm::small_model_space,
  df          = data_prepared,
  round       = 3,
  dilution    = 0
)

model_graphs <- model_pmp(bma_results, top = 16)
# }

Run the code above in your browser using DataLab