| best_models | R Documentation |
This function creates a ranking of best models according to one of the possible criterion (PMP under binomial model prior, PMP under binomial-beta model prior, R^2 under binomial model prior, R^2 under binomial-beta model prior). The function gives two types of tables in three different formats: inclusion table (where 1 indicates presence of the regressor in the model and 0 indicates that the variable is excluded from the model) and estimation results table (it displays the best models and estimation output for those models: point estimates, standard errors, significance level, and R^2).
best_models(bma_list, criterion = 1, best = 5, round = 3, estimate = TRUE)
bma_list |
bma object (the result of the bma function) |
criterion |
The criterion that will be used for a basis of the model ranking: |
best |
The number of the best models to be considered |
round |
Parameter indicating the decimal place to which number in the tables should be rounded (default round = 3) |
estimate |
A parameter with values TRUE or FALSE indicating which table should be displayed when
TRUE - table with estimation to the results |
A list with best_models objects:
matrix with inclusion of the regressors in the best models
matrix with estimation output in the best models with regular standard errors
knitr_kable table with inclusion of the regressors in the best models (the best for the display on the console - up to 11 models)
knitr_kable table with estimation output in the best models with regular standard errors (the best for the display on the console - up to 6 models)
gTree table with inclusion of the regressors in the best models (displayed as a plot). Use grid::grid.draw() to display.
gTree table with estimation output in the best models with regular standard errors (displayed as a plot). Use grid::grid.draw() to display.
data <- Trade_data[,1:10]
modelSpace <- model_space(data, M = 9, g = "UIP")
bma_list <- bma(modelSpace)
models <- best_models(bma_list, best = 3)
models[[4]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.