It looks like the residuals of the static equations is not zero,but i don’t why. I’m confused about the value of tax_w, I can only get equation 18 to 0 if I set tax_w endogenously using the stabilization equation, whereas I actually set it exogenously because it is income tax. What puzzles me the most is that the sum of Equation 16 and Equation 23 is 0. They are actually consumption constraints.I am a newbie in dynare, I hope anyone can help me, I am building a tank model, but there may be some problems to some extent.

Did you forget to upload your solve_TG function? Cannot find it actually. In any case, when residuals are not zero, I typically check steady state values of each variables. In most cases it reveals the problem.

First of all, thanks for your reply. I’m very sorry, this is an oversight on my part. Since TG cannot be written in analytical form, I performed a numerical solution. I checked various steady state values but still can’t find the problem. solve_TG.m (560 Bytes)

Check the balance sheet equations 16 and 23. Residuals are equal and opposite. So something is not adding up. Also don’t use external solver here. It will be prone to error. Use STEADY_STATE() command instead to use the steady state value of Tg.

Hi, i am back. At last i solve the problem, let me briefly describe my experience, which is all related to Walras’ law. In my code, I included the budget constraints of both households and the corresponding market equilibrium (actually there is an extra equation here). However, in order to make the number of endogenous variables and equations equal, I deleted production function (so there is one less equation). After this was resolved, the model again had collinearity issues since my heterogeneous households were actually similar, so I changed the households to, Ricardian and non-Ricardian households. Finally I did it, thanks to those who helped me before.