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” sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf .

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

Use

estimation(datafile='data.xlsx',xls_range=B1:H68,mode_compute=5,first_obs=1,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.20,mh_drop=0.2,tex);
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 =
3.119043e-27.

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] =
newrat(objective_function,start_par_value,bounds,analytic_grad,crit,nit,0,Verbose,
Save_files,hess_info,varargin{:});

In dynare_estimation_1 (line 228)
[xparam1, fval, exitflag, hh, options_, Scale, new_rat_hess_info] =
dynare_minimize_objective(objective_function,xparam1,options_.mode_compute,options_,[bounds.lb
bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_);

In dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

In iraq.driver (line 635)
oo_recursive_=dynare_estimation(var_list_);

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.