View source: R/minnesota_prior.R
| minnesota_prior | R Documentation | 
Calculates the Minnesota prior for a VAR model.
minnesota_prior(
  object,
  kappa0 = 2,
  kappa1 = 0.5,
  kappa2 = NULL,
  kappa3 = 5,
  max_var = NULL,
  coint_var = FALSE,
  sigma = "AR"
)
object | 
 an object of class   | 
kappa0 | 
 a numeric specifying the prior variance of coefficients that correspond to own lags of endogenous variables.  | 
kappa1 | 
 a numeric specifying the size of the prior variance of endogenous
variables, which do not correspond to own lags, relative to argument   | 
kappa2 | 
 a numeric specifying the size of the prior variance of non-deterministic exogenous
variables relative to argument   | 
kappa3 | 
 a numeric specifying the size of the prior variance of deterministic
terms relative to argument   | 
max_var | 
 a positive numeric specifying the maximum prior variance that is allowed for
coefficients of non-deterministic variables. If   | 
coint_var | 
 a logical specifying whether the model is a cointegrated VAR model, for which the prior means of first own lags should be set to one.  | 
sigma | 
 either   | 
The function calculates the Minnesota prior of a VAR model. For the endogenous variable
i the prior variance of the lth lag of regressor j is obtained as
 \frac{\kappa_{0}}{l^2} \textrm{ for own lags of endogenous variables,}
 \frac{\kappa_{0} \kappa_{1}}{l^2} \frac{\sigma_{i}^2}{\sigma_{j}^2} \textrm{ for endogenous variables other than own lags,}
 \frac{\kappa_{0} \kappa_{2}}{(l + 1)^2} \frac{\sigma_{i}^2}{\sigma_{j}^2} \textrm{ for exogenous variables,}
 \kappa_{0} \kappa_{3} \sigma_{i}^2 \textrm{ for deterministic terms,}
where \sigma_{i} is the residual standard deviation of variable i of an unrestricted
LS estimate. For exogenous variables \sigma_{i} is the sample standard deviation.
For VEC models the function only provides priors for the non-cointegration part of the model. The
residual standard errors \sigma_i are based on an unrestricted LS regression of the
endogenous variables on the error correction term and the non-cointegration regressors.
A list containing a matrix of prior means and the precision matrix of the cofficients and the inverse variance-covariance matrix of the error term, which was obtained by an LS estimation.
Chan, J., Koop, G., Poirier, D. J., & Tobias, J. L. (2020). Bayesian Econometric Methods (2nd ed.). Cambridge: University Press.
Lütkepohl, H. (2006). New introduction to multiple time series analysis (2nd ed.). Berlin: Springer.
# Load data
data("e1")
data <- diff(log(e1))
# Generate model input
object <- gen_var(data)
# Obtain Minnesota prior
prior <- minnesota_prior(object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.