code: def plot_coefficients_by_equation(states):
      fig, axes = plt.subplots(2, 2, figsize=(15, 8))
  
      # The way we defined Z_t implies that the first 5 elements of the
      # state vector correspond to the first variable in y_t, which is GDP growth
      ax = axes[0, 0]
      states.iloc[:, :5].plot(ax=ax)
      ax.set_title("GDP growth")
      ax.legend()
  
      # The next 5 elements correspond to inflation
      ax = axes[0, 1]
      states.iloc[:, 5:10].plot(ax=ax)
      ax.set_title("Inflation rate")
      ax.legend()
  
      # The next 5 elements correspond to unemployment
      ax = axes[1, 0]
      states.iloc[:, 10:15].plot(ax=ax)
      ax.set_title("Unemployment equation")
      ax.legend()
  
      # The last 5 elements correspond to the interest rate
      ax = axes[1, 1]
      states.iloc[:, 15:20].plot(ax=ax)
      ax.set_title("Interest rate equation")
      ax.legend()
  
      return ax
  
file_path: statsmodels/examples/python/statespace_tvpvar_mcmc_cfa.py
imports: from importlib import reload
  import numpy
  import pandas
  import statsmodels.api
  import matplotlib.pyplot
  from scipy.stats import invwishart, invgamma
  import arviz
  from statsmodels.tsa.statespace.simulation_smoother import SIMULATION_STATE
label_desc: Use image node_id 1 for calling a global function with example usage: plot_coefficients_by_equation(states) and returns: ax