Dear all,
I am currently trying to estimate the simple New keynesian model. I am interested in using a prior of the inflation monetary policy parameter (psi_pi) that has a distribution with positive probability in regions of 0<psi_pi>1, it is well known that ,for these values, NK model will have several posible solutions (it is indeterminate). I have dynare code to solve these cases (following Farmer, Kramov(2013)).

Therefore, I have two models, model 1 that is the usual one for determined cases, and model 2 that is a modification of model 1 (Adding susnspots) for indeterminate cases.

My problem is that I need to use model 1 when a draw of psi_pi from the prior is larger than 1 and to use model 2 when the draw from the prior of psi_pi is less or equal than 1.

Is there a way to make dynare to use one model or the other depending on de draws of psi_pi?

Things that I have thought:
-Try to estimate model 1 with the determined part of the prior, try to estimate model 2 with indetermined part of the prior, Unify posterior distributions.

Dear Johhannes,
I am solving the indeterminated system as nicolo,farmer and kramov (2015) explain in their paper. (I already had into account those papers you mentioned). My problem is that I do not know how to implement this on Dynare.

Let me be more clear about what is my problem:
Can I make a if loop on the model(linear) section while using estimation command?.
Something like:

var All variables used in model 1 and 2;
varexo All exogenous variables used in model 1 and 2;
parameters; all parameters used in model 1 and 2;