IRFs and rank condition

Hi everybody,
I am calibrating a sticky wage model where labor market rigidity is introduced a la calvo as in SW 2003 but without indexation to previous period inflation (price are assumed to be flexible in the monopolistic good market so you just have a markup over the marginal cost and money is neutral); in the code attacched, each variable has its flex counterpart as interest rate setting rule takes into account output gap and we need y_flex to compute it; basically what makes the model different from a fully flexible model (for which I have produced IRFs by using only _flex equations you find in the code) is the wage equation and naturally all the other equations that take the rigid wage. I can’t get why rank conditions is not satisfied though. Here you find attached the .mod fil for the sticky wage model if you would be som helpful to take a look.
Thank everybody for the patience, I am a beginner in dynare.
sticky_wage.mod (2.9 KB)

Does the model work if you just have a standard Taylor rule and the flex price economy separately? That is usually the first check before combining the two separate economies. Also, why is Tobin’s q predetermined in your model?

The flex economy works, in the flex economy I do not have a taylor rule as there should be neither inflation nor an output gap, is it correct? (In a flex economy, SW taylor rule would reduce to an AR1 process for the interest rate). Basically, I took the SW code, I have mantained flex equations, and added a wage equation which includes calvo rigidities but without indexation to past period inflations, because prices are flexible (I do not have a nkpc as prices are not rigid). So, each flex equation ends up having its “notflex” counterpart: for instance, since labor demand depends on wages, since I have two wage eqaution, then I end up having to labor demands, one including flex wage, the other including calvo wage, and so on for all the other variables. In spite of price flexibility, I do this becouse with wage rigidity I have a difference between flexible output and “notflexible output” so I have to account for the dependence of interest rate on output gap (I will have a taylor rule including lagged interest rate, curent output gap and dynamics of output gap). As far as I understood from your comment, I should run the code just with non-flexible equations right? (in that case, I get rid of the part of the taylor rule which consider current or lagged output gap), right?

Kind of. What I am saying is: you have two separate economies. The flex price one and a sticky price one. Each of them should run independently of the other one. The flex price economy only needs a monetary policy rule to determine actual inflation while the real economy determines expected inflation. Once the two economies work as expected, work on integrating the flex price concepts into the sticky price model. That way, you know that the problem comes from the integration not the respective models.