gEconpy.model.statespace.DSGEStateSpace.configure#

DSGEStateSpace.configure(observed_states, measurement_error=None, constant_params=None, exog_state_names=None, k_exog=None, full_shock_covaraince=False, solver='gensys', mode=None, verbose=True, max_iter=50, tol=1e-06, use_adjoint_gradients=True)#

Finalize the setup of a DSGE Statespace object.

Parameters:
observed_states: list of str

Names of the endogenous variables to be treated as observed timeseries. Must be a subset of the model’s endogenous variables.

measurement_error: list of str, optional

Names of the observed states to include measurement error for. Must be a subset of the observed_states. If None, no measurement error will be included.

constant_params: list of str, optional

Names of the parameters to treat as constant (not estimated). Must be a subset of the model’s parameters. If None, all parameters will be estimated.

exog_state_nameslist of str or dict, optional

Names of the exogenous state variables. If a list, all endogenous variables will share the same exogenous variables. If a dict, keys should be the names of the endogenous variables, and values should be lists of the exogenous variable names for that endogenous variable. Endogenous variables not included in the dict will be assumed to have no exogenous variables. If None, no exogenous variables will be included.

k_exogint or dict, optional

Number of exogenous variables. If an int, all endogenous variables will share the same number of exogenous variables. If a dict, keys should be the names of the endogenous variables, and values should be the number of exogenous variables for that endogenous variable. Endogenous variables not included in the dict will be assumed to have no exogenous variables. If None, no exogenous variables will be included.

full_shock_covaraince: bool, default False

If True, estimate a full covariance matrix for the structural shocks. If False, estimate only the diagonal elements (i.e. assume shocks are uncorrelated).

solver: str, default “gensys”

Which solver to use for solving the linearized system. Must be one of “gensys”, “cycle_reduction”, or “scan_cycle_reduction”.

mode: str, optional

Pytensor compilation mode to use for post-estimation methods. If None, the default mode will be used.

verbose: bool, default True

If True, print diagnostic messages during configuration.

max_iter: int, default 50

For iterative solvers (“cycle_reduction” and “scan_cycle_reduction”), the maximum number of iterations to perform. Ignored if solver is “gensys”.

tol: float, default 1e-6

Tolerance for convergence for iterative solvers (“cycle_reduction” and “scan_cycle_reduction”). Ignored if solver is “gensys”.

use_adjoint_gradients: bool, default True

If True, use adjoint gradients for the scan_cycle_reduction solver. Ignored if solver is not “scan_cycle_reduction”.