If function in Dynare

Dear all,

I am trying to incorporate different credibility indices in a small macroeconomic model. In one of those indices there is a sensitivity parameter (α) which changes asymmetrically depending on the credibility level (λ) in the previous period. Here it is assumed that there is a critical point of credibility (λ = 0.5), which is a switch point of that sensitivity variable, namely α = 0.2,if λ(-1)≥ 0.5 and α = 0.9,if λ(-1)< 0.5.

Could you please tell me whether it is possible to do this in Dynare and if yes, how?

I will appreciate any help very much.

Kind regards,

That depends on the context. In perfect_foresight, you can do this. In a stochastic model, the if-clause (which is essentially a min/max operator) would introduce a non-differentiability that cannot be handled with perturbation techniques.