gEconpy.model.statistics.build_Q_matrix#
- gEconpy.model.statistics.build_Q_matrix(model_shocks, shock_std_dict=None, shock_cov_matrix=None, shock_std=None)#
Take different options for user input and reconcile them into a covariance matrix.
Exactly one or zero of shock_dict or shock_cov_matrix should be provided.
- Parameters:
- model_shocks: list of str
List of model shock names, used to infer positions in the covariance matrix.
- shock_std_dict: dict, optional
Dictionary of shock names and standard deviations to be used to build Q.
- shock_cov_matrix: array, optional
An (n_shocks, n_shocks) covariance matrix describing the exogenous shocks.
- shock_std: float or sequence of float, optional
Standard deviation of all model shocks.
- Returns:
- Q:
ndarray Shock variance-covariance matrix.
- Q: