Smets and Wouter(2007) code from JohannesPfeifer

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.

Smets and Wouter(2007) code from JohannesPfeifer

Postby jykim » Sat Apr 16, 2016 7:59 am

Hi, I am using Dynare 4.3.3 version now. I want to replicate the model of Smets and Wouters(2007) and because their code is not compatible with Dynare 4.3.3
I used the code from JohannesPfeifer's website. I also added and adjust some dynare file using the ones on his website such as 'dynare_estimation', 'dynare_estimation1', 'dynare_estimation_init' and add 'add_path_to_mex_files.m' into the folder because I've got some error message from the functions when I run his code. However, I still have problem that I cannot figure it out.
When I run "Smets_Wouters_2007.mod" I have following error message.

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
The system cannot find the path specified.

Error using dynare (line 217)
DYNARE: preprocessing failed


Could you help me out?

I attached the files regarding to this error.
Attachments
dynare.m
(7.76 KiB) Downloaded 97 times
Smets_Wouters_2007.mod
(7.17 KiB) Downloaded 89 times
jykim
 
Posts: 3
Joined: Sat Apr 16, 2016 7:42 am

Re: Smets and Wouter(2007) code from JohannesPfeifer

Postby jpfeifer » Sat Apr 16, 2016 4:09 pm

You cannot selectively replace individual files from Dynare 4.4.3. Why can't you use that version unaltered?
------------
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: Smets and Wouter(2007) code from JohannesPfeifer

Postby jykim » Sat Apr 16, 2016 7:55 pm

When I use unaltered dynare 4.4.3 version. There are a lot of error messages. Followings are the error messages I have got from the code.

Error using union
Too many input arguments.

Error in dynare_estimation_init (line 347)
k2 = union(var_obs_index,[M_.nstatic+1:M_.nstatic+M_.nspred]', 'rows');

Error in dynare_estimation_1 (line 81)
[dataset_,xparam1, hh, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_,
dname, [], M_, options_, oo_, estim_params_, bayestopt_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in Smets_Wouters_2007 (line 505)
dynare_estimation(var_list_);

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


So I thought I needed to change some files to the ones that are on your website.
jykim
 
Posts: 3
Joined: Sat Apr 16, 2016 7:42 am

Re: Smets and Wouter(2007) code from JohannesPfeifer

Postby jpfeifer » Sun Apr 17, 2016 8:05 am

There is a path conflict here. You have some other Matlab file called union.m that has priority over the one Dynare wants to use.
Please try
Code: Select all
which union

in the Matlab command window after the crash to see which file this is and then remove the corresponding path from your Matlab path.
------------
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: Smets and Wouter(2007) code from JohannesPfeifer

Postby jykim » Sun Apr 17, 2016 9:07 am

Awesome! It works now.
Thank you for your help!
jykim
 
Posts: 3
Joined: Sat Apr 16, 2016 7:42 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests