Collinear error when new variables and equations are introduced

Hi Prof. Jpfeifer,

I have fixed my problem by replacing mcxt = pd - S - pxt with mcxt = pd - S, and the model runs with no errors. I realized I do not need price of export (pxt) in the marginal cost equation for the export sector.

Nevertheless, as you pointed out, model_diagnostics(M_,options_,oo_) reveals that there is collinearity in the model after it successfully runs. Indeed I have 4 price level equations in my model for 4 different sectors, so unit root is surely in there.

You mentioned in this post that one way to deal with unit roots is to express the whole model in terms of inflation rate. I guess this gets rid of all price level equations, right? I am thinking it is always then better to write the model this way to avoid unit root problems.

Many NK DSGE papers (at least the ones I have read) have a lot of unit root equations, especially for the price level. So I guess a model with unit roots is fine if it runs successfully.

I am building a baseline model for my studies which will start in September, so looking forward to contribute to this forum. Many thanks for all the help you provide, really great!!!