| coef_hist | R Documentation |
This function draws graphs of the distribution (in the form of histogram or kernel density) of the coefficients for all the considered regressors over the part of the model space that includes these regressors (half of the model space).
coef_hist(
bma_list,
weight = NULL,
bin_method = c("FD", "SC", "vec"),
bin_widths = NULL,
use_bin_count = 0,
bin_counts = NULL,
use_kernel = 0
)
bma_list |
An object of class |
weight |
Parameter indicating whether the coefficients should be weighted by posterior model probabilities:
|
bin_method |
Character string specifying the method for bin widths (default: |
bin_widths |
A vector with bin widths to be used to construct histograms for the regressors. The vector must be of the size equal to total number of regressors plus one for the lagged dependent variable. The vector with bin widths is used only if parameter |
use_bin_count |
Parameter taking the values (default: |
bin_counts |
A vector with the numbers of bins to be used to construct histograms for the regressors. The vector must be of the size equal to total number of regressors plus one for the lagged dependent variable. The vector with bin counts is used only if parameter |
use_kernel |
A parameter taking the values (default: |
A list with the graphs of the distribution of coefficients for all the considered regressors and the lagged dependent variable.
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
)
coef_plots <- coef_hist(bma_results, use_kernel = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.