Hi, I’m currently working on the model by Kirchner & Van Wijnbergen (2016), and I intend to adapt it to the context of epidemics/Covid-19 for which I have included an external process from Acurio-Vasconez (2021) that exogenously determines the labor supply. Hence, the model is deterministic and is solved w/ perfect foresight. I’ve solved the steady-state analytically and followed the original code closely, yet somehow this problem keeps occurring. I’ve double-checked the equations and can’t seem to find anything wrong.

MODEL SIMULATION:

Warning: Matrix is singular to working precision.

In sim1_linear (line 199)

In perfect_foresight_solver_core (line 97)

In perfect_foresight_solver (line 63)

In Dynare_forum.driver (line 873)

In dynare (line 293)

## Iter: 1, Initial err. = 0.4515, err. = NaN, time = 0.046

Simulation terminated with NaN or Inf in the residuals or endogenous variables.

There is most likely something wrong with your model. Try model_diagnostics or another simulation method.

Here’s the .mod file

Dynare_forum.mod (11.8 KB)