Create prior hyperparameters from lambdas

bvar_conj_lambda2hyper(Y_in, Z_in = NULL, constant = TRUE, p = 4,
  lambda = c(0.2, 1, 1, 1, 100, 100), delta = 1, s2_lag = NULL,
  y_bar_type = c("initial", "all"), carriero_hack = FALSE)

Arguments

Y_in

multivariate time series

Z_in

exogeneous variables

constant

logical, default is TRUE, whether the constant should be included

p

number of lags

lambda

vector = (l_1, l_lag, l_sc, l_io, l_const, l_exo), the l_kron is set to 1 automatically for conjugate N-IW prior. Short summary valid for NO sc/io case: sd(const in eq i) = l_const * sigma_i sd(exo in eq i)= l_exo * sigma_i sd(coef for var j lag l in eq i) = l_1*sigma_i/sigma_j/l^l_lag lambdas may be Inf l_io or l_sc equal to NA means no corresponding dummy observations

delta

vector [m x 1] or scalar or "AR1". Are used for prior Phi_1 and in sc/io dummy observations Scalar value is replicated m times. If set to "AR1" then deltas will be estimated as AR(1) coefficients (but not greater than one). Diagonal of Phi_1 is equal to delta. y_bar is multiplied by delta componentwise. By default delta is equal to 1.

s2_lag

number of lags in AR() model used to estimate s2 (equal to p by default) Carriero uses 1 in his matlab code http://cremfi.econ.qmul.ac.uk/efp/info.php

y_bar_type

(either "all" or "initial"). Determines how y_bar for sc and io dummy is calculated. "all": y_bar is mean of y for all observations, "initial": p initial observations Carriero: all, Sim-Zha: initial

carriero_hack

logical, if TRUE sigma^2 will be estimated using biased estimator and supposed error with no square roots in dummy observations will be reproduced FALSE by default

Value

dummy list containing: Omega, Omega_root S, Phi

Details

Create prior hyperparameters from lambdas. Lambdas specification is based on Carriero "Bayesian VARs: Specification Choices and Forecast Accuracy" section 3.2.

Examples

data(Yraw) prior <- bvar_conj_lambda2hyper(Yraw, p = 4, lambda = c(0.2, 1, 1, 1, 100, 100))
#> Calculation of hyperparameters from lambdas is not implemented yet :(
#> You may safely ignore the message if you supply lambdas :)