Steady State problems

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.

Steady State problems

Postby msh855 » Sun Nov 09, 2014 9:31 pm

Hi,

I am attaching in the PDF file my model. The problem as usual is on the finding of Steady State. As you can see in my file, the steady state system I could solve it on its own. That is, I already managed to solve separately from the dynamic block the SS system of equations. The problem arises when I want to simulate the dynamic model. In all cases, the usual error is that dynare cannot find/compute the steady state.

I tried 4 different methods.

    1. Using the computed values of the steady state as initial guesses
    2. Using the steady_state_model block
    3.Using the [Dynamic] [Static] tags
    4. I let dynare to call the particular steady state function i.e calling filename_steady_state.m

In all cases there was a failure to compute the steady state. Your help will be much appreciated
Attachments
model.pdf
This an example of my dynare file
(118.32 KiB) Downloaded 144 times
dynare_model.mod
this is my model
(3 KiB) Downloaded 102 times
msh855
 
Posts: 39
Joined: Thu Feb 23, 2012 8:32 pm

Re: Steady State problems

Postby jpfeifer » Mon Nov 10, 2014 5:08 pm

The steady state model-block is only for perfectly accurate steady states. Otherwise, you must use the initval-block. Using the initval block with your file results in the message
Error using print_info (line 90)
The solution to the static equations is not a steady state of the dynamic model: verify that the equations tagged by [static] and [dynamic] are consistent

Thus, there is something wrong with your [static] equations (or the dynamic ones for this purpose)
------------
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: Steady State problems

Postby msh855 » Mon Nov 10, 2014 5:33 pm

Thank you for your reply. The code, is just a sample from the different methods I used to simulate the model. As I said, I could individually compute the steady state. For instance, I have attached the relevant mod file that does this and it perfectly works. So, the static model is correctly specified. My big mystery is why dynare cannot compute it in my first file, even if I particularly instruct dynare to solve a particular static model, as for instance with [static] tags or with the steady_state_model block. So Either cannot understand what dynare does or I am missing something.
Attachments
dynare_model.mod
(2.75 KiB) Downloaded 89 times
steadystate_code.mod
(1.07 KiB) Downloaded 99 times
msh855
 
Posts: 39
Joined: Thu Feb 23, 2012 8:32 pm

Re: Steady State problems

Postby jpfeifer » Mon Nov 10, 2014 7:53 pm

You need to fix the mistakes in your model setup. If
Code: Select all
A=(1-rho)*Abar+ rho*A(-1)+e;

then the steady state of A is Abar. But you say:
Code: Select all
steady_state_model;
 kh=0.640833;      % ==> The value was computed once I solved the system seperately
 theta=1/(1+kh);
 A=log(Abar);

Moreover, you did not set sigmat and exr. Put
Code: Select all
resid(1)

before steady and first try to make the residuals of the last 2 equations 0.
------------
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: Steady State problems

Postby msh855 » Tue Nov 11, 2014 5:51 pm

I modified the model, according to the attached code but again does not work. Actually, I do not how I could eliminate the remaining residuals which are non zero. I manage to eliminate those for most of the equations but not for two of them.
Even worst, I receive an error message that says

Code: Select all
ERROR: dynare_model.mod:51.9: syntax error, unexpected ']', expecting EQUAL


going to 51.9, the code is

Code: Select all
[dynamic] varho = (psi*Rap)^(1/(1-gamma));                                       
[static]  varho = Rap^(1/(1-gamma));


I cannot see where the problem is with these lines of code.

thanks
Attachments
dynare_model.mod
(3.2 KiB) Downloaded 92 times
msh855
 
Posts: 39
Joined: Thu Feb 23, 2012 8:32 pm

Re: Steady State problems

Postby jpfeifer » Tue Nov 11, 2014 6:07 pm

With the unstable version I am able to run your attached file without the mentioned error message.

Please be more careful in your mod-file. The problematic equations are
Code: Select all
rk=exp(A)*alpha*kh^(alpha-1);
rh=exp(A)*(1-alpha)*kh^(alpha);

Note the exp(A).
In the steady_state_model block you are saying
Code: Select all
 rk=A*alpha*kh^(alpha-1);
 rh=A*(1-alpha)*kh^(alpha);

Note that there is only A. This cannot work.

In addition:
Code: Select all
[dynamic] sigmat=sigma*(1-z*ln(A))^2;
[static] sigmat=sigma;

Neither z is 0 in steady state nor is ln(A). How then can sigma then be the steady state of sigmat? Clearly, the static equation does not match the dynamic one.
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests

cron