Initial Value Problem

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.

Initial Value Problem

Postby BProfane » Wed Feb 27, 2013 4:30 pm

Hello,

I am trying to simulate a shock to the money supply in a new Keynesian model. It is essentially what gali does in chapter 3 of his book. Every time I do this I get the following error;

Error using lnsrch1 (line 53)
Some element of Newton direction isn't finite. Jacobian maybe
singular or there is a problem with initial values
Error in solve1 (line 129)
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});
Error in dynare_solve (line 130)
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,
bad_cond_flag, varargin{:});
Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname '_static'],...
Error in steady_ (line 54)
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in econ924_dynare_example (line 188)
steady;
Error in dynare (line 120)
evalin('base',fname) ;

has anyone any idea why this might be?
Attachments
BNKMoney.mod
(4.28 KiB) Downloaded 61 times
BProfane
 
Posts: 4
Joined: Tue Feb 26, 2013 12:02 am

Re: Initial Value Problem

Postby kyri82 » Thu Feb 28, 2013 3:23 pm

Hi,

After running the model, type the following command: model_diagnostics(M_,options_,oo_). It gives you the same error as before, plus an additional message:

The following endogenous variables aren't present at the current period in the model:
mu

Variable "mu" is declared but appears nowhere in the model. However, it is given and initial value for the steady-state. What is it and what does it do? Make sure you solved the model correctly.

Kyriacos
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Initial Value Problem

Postby BProfane » Wed Mar 06, 2013 1:28 pm

Hello, I checked the file and mu shouldn't have been there, i've made a few changes but still get the same message.
Attachments
Monetary2.mod
(4.12 KiB) Downloaded 57 times
BProfane
 
Posts: 4
Joined: Tue Feb 26, 2013 12:02 am

Re: Initial Value Problem

Postby donihue » Wed Mar 06, 2013 5:56 pm

If you eliminate the variables m and p (and the two associated equations) your model will work
Regards
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests