Minimizing negative welfare

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.

Minimizing negative welfare

Postby bpyemba » Mon Sep 30, 2013 4:41 pm

I am getting that message when I am minimizing the negative welfare of the representative agent.

??? Reference to non-existent field 'eigval'.

Error in ==> check at 80
eigenvalues_ = dr.eigval;

Error in ==> welfare4_loop_det at 333
oo_.dr.eigval = check(M_,options_,oo_);

Error in ==> cond_welfare at 30
welfare4_loop_det

Error in ==> fminsearch at 265
x(:) = y; f = funfcn(x,varargin{:});

Error in ==> max_cond_welfare at 46
[bigtheta_star,condwelfare_star] = fminsearch('cond_welfare',bigtheta_start,options);

How can I solve the problem?

Thanks,

Boniface
bpyemba
 
Posts: 13
Joined: Wed Feb 20, 2013 6:38 am

Re: Minimizing negative welfare

Postby jpfeifer » Mon Sep 30, 2013 6:26 pm

Please post a mod-file documenting the issue and state the version of Dynare you are using.
------------
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: Minimizing negative welfare

Postby bpyemba » Mon Sep 30, 2013 7:03 pm

I am using the version 4.3.3> Besides, the file is max_cond_welfare.

Here is the problem

>> max_cond_welfare

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.

Starting Dynare (version 4.3.3).
Starting preprocessing of the model file ...
Found 25 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Total computing time : 0h00m04s

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.

Starting Dynare (version 4.3.3).
Starting preprocessing of the model file ...
Found 25 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Total computing time : 0h00m04s
Total computing time : 0h00m02s
Total computing time : 0h00m02s

Iteration Func-count min f(x) Procedure
0 1 -20.1585
Total computing time : 0h00m01s
Total computing time : 0h00m01s
Total computing time : 0h00m01s
Total computing time : 0h00m01s
Total computing time : 0h00m01s
Total computing time : 0h00m01s
??? Reference to non-existent field 'eigval'.

Error in ==> check at 80
eigenvalues_ = dr.eigval;

Error in ==> welfare4_loop_det at 333
oo_.dr.eigval = check(M_,options_,oo_);

Error in ==> cond_welfare at 30
welfare4_loop_det

Error in ==> fminsearch at 265
x(:) = y; f = funfcn(x,varargin{:});

Error in ==> max_cond_welfare at 46
[bigtheta_star,condwelfare_star] = fminsearch('cond_welfare',bigtheta_start,options);
Attachments
boniface.zip
(4.75 KiB) Downloaded 82 times
bpyemba
 
Posts: 13
Joined: Wed Feb 20, 2013 6:38 am

Re: Minimizing negative welfare

Postby jpfeifer » Mon Sep 30, 2013 7:27 pm

Try following the steps outlined here:
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891
to program a more efficient loop.
The issue seems to be that you do not allow for stoch_simul to fail, e.g. due to Blanchard-Kahn violations. In this case, the eigenvalues will not be computed/stored. At the previous link, you will see that
Code: Select all
info=stoch_simul(var_list_)

is called. Here, info stores the exit code of stoch_simul. If it is 0, everything is fine. If info>0, the solution could not be computed and you need to attach a penalty for this outcome to deal with your optimizer.
------------
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: Minimizing negative welfare

Postby bpyemba » Mon Sep 30, 2013 8:16 pm

Thanks.

Boniface
bpyemba
 
Posts: 13
Joined: Wed Feb 20, 2013 6:38 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests