Using fsolve inside the mod 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.

Using fsolve inside the mod file

Postby bigbenmike » Mon Feb 14, 2011 4:06 am

Hi, guys:

Can I use fsolve inside a mod file, since the computation of the steady state involves some nonlinear roots finding process.

To be exact, can I just put the following line in the "model" block?

#para1=1.0039;
#para2=0.0001;
#ha_ja=.038;

#xx=fsolve(@(x) para2*x^(sigma-1)-1/ha_ja*x^sigma-para1,.4);
#ha_oz=xx(1);


If I cannot do that, how can I solve the steady state if it cannot be done with paper and pen?
bigbenmike
 
Posts: 5
Joined: Tue Oct 12, 2010 11:57 am

Re: Using fsolve inside the mod file

Postby SébastienVillemot » Tue Feb 22, 2011 9:42 am

  • Create a steady_state file for your model: search the forum for examples
  • If needed, you can refer to the steady state values of your variables from the (dynamic) model, using the following syntax: STEADY_STATE(y)
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests