ssvs_prior | R Documentation |
Calculates the priors for a Bayesian VAR model, which employs stochastic search variable selection (SSVS).
ssvs_prior(object, tau = c(0.05, 10), semiautomatic = NULL)
object |
an object of class |
tau |
a numeric vector of two elements containing the prior standard errors of restricted
variables ( |
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 ( |
A list containing the vectors of prior standard deviations for restricted and unrestricted variables, respectively.
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")}
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.