Soe dsge help!


#1

Hi DSGE solvers

I’m trying make SOE DSGE model. But, I cannot solve NaN/Inf problem…
I need your advice that how can I fix this.

thank you,
jpdat.m (9.13 KB)
sot2.mod (11.5 KB)


#2

Please try a calibrated version of the model first. See Remark 2 (Using stoch_simul before Estimation) in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.
Focus on equation 17 and the model-local variables involved in it. If I understand it correctly, you have

#rsss=1/(ebs*beta); #rlss=(rsss*ebs)/ebbarl;
But ebs is an exogenous variable that is mean 0, so you are dividing by 0 and rsss will be infinity. rlss then has infinity divided by infinity, resulting in NaN


#3

Thank you very much, Proffessor !

I made a easy mistake. And, fixed this.
But, I have new problem that colinear variables/equations.

I read much Q’s in this forum, but I don’t get it well.
How can I fix this problem for example?

many thanks,
Cross-Country Co-movement in Long-Term Interest Rates Appendix.pdf (325 KB)
Cross-country co-movement in long-term interest rates a DSGE approach.pdf (675 KB)
sot2.mod (12.8 KB)


#4

That is hard to tell. Usually, there is one equation missing that needs to replace one of the redundant equations entered in the mod-file. Alternatively, there may still be a (timing) error in your model equations.


#5

Thank you for your quick reply!
I try to revise my equations.
Best wishes,

Roara


#6

Hi Professor Pfeifer.
Why dinare divides by the mean value, and not by the current value of exogenous variable?
Thank you very much in advance.
Best,
Leonid


#7

@Leonid_65 What do you mean? Dynare does not divide by anything unless you specify something.


#8

I mean your answer "Focus on equation 17 and the model-local variables involved in it. If I understand it correctly, you have

#rsss=1/(ebsbeta); #rlss=(rsssebs)/ebbarl;
But ebs is an exogenous variable that is mean 0, so you are dividing by 0 and rsss will be infinity. rlss then has infinity divided by infinity, resulting in NaN"

Best, Leonid.


#9

For solving the model with perturbation, Dynare evaluates the derivatives at the deterministic steady state. That is where the problem pops up. You cannot divide by a mean 0 variable.