BVAR-DSGE are now implemented in DYNARE (I still have to document it in the official release). Here is an example that shows how a BVAR-DSGE may be estimated with DYNARE as in Del Negro & Schorfheide (2004):
If you uncomment the “estimation” command at line 99 (and comment out the same command in lines 104-108), that will compute the mode and store it in oo_.posterior_mode. You can then retrieve the modal values of the parameters and construct your own mode_file (see the documentation for the estimation command).
It’s even easier – after running the first estimation, the BVARDSGE1_mode file is created automagically. So just run the model again with the other estimation command.
After running the BVAR-DSGE code with my model, dynare generates the following error messages after provding the prior plots. Is this related to my chioce of the number of first observation? or my observation sample size is too small: nobs = 36. Also I have five observables for the VAR model (serven shocks for the DSGE)
**??? Index exceeds matrix dimensions.
Error in ==> d:\dynare_v3.065\matlab\VarSampleMoments.m
On line 41 ==> Y = data(FirstObservation:LastObservation,:);
Error in ==> d:\dynare_v3.065\matlab\dynare_estimation.m
On line 235 ==> evalin(‘base’,’[mYY,mXY,mYX,mXX,Ydata,Xdata] = ’ …
Error in ==> D:\Matlab7.0\work\dsgevarhag.m
On line 302 ==> dynare_estimation(var_list_);
Error in ==> d:\dynare_v3.065\matlab\dynare.m
On line 26 ==> evalin(‘base’,fname) ;**