Missing Example Files

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Missing Example Files

Postby Konstantin Vasilev » Tue Jul 23, 2013 10:57 am

Hello,

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 datafi le (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.

Regards,

Konstantin
Konstantin Vasilev
 
Posts: 13
Joined: Tue Jul 23, 2013 10:46 am

Re: Missing Example Files

Postby jpfeifer » Tue Jul 23, 2013 12:35 pm

------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Missing Example Files

Postby Konstantin Vasilev » Tue Jul 23, 2013 3:10 pm

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) ;
end
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
Konstantin Vasilev
 
Posts: 13
Joined: Tue Jul 23, 2013 10:46 am

Re: Missing Example Files

Postby jpfeifer » Tue Jul 23, 2013 4:00 pm

The Matlab "Current Folder" must be set where the mod-file has been saved.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Missing Example Files

Postby Konstantin Vasilev » Tue Jul 23, 2013 9:41 pm

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)
bvar_density(8);

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

Thank you
Attachments
KapBVARdata.xls
(41.5 KiB) Downloaded 95 times
bvar.mod
(279 Bytes) Downloaded 134 times
Konstantin Vasilev
 
Posts: 13
Joined: Tue Jul 23, 2013 10:46 am

Re: Missing Example Files

Postby jpfeifer » Wed Jul 24, 2013 6:09 am

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.
Attachments
KapBVARdata.xls
(44.5 KiB) Downloaded 123 times
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests