Skip to contents

This function fits BVAR(p) with Minnesota prior.

Usage

bvar_minnesota(y, p = 1, bayes_spec = set_bvar(), include_mean = TRUE)

# S3 method for bvarmn
print(x, digits = max(3L, getOption("digits") - 3L), ...)

# S3 method for bvarmn
knit_print(x, ...)

Arguments

y

Time series data of which columns indicate the variables

p

VAR lag (Default: 1)

bayes_spec

A BVAR model specification by set_bvar().

include_mean

Add constant term (Default: TRUE) or not (FALSE)

x

bvarmn object

digits

digit option to print

...

not used

Value

bvar_minnesota() returns an object bvarmn

class. It is a list with the following components:

coefficients

Posterior Mean matrix of Matrix Normal distribution

fitted.values

Fitted values

residuals

Residuals

mn_prec

Posterior precision matrix of Matrix Normal distribution

iw_scale

Posterior scale matrix of posterior inverse-Wishart distribution

iw_shape

Posterior shape of inverse-Wishart distribution (\(alpha_0\) - obs + 2). \(\alpha_0\): nrow(Dummy observation) - k

df

Numer of Coefficients: mp + 1 or mp

p

Lag of VAR

m

Dimension of the time series

obs

Sample size used when training = totobs - p

totobs

Total number of the observation

call

Matched call

process

Process string in the bayes_spec: "BVAR_Minnesota"

spec

Model specification (bvharspec)

type

include constant term ("const") or not ("none")

prior_mean

Prior mean matrix of Matrix Normal distribution: \(A_0\)

prior_precision

Prior precision matrix of Matrix Normal distribution: \(\Omega_0^{-1}\)

prior_scale

Prior scale matrix of inverse-Wishart distribution: \(S_0\)

prior_shape

Prior shape of inverse-Wishart distribution: \(\alpha_0\)

y0

\(Y_0\)

design

\(X_0\)

y

Raw input (matrix)

It is also normaliw and bvharmod class.

Details

Minnesota prior gives prior to parameters \(A\) (VAR matrices) and \(\Sigma_e\) (residual covariance).

$$A \mid \Sigma_e \sim MN(A_0, \Omega_0, \Sigma_e)$$ $$\Sigma_e \sim IW(S_0, \alpha_0)$$ (MN: matrix normal, IW: inverse-wishart)

References

Bańbura, M., Giannone, D., & Reichlin, L. (2010). Large Bayesian vector auto regressions. Journal of Applied Econometrics, 25(1).

Giannone, D., Lenza, M., & Primiceri, G. E. (2015). Prior Selection for Vector Autoregressions. Review of Economics and Statistics, 97(2).

Litterman, R. B. (1986). Forecasting with Bayesian Vector Autoregressions: Five Years of Experience. Journal of Business & Economic Statistics, 4(1), 25.

KADIYALA, K.R. and KARLSSON, S. (1997), NUMERICAL METHODS FOR ESTIMATION AND INFERENCE IN BAYESIAN VAR-MODELS. J. Appl. Econ., 12: 99-132.

Karlsson, S. (2013). Chapter 15 Forecasting with Bayesian Vector Autoregression. Handbook of Economic Forecasting, 2, 791–897.

Sims, C. A., & Zha, T. (1998). Bayesian Methods for Dynamic Multivariate Models. International Economic Review, 39(4), 949–968.

See also

Examples

# Perform the function using etf_vix dataset
fit <- bvar_minnesota(y = etf_vix[,1:3], p = 2)
class(fit)
#> [1] "bvarmn"   "normaliw" "bvharmod"

# Extract coef, fitted values, and residuals
coef(fit)
#>                  GVZCLS      OVXCLS     VXFXICLS
#> GVZCLS_1    0.748002362 0.016660371 0.0292009699
#> OVXCLS_1    0.001065823 0.756433551 0.0095768264
#> VXFXICLS_1  0.030593805 0.047149733 0.7394653446
#> GVZCLS_2    0.131161556 0.001676923 0.0070667088
#> OVXCLS_2   -0.002739948 0.156961310 0.0007335284
#> VXFXICLS_2  0.004802996 0.002851055 0.1348365830
#> const       1.364048215 0.892319013 2.1678666754
head(residuals(fit))
#>            [,1]       [,2]       [,3]
#> [1,]  1.1038151  0.2448516  0.3122368
#> [2,] -0.2642748  1.4056509 -0.2626782
#> [3,] -0.2029986 -0.3475479  1.2435163
#> [4,]  0.3670679 -0.6480620  0.1162101
#> [5,]  0.4762747 -0.6819821 -0.1371471
#> [6,] -0.1455416 -1.2903485 -0.4655733
head(fitted(fit))
#>        GVZCLS   OVXCLS VXFXICLS
#> [1,] 21.23618 35.27515 28.74776
#> [2,] 21.86427 35.18435 28.72268
#> [3,] 21.40300 35.96755 28.29648
#> [4,] 21.03293 35.44306 28.98879
#> [5,] 21.12373 34.65198 28.80715
#> [6,] 21.28554 33.88035 28.42557