Prior inclusion probabilities as required for stochastic search variable selection (SSVS) <U+00E0> la George et al. (2008) and Bayesian variable selection (BVS) <U+00E0> la Korobilis (2013).
inclusion_prior(
object,
prob = 0.5,
exclude_deterministics = TRUE,
minnesota_like = FALSE,
kappa = c(0.8, 0.5, 0.5, 0.8)
)
a numeric specifying the prior inclusion probability of all model parameters.
logical. If TRUE
(default), the vector of the positions of
included variables does not include the positions of deterministic terms.
logical. If TRUE
, the prior inclusion probabilities of the
parameters are calculated in a similar way as the Minnesota prior. See 'Details'.
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'.
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.
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, |
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, |
George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553--580. https://doi.org/10.1016/j.jeconom.2007.08.017
Korobilis, D. (2013). VAR forecasting using Bayesian variable selection. Journal of Applied Econometrics, 28(2), 204--230. https://doi.org/10.1002/jae.1271
# NOT RUN {
# Prepare data
data("e1")
data <- diff(log(e1))
# Generate model input
object <- gen_var(data)
# Obtain inclusion prior
pi_prior <- inclusion_prior(object)
# }
Run the code above in your browser using DataLab