gEconpy.model.model.Model.__init__#

Model.__init__(variables, shocks, equations, steady_state_relationships, param_dict, hyper_param_dict, deterministic_dict, calib_dict, priors, f_params, f_ss_resid, f_ss, f_ss_error, f_ss_jac, f_ss_error_grad, f_ss_error_hess, f_ss_error_hessp, f_linearize, backend='numpy', is_linear=False)#

Container class for DSGE model primitives and compiled functions.

In general, users should not need to instantiate this class directly. Instead, use

gEconpy.model.build.model_from_gcn() to create a model from a GCN file.

Parameters:
variables: list[TimeAwareSymbol]

List of variables in the model

shocks: list[TimeAwareSymbol]

List of shocks in the model

equations: list[sp.Expr]

List of equations in the model

param_dict: SymbolDictionary

Dictionary of parameters in the model

hyper_param_dict: SymbolDictionary

Dictionary of parameters used by shock distributions

deterministic_dict: SymbolDictionary

Dictionary of parameters defined as deterministic functions of other parameters, mapping the deterministic parameter Symbols to the expressions defining them.

calib_dict: SymbolDictionary

Dictionary of parameters defined as functions of steady-state variables, mapping the calibrated parameter Symbols to the expressions defining them.

priors: dict[str, Distribution]

Dictionary of prior distributions for the model parameters

f_params: Callable

Function that returns a dictionary of parameter values given a dictionary of parameter values

f_ss_resid: Callable

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and evaluates the system of model equations f(x_ss, theta) = 0.

f_ss: Callable

Function that takes current parameter values and returns a dictionary of steady-state values.

f_ss_error: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns a scalar error measure of x_ss given theta. If None, the sum of squared residuals returned by f_ss_resid is used.

f_ss_error_grad: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns the gradients of the error function f_ss_error with respect to the steady-state variable values x_ss

If f_ss_error is not provided, an error will be raised if a gradient function is passed.

f_ss_error_hess: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns the Hessian of the error function f_ss_error with respect to the steady-state variable values x_ss

If f_ss_error is not provided, an error will be raised if a gradient function is passed.

f_ss_error_hessp: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns the Hessian-vector product of the error function f_ss_error with respect to the steady-state variable values x_ss.

f_ss_jac: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns the Jacobian of the system of model equations f(x_ss, theta) = 0 with respect to the steady-state variable values x_ss.

f_linearize: Callable, optional

Function that takes a dictionary of parameter values theta and steady-state variable values x_ss and returns the first-order approximation of the model around the steady state.