Page 1 of 1

Steady State and Residuals PRoblems

PostPosted: Sat Apr 18, 2015 3:27 am
by Alkebulan
Hi Dynare Community,
I set up an Open Econ model as in Gali-Monacelli (2005). I solved for the SS by hand and then set the initial values to the SS values, but Dynare tells me it can't find the SS. 3 equations have residuals different than 0 and I cannot find out why. I have tried many different things and suggestions but still no luck.
Ultimately I wanna get a Ramsey approximation to both policy rules (monetary and fiscal) but I wanna make sure everything is fine before I go any further. Any help would be appreciate it.

Re: Steady State and Residuals PRoblems

PostPosted: Sun Apr 19, 2015 9:01 am
by jpfeifer
There must still be something wrong with your model. Either your steady state computations or the model equations are wrong. You need to find out why. Use a steady_state_model-block instead of the initval block if you have an analytical steady state.
With the unstable version, I can make Dynare find a steady state, but there is also a singularity warning:
MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 2 colinear relationships between the variables and the equations
Relation 1
Colinear variables:
Gp
TOT
Yi
Li
MCi
Relation 2
Colinear variables:
E
Relation 1
Colinear equations
1 14 17 18 19 20 22 31 32 33 35

Relation 2
Colinear equations
14 18 19 20 22 31 32 33

If nothing else works, start with a simpler version of the model (e.g. drop nominal rigidities) and then make the model work and slowly rebuild the more complicated features.

Re: Steady State and Residuals PRoblems

PostPosted: Mon Apr 20, 2015 9:04 pm
by Alkebulan
Thank you for your reply. I have tried everything you suggested.
1- I used the F command to verify my SS calculations and it looks fine.
2- I log linearized the model and was able to get the IRFs and everything works fine.
3- But the non linear model won't run. ERROR message: Steady File fails to compute SS.
4- Is there some obvious mistake I might be making and be aware of?
5- And when I open the oo_steady_state, there are some values there. What does that mean?
6- And I used the unstable version too...still nothing.

Any pointer would be welcome.

Thanks,

Re: Steady State and Residuals PRoblems

PostPosted: Mon Apr 20, 2015 9:13 pm
by jpfeifer
1. What do you mean?
2. That tells you nothing, because linearization does usually not check the steady state for consistency. You can linearize around any point.
4. As I said: at least one of two things is wrong: your model equations or the steady state computation.

Re: Steady State and Residuals PRoblems

PostPosted: Mon Apr 20, 2015 11:16 pm
by Alkebulan
1- sorry, I meant, The F9 command in matlab...
2- True...
3- I'll keep checking my work I guess.

Thanks for your help.

Re: Steady State and Residuals PRoblems

PostPosted: Wed Apr 22, 2015 9:15 pm
by Alkebulan
Hey,
Quick Question: How do I enter a log utility (sigma=1)??
I got the model to work and when I run the Ramsey it returns an error and I read on here that it has to do with log utility.

Cheers

Re: Steady State and Residuals PRoblems

PostPosted: Wed Apr 22, 2015 9:34 pm
by jpfeifer
You need to enter it explicitly as a log, as Dynare cannot take the limit of the CES function for you. See the agtrend.mod in the Dynare examples folder on how to use the macro language to create a case distinction in your mod-file.

Re: Steady State and Residuals PRoblems

PostPosted: Thu Apr 23, 2015 8:11 pm
by Alkebulan
Hello Jpfeifer,
Another question: Is there a way to get the discretionary policy with a non linear model? I need to compare the IRF under commitment, discretion and Exchange rate peg.
Thank you (making progress each time).

Re: Steady State and Residuals PRoblems

PostPosted: Sun Apr 26, 2015 8:14 am
by jpfeifer
As far as I know, this is not yet supported.

Re: Steady State and Residuals PRoblems

PostPosted: Thu May 07, 2015 9:47 pm
by Alkebulan
Could you please help with this. I derived the FOC of the Ramsey problem under discretion, then wrote the mod file and a steady state file with fsolve to get SS values of the lagrangians, but I get the error term CAT arguments dimensions are not consistent. Thanks a lot for all your help.

Re: Steady State and Residuals PRoblems

PostPosted: Fri May 08, 2015 9:39 am
by jpfeifer
In your DSS-file when you try to concatenate everything into F, you must not leave spaces between elements of the expressions. Matlab interprets the sixth line
Code: Select all
lam(3) - lam(4)*(1-chii)*Yf^(-chii)/(v*Tau^chii) + lam(6)*chii*Yi*Yf^(-1-chii)/(deltaa^chii*Tau^chii) -lam(10)*MCf -lam(11)*(1-Tau) - lam(17)*(1+psii)*(1-chii)*Yf^((1+psii)*(1-chii)-1) - lam(18)*chii*(1+muu)*Yi^(1+muu)*Yf^(-chii*(1+muu)-1)-lam(25)*Tau ;

not as one expression, but as three expression concatenated horizontally, i.e. it takes this line to be a 1 by 3 array.