steady state, fsolve and Dynare.

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, fsolve and Dynare.

Postby moh » Thu Apr 08, 2010 5:52 pm

Dear all,
Currently I'm trying to solve my dsge model. To do so, I used fsolve and I found the exact values of the steady state. My question is: what should I do so that Dynare takes into account these values as the exact steady state values but not as the initial values?
Thank you for your help.
Best regards
mohamed
moh
 
Posts: 12
Joined: Fri Jan 29, 2010 9:16 pm

Re: steady state, fsolve and Dynare.

Postby jpfeifer » Fri Apr 09, 2010 5:24 pm

Dear Mohamed,
If you already solved the steady state in a Matlab-file, you can use it directly. As the user guide says:
The alternative is to write a Matlab program to find your model's steady
state. Doing so has the clear advantages of being able to incorporate your
Matlab program directly into your .mod file so that running loops with diff er-
ent parameter values, for instance, becomes seamless. NOTE! When doing so,
your matlab (.m) file should have the same name as your .mod file , followed
by _steadystate. For instance, if your .mod file is called example.mod, your
Matlab fi le should be called example_steadystate.m and should be saved in
the same directory as your .mod file. Dynare will automatically check the di-
rectory where you've saved your .mod file to see if such a Matlab file exists. If
so, it will use that file to find steady state values regardless of whether you've
provided initial values in your .mod file.


For an example how to do it and for a program to add the required code to import and export both the parameters and the steady state values to Dynare, see the post:

http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=1834&p=5055&hilit=steadystate.m#p5055

Best,

Johannes
------------
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, fsolve and Dynare.

Postby rdoctors » Thu Sep 03, 2015 8:23 pm

Hello, I'm working with a fiscal model in both matlab and octave (octave 3.8.1 and dynare version 4.4.3). My routine is to run a simulation file, where I set the value of parameters and compute the steady state (calling mod_fiscal_04_ss_solve), prior to runing the .mod file. The idea is to variate the nr_i parameter (it can be 0.2, 0.4, 0.6) which stands for the proportion of non-ricardian agents (who work) in the economy. When I run this simulation file on matlab, it works perfectly. However, when running in octave, it doesn't "work" for nr_i = 0.2 and nr_i = 0.6 . I've checked the steady state values and they are equal for 0.4 but different for 0.2. Does anyone know why this is happening? The files (.m and .mod) are attached.

Thank you!!!!

p.s: I believe the problem is in the fsolve() function (found in the mod_fiscal_04d_ss_solve.m file)
Attachments
mod_fiscal_04_ss_solve.m
(11.91 KiB) Downloaded 157 times
mod_fiscal_04_ss.m
(11.13 KiB) Downloaded 132 times
mod_fiscal_04d_ajs_tax.mod
(28.21 KiB) Downloaded 121 times
simula_mod_fiscal_04_bre_02b.m
(13.41 KiB) Downloaded 104 times
rdoctors
 
Posts: 9
Joined: Tue Jul 28, 2015 8:43 pm

Re: steady state, fsolve and Dynare.

Postby jpfeifer » Sat Sep 05, 2015 4:31 pm

You need to do some thorough debugging. For nr_i=0.2, the mod_fiscal_04_ss_solve.m already returns different steady state values. Could it be that your steady state is not unique and Matlab and Octave converge to different steady states?
------------
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 2 guests

cron