european-central-bank / BEAR-toolbox

The Bayesian Estimation, Analysis and Regression toolbox (BEAR) is a comprehensive (Bayesian Panel) VAR toolbox for forecasting and policy analysis.
101 stars 38 forks source link

Issue with the number of lags in Mixed Frequency VAR #47

Open fpacicco opened 1 year ago

fpacicco commented 1 year ago

Hello. I have an issue with the estimation of a MF-VAR. If i try a different number of lags other than the default 6, it crashes, as it gives an error of incompatible operations between matrices. However, if I change line line 770 of the "...BEAR toolbox\bear+bear\MF_BVAR_BEAR.m" file, from: X_dat(:,1+nv(ii-1) : nv + nv(ii-1)) = X_datf(1+6-ii:end-ii,:); to X_dat(:,1+nv(ii-1) : nv + nv(ii-1)) = X_datf(1+p-ii:end-ii,:); (i.e. changing the 6 to p, the number of lags), it runs fine. Am I missing something here? Thanks!