inclusion_prior: Prior Inclusion Probabilities

View source: R/inclusion_prior.R

inclusion_priorR Documentation

Prior Inclusion Probabilities

Description

Prior inclusion probabilities as required for stochastic search variable selection (SSVS) à la George et al. (2008) and Bayesian variable selection (BVS) à la Korobilis (2013).

Usage

inclusion_prior(
  object,
  prob = 0.5,
  exclude_deterministics = TRUE,
  minnesota_like = FALSE,
  kappa = c(0.8, 0.5, 0.5, 0.8)
)

Arguments

object

an object of class "bvarmodel", usually, a result of a call to gen_var or gen_vec.

prob

a numeric specifying the prior inclusion probability of all model parameters.

exclude_deterministics

logical. If TRUE (default), the vector of the positions of included variables does not include the positions of deterministic terms.

minnesota_like

logical. If TRUE, the prior inclusion probabilities of the parameters are calculated in a similar way as the Minnesota prior. See 'Details'.

kappa

a numeric vector of four elements containing the prior inclusion probabilities of coefficients that correspond to own lags of endogenous variables, to endogenous variables, which do not correspond to own lags, to exogenous variables and deterministic terms, respectively. Only used if minnesota_like = TRUE. See 'Details'.

Details

If minnesota_like = TRUE, prior inclusion probabilities \underline{\pi}_1 are calculated as

\frac{\kappa_1}{r} for own lags of endogenous variables,
\frac{\kappa_2}{r} for other endogenous variables,
\frac{\kappa_3}{1 + r} for exogenous variables,
\kappa_{4} for deterministic variables,

for lag r with \kappa_1, \kappa_2, \kappa_3, \kappa_4 as the first, second, third and forth element in kappa, respectively.

For vector error correction models the function generates prior inclusion probabilities for differenced variables and unrestricted deterministc terms as described above. For variables in the error correction term prior inclusion probabilites are calculated as

\kappa_1 fow own levels of endogenous variables,
\kappa_2 for levels of other endogenous variables,
\kappa_3 for levels of exogenous variables,
\kappa_4 for deterministic variables.

Value

A list containing a matrix of prior inclusion probabilities and an integer vector specifying the positions of variables, which should be included in the variable selction algorithm.

References

George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553–580. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jeconom.2007.08.017")}

Korobilis, D. (2013). VAR forecasting using Bayesian variable selection. Journal of Applied Econometrics, 28(2), 204–230. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/jae.1271")}

Examples


# Prepare data
data("e1")

# Generate model input
object <- gen_var(e1)

# Obtain inclusion prior
pi_prior <- inclusion_prior(object)


bvartools documentation built on May 29, 2024, 5:32 a.m.