Page 3 of 5

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Tue May 13, 2014 9:33 am
by georgiana_alina
Hello again,

I have attached the zip containing the mode file.

Many thanks,

Have a nice day!

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Tue May 13, 2014 9:54 am
by jpfeifer
The run you uploaded looks better. What looked like a bug is gone there. It rather looks like a problem with your data. Your data looks completely different from the Smets/Wouters data and it does not look as if you adjusted the observation equations and the priors accordingly.

For example, SW2007 use the net quarterly interest rate multiplied by 100. You seem to use the simple gross annual interest rate.
Please have a look at the data description in the appendix of Smets/Wouters and Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf for more details.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Sat Jun 07, 2014 10:08 pm
by georgiana_alina
Hello,

Can anyone help me with some indications regarding the attached variance decomposition graphs (graph 1 and graph 2)?
These doesn't seem like being correct.
I have tried to demean the series of data and I have also checked that the shocks are white noises (around 0) but the results doesn't improve.

Thanks a lot.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Sun Jun 08, 2014 7:13 am
by jpfeifer
Look at the smoothed shock series to see whether they are roughly mean zero.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Sun Jun 08, 2014 7:33 pm
by georgiana_alina
Yes, I have already checked this and they are around zero (white noises).

Can be another reason?

Thanks a lot

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Jun 09, 2014 9:25 am
by jpfeifer
Then it's hard to tell. Your graph can be correct. Do you have any reason to be suspicious about your results (apart from the fact that your scaling for y looks weird)?

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Jun 09, 2014 3:25 pm
by georgiana_alina
Actually, all the other diagnostics seems ok.

Now, that you told me, I have took a new look at the smoothed shocks and I have attached them for each of the previous two decomposition graphs.

In case of the first graph, investment shocks, on that scale between -200 and 200 reaches -100 one time, at the very beginning

Also, wages shock reached -50, for a scale between -100 and respectively 100.

Should this also be the main cause?

Big thanks,

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Jun 09, 2014 8:21 pm
by jpfeifer
I don't know your data. But my feeling is that you are treating some observables wrong. Why should they have a scale in the hundreds? Moreover, the shocks suggest the presence of a seasonal pattern. Have you made sure all your data is seasonally adjusted?

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Jan 19, 2015 5:20 pm
by selima
Dear Jpfeifer . I don' t use the model of (Smets and Wouters) . The dynare 's version is 4.4.1 . In fact I have obtained the same message of error concerning 'strsplit 'which is

??? Undefined function or method 'strsplit'
for input arguments of type 'char'.

Error in ==> dynare_estimation_1 at 356
options_list =
strsplit(options_.optim_opt,',');

Error in ==> dynare_estimation at 84
dynare_estimation_1(var_list,dname);

Error in ==> article4 at 379
dynare_estimation(var_list_);

Error in ==> dynare at 174
evalin('base',fname) ;


but when I try strsplit.m I obtain another error which is


??? Undefined function or method 'Warning' for
input arguments of type 'char'.

Error in ==> dynare_estimation_1 at 388
Warning(['gmhmaxlik:
Unknown option ('
options_list{2*(o-1)+1}
')!'])

Error in ==> dynare_estimation at 84
dynare_estimation_1(var_list,dname);

Error in ==> article4 at 379
dynare_estimation(var_list_);

Error in ==> dynare at 174
evalin('base',fname) ;

Can you help me please? sorry for asking you many questions :(

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Jan 19, 2015 6:47 pm
by jpfeifer
Please upgrade to 4.4.3. That should help.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Mar 09, 2015 1:44 am
by missredridinghood
If you want to calculate the correlations of the variables or change time periods, how do you do that using Dynare?

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon Mar 09, 2015 12:07 pm
by jpfeifer
What do you mean? In the context of Bayesian estimation, use the moments_varendo option for the moments and the nobs and first_obs options for the sample. See the manual.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Thu May 14, 2015 11:04 pm
by xuz
Hi Professor,

I can run "dynare usmodel_shock_decomp.mod" on my 4.4.3, but when I run "dynare usmodel_stst.mod" I got the following message:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
ERROR: usmodel_stst.mod: line 23, cols 1-0: syntax error, unexpected $end


There's no line 23 in the mod file. And if I delete line 22, the message still shows up.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Fri May 15, 2015 9:22 am
by jpfeifer
The usmodel_stst.mod is not for running it with Dynare. It just contains the steady state.

Re: Smets/Wouters (2007) in Dynare 4.2.5

PostPosted: Mon May 25, 2015 5:44 pm
by g4johnso
Hi,

I am using MATLAB version 2014a along with Dynare 4.2.5 in order to run the posted Smets-Wouters program.

I am receiving the following error message(s):

The class RandStream has no property or method named 'setDefaultStream'.

Error in set_dynare_seed (line 35)
reset(RandStream.setDefaultStream(s));

Error in global_initialization (line 319)
set_dynare_seed('default');

Error in usmodel_shock_decomp (line 16)
global_initialization;

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

I am under the impression this is due to the version of MATLAB I am using. Any suggestions on how to overcome this problem? Thank you very much!