Missing Example Files


I am trying to run a BVAR a la sims forecast as the one described in the “bvar-a-la-sims.pdf” file.

However, in section 6 of this document the path to the example files is described as: “This section presents two short examples of BVAR estimations. These examples and the associated datafile (bvar sample.m) can be found in the tests/bvar a la sims directory of the Dynare v4 subversion tree.”

I have searched the entire dynare directory. Tried to download different versions and everything. I could not find any test directory and any bvar example files.

Please help me I need to see these files for a BVAR estimation that I am doing for my Msc Dissertation.



See here github.com/DynareTeam/dynare/tree/master/tests/bvar_a_la_sims

Thank you so much. However, the problems continue although I have read the documentation about installation and dynare invocation.

The first error is after the commad: “dynare bvar” or “dynare bvar.mod” - Error in dynare.m line 96: “cannot open bvar.mod” (I have added the correct filepath with addpath)

When I tried with the whole file path command: “dynare C:…\bvar.mod” instead of the first Error now it was: “Error using dynare (line 120) Error: Unexpected MATLAB operator.”

On line 120 in dynare.m as far as I can infer there must be some checks for the filename:

“if ~ isempty(find(abs(fname) == 46))
fname = fname(:,1:find(abs(fname) == 46)-1) ;
evalin(‘base’,fname) ;”

I don’t understand, I have followed the instructions for installation and added the directory paths, so do you know what is this problem about?

Thank you

The Matlab “Current Folder” must be set where the mod-file has been saved.

Thank you for the patience and I apologize for the stupid questions.

The example files are now running well. However, when I tried to use excel file as the source of data I encountered many problems. I found another topic in the forum for similar problems and tried everything suggested there (specifying excel sheet and range) without any help. I can use .m file as in the bvar example but for larger datasets it will be extremely inconvenient.

The errors are:

Subscripted assignment dimension mismatch.

Error in read_variables (line 98)
dyn_data_01(:,dyn_i_01) = dyn_tmp_01;

Error in bvar_toolbox (line 65)
dataset = read_variables(options_.datafile, options_.varobs, ], options_.xls_sheet, options_.xls_range);

Error in bvar_density (line 33)
[ny, nx, posterior, prior] = bvar_toolbox(nlags);

Error in bvar (line 65)

Error in dynare (line 120)
evalin(‘base’,fname) ;

Thank you
KapBVARdata.xls (41.5 KB)
bvar.mod (279 Bytes)

For some reason, your data is saved as text in the Excel file. I guess it’s a problem with the decimal separator. Attached is a working version.
KapBVARdata.xls (44.5 KB)