#ASK FOR IMMEDIATE HELP# The Jacobian or the dynamic model contains Inf

Dear all,
I am trying to extend the Eichenbaum et al. (2020), “Epidemics in the Neoclassical and New Keynesian Models”, which incorporates SIR into the DSGE model. However, I encountered the error “The Jacobian or the dynamic model contains Inf”.
I have checked other posts also mentioned this error message and went through all the equations following the guidance. But I do not find any 0 parameter values or steady states appear in the denominator.
The deadline is approaching while I am still struggling with this issue. Any help will be highly appreciated! Thanks a lot!

The mod file is attached.SIR in a Two-sectoral DSGE.mod (11.2 KB)

While I don’t think I can help at this stage, here are some suggestions for you to get help with a higher probability:

  1. Replicate Eichenbaum Rebelo Trabandt paper with Dynare. Make sure it’s running.
  2. Compare your extension with their model, and tell us the difference.
  3. If step 1) fails, take out the New Keynesian part and try again.
    I think it is very possible that you find the bug yourself after these decoupling steps.

Your model is too complicated for a forum user to investigate, and it would save other people’s time and help them focus if you have a well-specified question. For example, I think I know ERT(2020) a bit, but I have little time in debugging someone else’s model extension codes as I have my own research to do.
If the mod file or the model itself intimidates you, believe me, it won’t be very attractive to other people around either…

Dear Peifan,
Thank you for your quick reply and suggestions! You are right that my model might seem too complicated for others to debug, and I should be more specific about my difference with ERT and my RQ.
The truth is I have downloaded the ERT paper code from the author’s personal page and it is running. So I guess the problem arise from my extension to the model.
My research question is: how do unconventional monetary policy (such as targeted cuts to required reserve ratios for banks providing loans to small firms) would help with small firms under the COVID-19 shock?
The extensions I made are: (1) extending the ERT model to a two-sectoral model, which contains Big firms and Small firms; (2) incorporating banks’ lending decisions; (3) adding unconventional monetary policy which target on employment and Small firms’ output.

Instead of telling us your research question, I think 1) go through ERT’s model (and their mod file) and try to understand what’s going on thoroughly; 2) add equations one by one for your extension to see whether the whole model still works or not. In your case, you can first split the representative firm into two types of firms, and then add lending decisions, and finally, monetary policy stuff.
Once you have more concrete questions to your mod file, come back and post here and show people what is working and what isn’t.