gEconpy.model.perturbation.make_not_loglin_flags#

gEconpy.model.perturbation.make_not_loglin_flags(variables, calibrated_params, steady_state, log_linearize=True, not_loglin_variables=None, loglin_negative_ss=False, verbose=True)#

Determine which variables should not be log-linearized.

Returns a flag array where 1 means “do not log-linearize” and 0 means “log-linearize.” Variables are excluded from log-linearization if they are explicitly listed in not_loglin_variables, have steady-state values near zero, or (unless loglin_negative_ss is True) have negative steady-state values.

Parameters:
variableslist of TimeAwareSymbol

Model variables.

calibrated_paramslist of sp.Symbol

Calibrated parameters that also appear in the steady-state vector.

steady_stateSymbolDictionary

Steady-state values, keyed by variable name.

log_linearizebool, default True

If False, returns all-ones (no variable is log-linearized).

not_loglin_variableslist of str, optional

Variable names the user explicitly excludes from log-linearization.

loglin_negative_ssbool, default False

If True, variables with negative steady-state values are still log-linearized.

verbosebool, default True

Log warnings about excluded variables.

Returns:
flagsnp.ndarray

Array of length len(variables) + len(calibrated_params). Entry is 1 if the variable should not be log-linearized, 0 otherwise.