bma: Calculation of the bma objects

View source: R/bma.R

bmaR Documentation

Calculation of the bma objects

Description

This function calculates bma and related objects for the modelSpace object obtained using model_space function.

Usage

bma(
  modelSpace,
  EMS = NULL,
  dilution = 0,
  dil.Par = 0.5,
  Narrative = 0,
  p = NULL,
  Nar_vec = NULL,
  round = 6
)

Arguments

modelSpace

Model space object (the result of the model_space function)

EMS

Expected model size for model binomial and binomial-beta model prior.

dilution

Binary parameter: 0 - NO application of a dilution prior; 1 - application of a dilution prior (George 2010).

dil.Par

Parameter associated with dilution prior - the exponent of the determinant (George 2010). Used only if parameter dilution=1.

Narrative

Binary parameter: 0 - NO application of a Narrative dilution prior; 1 - application of a Narrative dilution prior.

p

Parameter or vector that indicates by how much we cut probability of a model with substitutes.

Nar_vec

Vector with information on narrative dilution prior where: 0 - the variable has no substitutes; numbers different than 0 denote consecutive groups of variables considered to be substitutes.

round

Parameter indicating to which place the function should round up the results in final tables.

Value

A list with Posterior objects:

  1. pmp_uniform_table - table with results with PMP under binomial model prior

  2. pmp_random_table - table with results with PMP under binomial-beta model prior

  3. eba_object - table with results of Extreme Bounds Analysis

  4. pms_table - table with prior and posterior model sizes

  5. x_names - vector with names of the regressors - to be used by the functions

  6. K - total number of regressors

  7. MS - size of the mode space

  8. EMS - expected model size for binomial and binomial-beta model prior specified by the user (default EMS=K/2)

  9. dilution - parameter indicating use of dilution

  10. for_jointness - table for jointness function

  11. for_best_models - table for best_models function

  12. for_model_pmp - table for model_pmp function

  13. for_model_sizes - table for model_sizes function

  14. alphas - vector with the values of the constant

  15. betas_nonzero - matrix with coefficients on regressors

Examples


data("Trade_data", package = "rmsBMA")
data <- Trade_data
modelSpace <- model_space(data, M = 6)
bma_list <- bma(modelSpace)
bma_list[[1]]


rmsBMA documentation built on March 14, 2026, 5:06 p.m.