Page 1 of 1

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

PostPosted: Fri Apr 19, 2013 4:14 am
by HouseC
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

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

PostPosted: Fri Apr 19, 2013 12:32 pm
by kyri82
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

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

PostPosted: Fri Apr 19, 2013 3:05 pm
by HouseC
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

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

PostPosted: Thu May 02, 2013 8:07 am
by efi
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.

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

PostPosted: Sun May 05, 2013 4:27 am
by HouseC
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.

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

PostPosted: Tue May 07, 2013 7:52 am
by efi
Thanks for your help!

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

PostPosted: Tue May 07, 2013 8:48 am
by ptr
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

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

PostPosted: Tue May 07, 2013 8:56 am
by efi
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?

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

PostPosted: Tue May 07, 2013 9:10 am
by ptr
please explain what you mean by timing of variables?

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

PostPosted: Tue May 07, 2013 8:41 pm
by jpfeifer
It refers to the timing of predetermined variables. Dynare uses the end of period stock notation. See the manual.

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

PostPosted: Wed May 22, 2013 12:26 pm
by dyn183
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.