Set conjugate N-IW priors from lambdas as in Carriero

Carriero_priors(Y_in, Z_in = NULL, constant = TRUE, p = 4,
  lambdas = c(0.2, 1, 1, 1, 100, 100), delta = 1, s2_lag = NULL,
  y_0_bar_type = c("initial", "all"))

Arguments

Y_in

[T_in x m] multivariate time series

Z_in

[T_in x ...] exogeneous variables

constant

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

p

number of lags

lambdas

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: 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_0_bar is multiplied by delta componentwise.

s2_lag

number of lags in AR() model used to estimate s2 (equal to p by default) Carriero uses 1 in his matlab code

y_0_bar_type

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

Value

priors list containing Phi_prior [k x m], Omega_prior [k x k], S_prior [m x m], v_prior [1x1], where k = mp+d

Details

Set conjugate N-IW priors from lambdas as in Carriero Based on Carriero "Bayesian VARs: Specification Choices and Forecast Accuracy" section 3.2

Examples

data(Yraw) priors <- Carriero_priors(Yraw, p = 4, lambdas = c(0.2, 1, 1, 1, 100, 100)) model <- bvar_conjugate0(priors = priors, keep = 100) # if something goes wrong then we need info! model <- bvar_conjugate0(priors = priors, keep = 10, verbose = TRUE)
#> Y_in is inferred from priors data.
#> Number of lags is inferred from priors data: p = 4
#> Number of lags, p = 4
#> Number of endogeneos variables, m = 3
#> Number of exogeneos variables (including constant), d = 1
#> Number of parameters, k = mp + d = 13
#> Initial number of observations, T_in = 215
#> Number of dummy observations, T_dummy = 4
#> Number of observations available for regression, T = T_in + T_dummy - p = 215
#> 'fast_forecast' is FALSE
#> Calculating (XtX)^{-1}...
#> Calculating Omega_prior^{-1}...
#> Calculating Omega_post...
#> Calculating Phi_post...
#> Calculating S_post...
#> Calculating ~'Omega_post^{1/2}' using chol(Omega_post)...