Dear all, since I couldn’t replicate the MXN model, I tried to simplify it by reducing it to 3 sectors. Tradable goods sector, non-tradable goods sector and final good producing firm which combines tradable and nontradable with a CES aggregation function. The model produced sensible IRFs but when I run model diagnostics I encountered this error:

The Jacobian of the dynamic model contains Inf or NaN. The problem arises from:

The derivative of Equation 21 with respect to Variable d (initial value of d: -10.62)

MODEL_DIAGNOSTICS: The problem most often occurs, because a variable with

MODEL_DIAGNOSTICS: exponent smaller than 1 has been initialized to 0. Taking the derivative

MODEL_DIAGNOSTICS: and evaluating it at the steady state then results in a division by 0.

MODEL_DIAGNOSTICS: If you are using model-local variables (# operator), check their values as well.

I checked the equation 21 it is the standard debt elastic interest rate equation. There are two parameters zeta which measures sensitivity of debt and r* world interest rate. I couldn’t find an error what might be the problem?