jointness: Calculation of of the jointness measures

View source: R/jointness.R

jointnessR Documentation

Calculation of of the jointness measures

Description

This function calculates four types of the jointness measures based on the posterior model probabilities calculated using binomial and binomial-beta model prior. The four measures are:

  1. HCGHM - for Hofmarcher et al. (2018) measure;

  2. LS - for Ley & Steel (2007) measure;

  3. DW - for Doppelhofer & Weeks (2009) measure;

  4. PPI - for posterior probability of including both variables.
    The measures under binomial model prior will appear in a table above the diagonal, and the measure calculated under binomial-beta model prior below the diagonal.

    REFERENCES
    Doppelhofer G, Weeks M (2009) Jointness of growth determinants. Journal of Applied Econometrics., 24(2), 209-244. doi: 10.1002/jae.1046
    Hofmarcher P, Crespo Cuaresma J, GrĂ¼n B, Humer S, Moser M (2018) Bivariate jointness measures in Bayesian Model Averaging: Solving the conundrum. Journal of Macroeconomics, 57, 150-165. doi: 10.1016/j.jmacro.2018.05.005
    Ley E, Steel M (2007) Jointness in Bayesian variable selection with applications to growth regression. Journal of Macroeconomics, 29(3), 476-493. doi: 10.1016/j.jmacro.2006.12.002

Usage

jointness(bma_list, measure = "HCGHM", rho = 0.5, app = 3)

Arguments

bma_list

bma object (the result of the bma function)

measure

Parameter for choosing the measure of jointness:
HCGHM - for Hofmarcher et al. (2018) measure;
LS - for Ley & Steel (2007) measure;
DW - for Doppelhofer & Weeks (2009) measure;
PPI - for posterior probability of including both variables.

rho

The parameter "rho" (\rho) to be used in HCGHM jointness measure (default rho = 0.5). Works only if HCGHM measure is chosen (Hofmarcher et al. 2018).

app

Parameter indicating the decimal place to which the jointness measures should be rounded (default app = 3).

Value

A table with jointness measures for all the pairs of regressors used in the analysis. Parameter "above" indicates what model prior is used for the values ABOVE the diagonal, and parameter "below" indicates what model prior is used for the values BELOW the diagonal.

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)

jointness_table <- jointness(bma_results, measure = "HCGHM", rho = 0.5, app = 3)


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