Is it possible to solve a 0-1 discrete choice model using Dynare?

I’m trying to incorporate a 0–1 decision mechanism in my DSGE model in Dynare.
Instead of a hard discrete choice, I approximate the binary behavior using a logistic function:

prudent_flag = 1 / (1 + exp(-gamma_flag * (V_p - V_G)));
chi_t = chi_t(-1) * (prudent_flag + theta_G * (1 - prudent_flag));

This represents a probabilistic switching between two regimes.

My question is: Can Dynare solve models with genuine 0–1 discrete choice behavior, or is a smooth approximation (like the logistic function above) the only feasible way within Dynare’s framework?

Usually, Dynare cannot handle a discrete choice problem, because you cannot easily restrict a variable to be binary.

1 Like