is this a problem of using incorrect steady state values?

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.

is this a problem of using incorrect steady state values?

Postby kypark » Mon Nov 15, 2010 9:41 am

Dear users,

It would be greatly appreciated if you give me any tip or advice on this matter.

I am trying to run a model of small open economy with financial frictions. It is just like abstracting out labor market frictions in Christiano, Trabandt, and Walentin's "Introducing Financial Frictions and Unemployment into a Small Open Economy Model" (summary version is here: http://faculty.wcas.northwestern.edu/~lchrist/course/openeconomy.pdf)

My code fails to work in two ways depending on initial values. For example,

(1) if the bankruptcy rate, F(omegabar), is set 0.03, I have the following error message ('FSS = 0.03;' line 121 in the attached mod file):

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


SOLVE: maxit has been reached
??? Error using ==> steady_ at 132
STEADY: convergence problems

Error in ==> steady at 52
steady_;

Error in ==> smallopen_financial1112 at 583
steady;

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

(2) if the bankruptcy rate is set to 0.2, then I get this:

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

??? Undefined function or method 'erf' for input arguments of type 'double' and attributes 'full scalar complex'.

Error in ==> stdnormal_cdf at 39
cdf = (ones (sz) + erf (x / sqrt (2))) / 2;

Error in ==> normcdf at 54
cdf = stdnormal_cdf ((x - m) ./ s);

Error in ==> smallopen_financial1112_static at 100
rhs =normcdf(T300-y(36),0,1);

Error in ==> lnsrch1 at 77
fvec = feval(func,x,varargin{:}) ;

Error in ==> solve1 at 127
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 112
[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 ==> steady_ at 124
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...

Error in ==> steady at 52
steady_;

Error in ==> smallopen_financial1112 at 583
steady;

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



My first question is if both (1) and (2) suggest that I failed to provide correct initial values? I wrote up a separate m file to find more accurate omega and sigma values, but it did not work. I have kept having the error message of (1) or (2). Does the error message in (2) say that error function has an imaginary number in it?

A second question is if there is any other way for me to make this code work or any things to try? Any advice or suggestion would be greatly appreciated. Thank you so much!
Attachments
smallopen_financial1112.mod
(13.04 KiB) Downloaded 209 times
kypark
 
Posts: 2
Joined: Mon Nov 15, 2010 2:08 am

Re: is this a problem of using incorrect steady state values?

Postby jpfeifer » Thu Nov 18, 2010 2:24 pm

Yes, your initial values are wrong. Put
Code: Select all
resid(1);

before the
Code: Select all
steady;
command and Dynare tells you the residuals of each equation given your initial values. Use this information to provide correct starting values.
------------
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: is this a problem of using incorrect steady state values?

Postby kypark » Thu Nov 18, 2010 3:33 pm

Thank you so much! It would be of great help to me.

I tried your recommendation and found huge deviations like the following:

Residual for equation number 1 is equal to -0.11493
Residual for equation number 2 is equal to 0.079208
Residual for equation number 3 is equal to 0.0048029
Residual for equation number 4 is equal to -0.0019767
Residual for equation number 5 is equal to -0.0021447
Residual for equation number 6 is equal to -0.0011612
Residual for equation number 7 is equal to 0.22157
Residual for equation number 8 is equal to 0.51245
Residual for equation number 9 is equal to -0.0041811
Residual for equation number 10 is equal to 0.054044
Residual for equation number 11 is equal to -0.0050829
Residual for equation number 12 is equal to 0.00098358
Residual for equation number 13 is equal to -0.0017458
Residual for equation number 14 is equal to -0.073816
Residual for equation number 15 is equal to 0.016785
Residual for equation number 16 is equal to -0.041064
Residual for equation number 17 is equal to 0.073433
Residual for equation number 18 is equal to 0.016161
Residual for equation number 19 is equal to -0.016222
Residual for equation number 20 is equal to 0.025159
Residual for equation number 21 is equal to 0
Residual for equation number 22 is equal to 0
Residual for equation number 23 is equal to 0.018631
Residual for equation number 24 is equal to 0
Residual for equation number 25 is equal to -0.0034026
Residual for equation number 26 is equal to 0.00064699
Residual for equation number 27 is equal to 0.042928
Residual for equation number 28 is equal to -0.069327
Residual for equation number 29 is equal to 0.065405
Residual for equation number 30 is equal to 6.6746e-007
Residual for equation number 31 is equal to -0.0037928
Residual for equation number 32 is equal to -0.01612
Residual for equation number 33 is equal to -0.041323
Residual for equation number 34 is equal to -0.042602
Residual for equation number 35 is equal to -0.091598
Residual for equation number 36 is equal to 0
Residual for equation number 37 is equal to 0
Residual for equation number 38 is equal to 0
Residual for equation number 39 is equal to 0
Residual for equation number 40 is equal to 0
Residual for equation number 41 is equal to 0
Residual for equation number 42 is equal to 0
Residual for equation number 43 is equal to 0
Residual for equation number 44 is equal to 0

I'll work to fix these. I greatly appreciate for your help. Thank you so much!
kypark
 
Posts: 2
Joined: Mon Nov 15, 2010 2:08 am


Return to Dynare help

Who is online

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