model_sizes: Graphs of the prior and posterior model probabilities of the...

View source: R/model_sizes.R

model_sizesR Documentation

Graphs of the prior and posterior model probabilities of the model sizes

Description

This function draws four graphs of prior and posterior model probabilities:
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)

Arguments

bma_list

bma_list object (the result of the bma function)

Value

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

  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. One graph combining all the aforementioned graphs

Examples


library(magrittr)

data_prepared <- economic_growth[,1:7] %>%
   feature_standardization(timestamp_col = year, entity_col = country) %>%
   feature_standardization(timestamp_col = year, entity_col = country,
                           time_effects = TRUE, scale = FALSE)

model_space <- optimal_model_space(df = data_prepared, dep_var_col = gdp,
                                   timestamp_col = year, entity_col = country,
                                   init_value = 0.5)

bma_results <- bma(df = data_prepared, dep_var_col = gdp, timestamp_col = year,
entity_col = country, model_space = model_space, run_parallel = FALSE, dilution = 0)

size_graphs <- model_sizes(bma_results)



bdsm documentation built on April 4, 2025, 1:06 a.m.