Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ssvs_prior

Stochastic Search Variable Selection Prior


Description

Calculates the priors for a Bayesian VAR model, which employs stochastic search variable selection (SSVS).

Usage

ssvs_prior(object, tau = c(0.05, 10), semiautomatic = NULL)

Arguments

object

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

tau

a numeric vector of two elements containing the prior standard errors of restricted variables (τ_0) as its first element and unrestricted variables (τ_1) as its second. Default is c(0.05, 10).

semiautomatic

an optional numeric vector of two elements containing the factors by which the standard errors associated with an unconstrained least squares estimate of the VAR model are multiplied to obtain the prior standard errors of restricted (τ_0) and unrestricted (τ_1) variables. This is the semiautomatic approach described in George et al. (2008).

Value

A list containing the vectors of prior standard deviations for restricted and unrestricted variables, respectively.

References

George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553–580. doi: 10.1016/j.jeconom.2007.08.017

Examples

# Prepare data
data("e1")
data <- diff(log(e1))

# Generate model input
object <- gen_var(data)

# Obtain SSVS prior
prior <- ssvs_prior(object, semiautomatic = c(.1, 10))

bvartools

Bayesian Inference of Vector Autoregressive Models

v0.2.0
GPL (>= 2)
Authors
Franz X. Mohr [aut, cre]
Initial release
2021-04-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.