class_docstr: Tests for simulation smoothing values in a couple of special cases of
  variates. Both computed values and KFAS values are used for comparison
  against the simulation smoother output.
class_docstr_tok: ["Tests","for","simulation","smoothing","values","in","a","couple","of","special","cases","of","variates",".","Both","computed","values","and","KFAS","values","are","used","for","comparison","against","the","simulation","smoother","output","."]
code: def setup_class(
      cls, missing=None, test_against_KFAS=True, *args, **kwargs
  ):
      cls.test_against_KFAS = test_against_KFAS
      # Data
      dta = datasets.macrodata.load_pandas().data
      dta.index = pd.date_range(
          start="1959-01-01", end="2009-7-01", freq="QS"
      )
      obs = (
          np.log(dta[["realgdp", "realcons", "realinv"]])
          .diff()
          .iloc[1:]
      )
  
      if missing == "all":
          obs.iloc[0:50, :] = np.nan
      elif missing == "partial":
          obs.iloc[0:50, 0] = np.nan
      elif missing == "mixed":
          obs.iloc[0:50, 0] = np.nan
          obs.iloc[19:70, 1] = np.nan
          obs.iloc[39:90, 2] = np.nan
          obs.iloc[119:130, 0] = np.nan
          obs.iloc[119:130, 2] = np.nan
          obs.iloc[-10:, :] = np.nan
  
      if test_against_KFAS:
          obs = obs.iloc[:9]
  
      # Create the model
      mod = mlemodel.MLEModel(obs, k_states=3, k_posdef=3, **kwargs)
      mod["design"] = np.eye(3)
      mod["obs_cov"] = np.array(
          [
              [0.0000640649, 0.0, 0.0],
              [0.0, 0.0000572802, 0.0],
              [0.0, 0.0, 0.0017088585],
          ]
      )
      mod["transition"] = np.array(
          [
              [-0.1119908792, 0.8441841604, 0.0238725303],
              [0.2629347724, 0.4996718412, -0.0173023305],
              [-3.2192369082, 4.1536028244, 0.4514379215],
          ]
      )
      mod["selection"] = np.eye(3)
      mod["state_cov"] = np.array(
          [
              [0.0000640649, 0.0000388496, 0.0002148769],
              [0.0000388496, 0.0000572802, 0.000001555],
              [0.0002148769, 0.000001555, 0.0017088585],
          ]
      )
      mod.initialize_approximate_diffuse(1e6)
      mod.ssm.filter_univariate = True
      cls.model = mod
      cls.results = mod.smooth([], return_ssm=True)
  
      cls.sim = cls.model.simulation_smoother()
  
imports: import os
  import numpy
  import pandas
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from statsmodels import datasets
  from statsmodels.tsa.statespace import mlemodel, sarimax, structural, varmax
  from statsmodels.tsa.statespace.simulation_smoother import SIMULATION_STATE, SIMULATION_DISTURBANCE, SIMULATION_ALL
label_desc: Use image node_id 1 for calling the MultivariateVARKnown obj's underlying member method code with example usage: obj.setup_class(cls, missing, test_against_KFAS) without return types