Hi, I would really appreciate your help if you could guide me on how to adapt to dynare a model with a firm which has decreasing marginal returns which means that in equilibrium that firm can have gains, which my model allocates in the representative individual through his budget constraint (you can see in the code I attach to this topic).
My model has a representative individual who choses work, debt, yesterday’s capital and consumption. It has 2 firms, one which has constant marginal returns which is the firm that produces the good purchased by the individual which is a commercial good as well, and a firm which only has as input capital, produces a good which can only be exported and has a technology of decreasing marginal returns (y=phi2kp^(zeta)) which could have gains at equilibrium which are allocated in the budget constraint of the individual. My code does not work if I attach this new variable (pi) which are the gains to the constraint of the individual. Of course I had to use another equation which defines pi which is exp(pi)=pexp(Yp)-r*exp(Kp); but still if I only put this two new things to my model it doesn’t work. If you remove this two things then the code works and generates the impulse-response functions.
Posting a pdf with a list of equations can help in following your code. For instance, I do not follow the two shocks; let’s say “p” affecting the (what I presume is) first order condition relevant to Yp (or Kp) but it does not appear in the Yp equation itself.
Check that all your equations are in place. And that your code does not show multicolinearity issues either (playing a bit with the code, it gives me that warning message).