minnesota_prior: Minnesota Prior

View source: R/minnesota_prior.R

minnesota_priorR Documentation

Minnesota Prior

Description

Calculates the Minnesota prior for a VAR model.

Usage

minnesota_prior(
  object,
  kappa0 = 2,
  kappa1 = 0.5,
  kappa2 = NULL,
  kappa3 = 5,
  max_var = NULL,
  coint_var = FALSE,
  sigma = "AR"
)

Arguments

object

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

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 kappa0.

kappa2

a numeric specifying the size of the prior variance of non-deterministic exogenous variables relative to argument kappa0. Default is NULL, which indicates that the formula for the calculation of the prior variance of deterministic terms is used for all exogenous variables.

kappa3

a numeric specifying the size of the prior variance of deterministic terms relative to argument kappa0.

max_var

a positive numeric specifying the maximum prior variance that is allowed for coefficients of non-deterministic variables. If NULL (default), the prior variances are not limited.

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 "AR" (default) or "VAR" indicating that the variances of the endogenous variables \sigma^2 are calculated based on a univariate AR regression or a least squares estimate of the VAR form, respectively. In both cases all deterministic variables are used in the regressions, if they appear in the model.

Details

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.

Value

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.

References

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.

Examples


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

# Generate model input
object <- gen_var(data)

# Obtain Minnesota prior
prior <- minnesota_prior(object)


franzmohr/bvartools documentation built on Jan. 28, 2024, 4:06 a.m.