Smets - wouters model and dynare 4.6.4

sytest3.mod (6.2 KB)
swdata.xlsx (22.7 KB)
Hey, Professor, @jpfeifer , please need your help with the model smets and wouters I worked on your previous tips on the model, and on application I showed up with a bunch of mistakes, and I’m a beginner on the Dayner program.
Greetings Professor

1 Like

You do not have proper observation equations. Please have a look at Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” .

Also see DSGE_mod/Smets_Wouters_2007_45.mod at master · JohannesPfeifer/DSGE_mod · GitHub

1 Like

Thanks professor , Greetings Professor, I worked on reading the requirement and I made a duplicate of the smets- wouters
data.xlsx (29.7 KB)
iraq.mod (21.2 KB)
2007 model and I faced this problem, please what should I do to solve it, I am an economics student and I do not have much experience in programming and for the first time I write a program, thank you very much for your help,
the error is :slight_smile:
dynare iraq.mod
Using 64-bit preprocessor
Starting Dynare (version 4.6.4).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
ERROR: iraq.mod: line 410, col 52: syntax error, unexpected ‘.’, expecting COMMA or ‘)’

Error using dynare (line 282)
Dynare: preprocessing failed

The name of the datafile needs to be in quotes:
iraq.mod (20.9 KB)

1 Like

Thank you very much, Professor @jpfeifer, for your efforts. Please, there is another error that appears to me. Can you look at the file to find out and fix the errors because I am unable to fix them, I thank you very much
data.xlsx (15.8 KB)
iraq.mod (20.9 KB)
I’m so sorry, but I’m very new to the program, please help me in dealing with the error messages


1 Like

Thank you very much, Professor @jpfeifer , the form is working, but the outputs are repeated and there are warning messages, what is the reason for it:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =

In newrat (line 163)
In dynare_minimize_objective (line 320)
In dynare_estimation_1 (line 228)
In dynare_estimation (line 105)
In iraq.driver (line 635)
In dynare (line 293)
Operation terminated by user during kalman_filter (line 162)

In dsge_likelihood (line 674)
[LIK,lik] = kalman_filter(Y,diffuse_periods+1,size(Y,2), …

In penalty_objective_function (line 33)
[fval, info, exit_flag, arg1, arg2] = fcn(x, varargin{:});

In mr_gstep (line 59)
fx = penalty_objective_function(xh1,func0,penalty,varargin{:});

In newrat (line 167)
[fvala, x0, ig] = mr_gstep(h1,x0,bounds,func0,penalty,htol0,Verbose,Save_files,varargin{:});

In dynare_minimize_objective (line 320)
[opt_par_values,hessian_mat,gg,fval,invhess,new_rat_hess_info] =

In dynare_estimation_1 (line 228)
[xparam1, fval, exitflag, hh, options_, Scale, new_rat_hess_info] =

In dynare_estimation (line 105)

In iraq.driver (line 635)

In dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

data.xlsx (15.8 KB)
iraq.mod (20.8 KB)

Which Dynare version are you using? Also note that your data is extremely volatile. You should adjust priors to reflect the different country and get rid of the explicit bounds of priors.

1 Like

many Thank you professor @jpfeifer for the answer, I use dynare version 4.6.4, I don’t know how to modify the form to fit the data, can you help me please

stderr eg,0.6090,0.01,3,INV_GAMMA_PDF,0.1,2;

is an example. I codes 0.01 as the lower and 3 as the upper bound. At a minimum, you need to delete the bounds (see the manual):

stderr eg,0.6090,INV_GAMMA_PDF,0.1,2;

and set prior_trund=0.