Khun-Tucker condition in Dynare

Hello every body ,

First, I am trying to simulate a dynamic model using dynare. It is a simple model. I can simulate it with a type of error message: “Warning: Matrix is close to singular or badly scaled Results May be Inaccurate”. Please, can you help me to resolve this error. :question:
Second, I use dynare to resolve a system of first order equation. One of this endogenous variables of my model has a value of zero in steady state, so one of model equations holds with Khun-Tucker condition in steady state (Not interior solution ). Is it possible to use Khun-Tucker formulation in Dynare-matlab ? :exclamation:

I hope that you answer me quickly. Thank you for your help.

Without further information or seeing the mod-file, this is impossible to answer.
Regarding the Kuhn-Tucker problem. If you model is stochastic, Dynare cannot easily handle occasionally binding constraints. If your constraint is binding in steady state and you use perturbation solutions, the Taylor approximation to the problem will imply that the constraint is always binding. Depending on what you want to do, Iacoviello/Guerrieri’s Occbin might be a solution.

Thank you for your response. I send you the matlab version of model and the file of steady state expressions. As i said, the value of one of variables at steady state is zero. This is the case of inventory in my model (Qss=0).and to help dynare to reproduce the same steady state values, i put a khun-Tucker equation for the dynamic value of stock. I wait for your suggestion. Thank you :slight_smile:
model_general_steadystate.m (2.56 KB)
model_general.mod (613 Bytes)

It seems both problems are related. I still don’t get the intuition of what you are trying to achieve. But as I said: the complementary slackness condition will be linearly (or second order ) approximated by Dynare. Thus, the kink that you need will be ignored.
In your steady state file, you set the multiplier close to 0. This creates the close to singularity warning. When you go all the way to Q being 0, you will be having a few equations where all variables drop out. This is a problem for the solution technique.
Summarizing, I am not sure the Dynare is capable of dealing with the type of stochastic problem with an occasionally binding constraint.

Thank you for your answer. If i want to explain more my model, it is that in steady state, i don’t have stock managment, for that Q =0 at steady state. I don’t have other choice. if it is a technic problem, i think i have to keep my solution. But can u please explain me the “Iacoviello/Guerrieri’s Occbin” and how that can be a solution to my problem? Thank you very much.

Regarding Occbin, see www2.bc.edu/matteo-iacoviello/research.htm

Ok i see, thank you for the reference.