Locating kink in Occbin


I was wondering if once I solve an occasionally binding constraint model with Occbin, I can get the function of state variables that tell Dynare that the constraint is binding.

For example, if I have two state variables k and b, is there a feature on Occbin that allows me to know that if C_1k+C_2b>\alpha, then the constraint binds?

Since Occbin solves for a piecewise linear solution, I am assuming this is possible but I am not sure how to get the information I want.

Thank you.

If you call

[oo_, out, ss]= occbin.solver(M_, oo_, options_);

the structure ss will contain the state space matrices

% - ss                  [structure]     State space solution
%                                           - T: [n_vars by n_vars by n_shock_period] array of transition matrices
%                                           - R: [n_vars by n_exo by n_shock_period] array of shock response matrices
%                                           - C: [n_vars by n_shock_period] array of constants

that should allow you to back this out.

If you specify C_1k+C_2b>\alpha in your occbin_constraints block, then you can look into oo_.occbin.simul.regime_history. The subfelds regime and regimestart store the information you are looking for (see the manual for further information).

Thank you!

The constraint is defined as a function of endogenous variables that are not all state variables. Therefore, I would need to convert the endogenous variables as functions of state variables first. But I understand that if I had defined the constraint as a function of state variables, your suggestion would hold true. Thank you!