Steady state file vs. steady state inside a mod file

#1

Dear users,

I am new in using Dynare. I wrote a NK model with a frictional labor market. In doing this, I first began by writing a mod file in which the steady state values of the endogenous variable are computed inside the mod file.

Then, to have a “proper” file, I decide to use a steady state file in Matlab format (as suggested by the NK baseline example).

My problem is that, without changing the model equations nor how steady state values are computed, the model runs when the steady state is computed inside the mod file and does not run when the steady state is computed with the Matlab program.

The most troubling is that all steady state values (those of the initval block and those compute in the Matlab file) are identical in both framework (I checked their value one-by-one!)! However, residuals of the static equations are different especially for equation 6.

Have you any idea where the problem comes from? I put all my codes in attached files

Thanks

BestModelWithoutSteadyStateFile.mod (6.2 KB)
RunMod.m (65 Bytes)

#2

Here the codes for the case where the steady state are from the matlab filesModelWithSteadyStateFile.mod (6.1 KB)
ModelWithSteadyStateFile_steadystate.m (2.3 KB)

#3

The resid belongs before steady. You will see that your steady state values do not solve the model. I would also recommend using a steady_state_model-block