Hi, I have had problem importing data to Dynare:
please see attached are my excel file and mat file,
I used the code
a=xlsread(‘data’);
save usmodel_data a
to tranform the xls data file into mat file
I used the :
estimation(datafile=usmodel_data,mode_compute=4, mh_replic=0);
command to import data to Dynare, while the error message says:
Error using load_mat_file_data_legacy (line 30)
makedataset: The variable(s) dy, dc, dinve, labobs, pinfobs, dw, robs listed in varobs are not contained in the dataset
That will not work. You are saving only one matrix named a into the data file that you load. But Dynare expects several vectors with the name of the individual data series. Is there a reason you do not lead the Excel-file directly?
Hi prof, thanks for your reply,which has helped me resolve the issue.
Please could you help me with another question?
regarding the graphs produced by shock_decomposition command, the defaults uses different colours to differentiate different groups, is it possible to adapt it ( dashed, shaded, filled) to suit the black and white print?
Dynare does not provide such an option. You either need to recreate the graph you desire based on the results in oo_.shock_decomposition or you can use Matlab’s figure editor to change the graph Dynare produces.