pls help: problem of steady state in a log linearized model

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.

pls help: problem of steady state in a log linearized model

Postby HouseC » Fri Apr 19, 2013 4:14 am

hi, i am a new user of dynare and I was trying to calibrate the paper of Gerter and Kiyotaki 2010. my model is a log linearized model, so far i have give initial value and defined all the variables in the model. somehow, the model did not work. the below is the error information provided by dynare 4.3.2

Please check for example
i) if all parameters occurring in these equations are defined
ii) that no division by an endogenous variable initialized to 0 occurs
??? Error using ==> print_info at 57
Impossible to find the steady state.
Either the model doesn't have a steady
state, there are an infinity of steady
states, or the guess values are too far
from the solution

Error in ==> check at 76
print_info(info, options.noprint);

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

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

question is: since the model is a version of lig linearization, the steady state required by dynare should be equal to zero, while the original model's steady state can be used as parameters, so i cannot fix the problem, pls help. And the mod.file is attached.

best regards

House
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: pls help: problem of steady state in a log linearized mo

Postby kyri82 » Fri Apr 19, 2013 12:32 pm

Hi,
first of all, if you put your model in a log-linear form then you start the "model block" with

model(linear)
....
....
end;

That is, you specify to dynare that the model is already linearised. Then, in that case, you do not need to tell dynare to estimate the steady state so you can skip the command "steady;" (which btw should appear before the command "check;"). however, it is good to include always the command "check;"

If you do these changes and run Dynare then you get this message:


Warning: Matrix is singular to working precision.
> In resol at 102
In check at 45
In GK2 at 256
In dynare at 132
??? Error using ==> print_info at 36
MJDGGES returns the following error code: 16

Error in ==> check at 50
print_info(info, options_.noprint);

Error in ==> GK2 at 256
check;

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

In your model, you declare many parametres that you do not initialise, i.e. you do not give them a value. As a result, the M_.params matrix has a lot of NaN entries which might be the cause of the problem. Either initiate the parametres or totally remove them if they are not used.

Hope that helps.

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

Re: pls help: problem of steady state in a log linearized mo

Postby HouseC » Fri Apr 19, 2013 3:05 pm

kyri82 wrote:Hi,
first of all, if you put your model in a log-linear form then you start the "model block" with

model(linear)
....
....
end;

That is, you specify to dynare that the model is already linearised. Then, in that case, you do not need to tell dynare to estimate the steady state so you can skip the command "steady;" (which btw should appear before the command "check;"). however, it is good to include always the command "check;"

If you do these changes and run Dynare then you get this message:


Warning: Matrix is singular to working precision.
> In resol at 102
In check at 45
In GK2 at 256
In dynare at 132
??? Error using ==> print_info at 36
MJDGGES returns the following error code: 16

Error in ==> check at 50
print_info(info, options_.noprint);

Error in ==> GK2 at 256
check;

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

In your model, you declare many parametres that you do not initialise, i.e. you do not give them a value. As a result, the M_.params matrix has a lot of NaN entries which might be the cause of the problem. Either initiate the parametres or totally remove them if they are not used.

Hope that helps.

Kyri


Thanks for your kindly instruction, kyri. I will try to initialize the parameters.

House
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: pls help: problem of steady state in a log linearized mo

Postby efi » Thu May 02, 2013 8:07 am

Hallo House,

I try to solve the Gertler and Kiyotaki Model, too. I have a question, perhaps you can help me. I don't know how to deal with the parameter 'Inverse elasticity of net investment to the price of capital ' = 1500. First I thought that I can insert the investment adjustment cost function into the model equations. But I'm not sure if I first ought to log-lineraze my model or if I can use the normal equation. How did you handle this? I saw you have taken the variable 'f = 1.500' as parameter but I am not sure if this is the same definition as in this article (I*f'/f'' = 1500). Could you give me a hint? I would be glad to hear from you.
efi
 
Posts: 8
Joined: Thu May 02, 2013 7:26 am

Re: pls help: problem of steady state in a log linearized mo

Postby HouseC » Sun May 05, 2013 4:27 am

efi wrote:Hallo House,

I try to solve the Gertler and Kiyotaki Model, too. I have a question, perhaps you can help me. I don't know how to deal with the parameter 'Inverse elasticity of net investment to the price of capital ' = 1500. First I thought that I can insert the investment adjustment cost function into the model equations. But I'm not sure if I first ought to log-lineraze my model or if I can use the normal equation. How did you handle this? I saw you have taken the variable 'f = 1.500' as parameter but I am not sure if this is the same definition as in this article (I*f'/f'' = 1500). Could you give me a hint? I would be glad to hear from you.


It's due to some mathematical tech. In Gertler and Karadi(2010), they put directly the explicit expression which content the eta value, which is the same as "f" in this file.
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: pls help: problem of steady state in a log linearized mo

Postby efi » Tue May 07, 2013 7:52 am

Thanks for your help!
efi
 
Posts: 8
Joined: Thu May 02, 2013 7:26 am

Re: pls help: problem of steady state in a log linearized mo

Postby ptr » Tue May 07, 2013 8:48 am

Hi Guys,

Am also a biginner in dynare. Am running my file and get the message below.

Warning: Matrix is singular to working precision.
> In evaluate_steady_state at 76
In steady_ at 54
In steady at 81
In Work_in_progressX at 231
In dynare at 120

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0.15
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : -0.8
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0


??? Error using ==> print_info at 63
The steady state contains NaN or Inf

Error in ==> steady at 92
print_info(info,options_.noprint);

Error in ==> Work_in_progressX at 231
steady;

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

I've checked and all my parameters have and are used in the model. Could some one please help me out. I've got a dealine and need to figure this out.

Thanks in advance. Ptr
ptr
 
Posts: 30
Joined: Fri Apr 19, 2013 9:58 am

Re: pls help: problem of steady state in a log linearized mo

Postby efi » Tue May 07, 2013 8:56 am

Sorry, until now my model doesn't work, too. I am also a beginner. Perhaps you have a mistake in the timing of variables, too?
efi
 
Posts: 8
Joined: Thu May 02, 2013 7:26 am

Re: pls help: problem of steady state in a log linearized mo

Postby ptr » Tue May 07, 2013 9:10 am

please explain what you mean by timing of variables?
ptr
 
Posts: 30
Joined: Fri Apr 19, 2013 9:58 am

Re: pls help: problem of steady state in a log linearized mo

Postby jpfeifer » Tue May 07, 2013 8:41 pm

It refers to the timing of predetermined variables. Dynare uses the end of period stock notation. See the manual.
------------
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: pls help: problem of steady state in a log linearized mo

Postby dyn183 » Wed May 22, 2013 12:26 pm

Hi,

I am also trying to replicate the GK model , but I am not sure how to link the obs variables to the model attached (model1)
model1.mod
(4.64 KiB) Downloaded 170 times
. Could you please advise me?
Also, I have tested the model in exp logs (please see FA model attached)
FA.mod
(8.06 KiB) Downloaded 122 times
, but the results are not appropriate, meaning the observable variables do not match with the implied ones (the graphs generated by the smoother option).

Please advise if this is the issue - the data matching data or it might be the calibration and priors.

Thank you in advance for your help.
dyn183
 
Posts: 3
Joined: Tue Mar 12, 2013 12:02 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests