Solving for Steady State with an external matlab file

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.

Solving for Steady State with an external matlab file

Postby zsk3 » Wed Mar 13, 2013 4:33 am

Hi,

I can find the solution to the steady state of my model using two matlab files. Since my steady state equations are nonlinear, I'm using fsolve. fertility1_steadystate.m and steady_state.m codes work fine for finding the steady state solutions, however I couldn't find a way to make the .mod file get the results. I think Dynare has a problem on calling a function that depends on another function. What would you suggest me to do?

Thank you for your concern.
Attachments
steady_state.m
(834 Bytes) Downloaded 448 times
fertility1_steadystate.m
(267 Bytes) Downloaded 350 times
fertility1.mod
(1.1 KiB) Downloaded 266 times
zsk3
 
Posts: 5
Joined: Wed Mar 13, 2013 4:17 am

Re: Solving for Steady State with an external matlab file

Postby jpfeifer » Wed Mar 13, 2013 7:39 am

Write and use a correct steady state file, see http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=1834
------------
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: Solving for Steady State with an external matlab file

Postby zsk3 » Wed Mar 13, 2013 8:57 pm

Hi,

Thank you for your prompt reply. I studied over the steadystate files in the link. I realized that in the steady state equations, each variable is defined in terms of the variables defined before. Therefore the equations are simple enough. In my model, at least three variables are defined with equations that are highly nonlinear, so it is not possible for me to write an equation for each variable one at a time. This is why I solved for the steady state using an external matlab code. Does Dynare offer any solutions for complex steady states?

Thanks a lot.
zsk3
 
Posts: 5
Joined: Wed Mar 13, 2013 4:17 am

Re: Solving for Steady State with an external matlab file

Postby jpfeifer » Wed Mar 13, 2013 9:26 pm

The SS-file passes the parameters from Dynare to your code and then back to Dynare. Within the block given by the SS-file you can execute any code in whatever order you like as long as at the end of your computation all SS-values have have been set. You can easily call other functions like the one you wrote or numerical optimizers within your steady state file.
------------
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: Google [Bot] and 4 guests