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 test_simulation_smoothing_0(self):
      # Simulation smoothing when setting all variates to zeros
      # In this case:
      # - unconditional disturbances are zero, because they are simply
      #   transformed to have the appropriate variance matrix, but keep the
      #   same mean - of zero
      # - generated states are zeros, because initial state is
      #   zeros and all state disturbances are zeros
      # - generated observations are zeros, because states are zeros and all
      #    measurement disturbances are zeros
      # - The simulated state is equal to the smoothed state from the
      #   original model, because
      #   simulated state = (generated state - smoothed generated state +
      #                      smoothed state)
      #   and here generated state = smoothed generated state = 0
      # - The simulated measurement disturbance is equal to the smoothed
      #   measurement disturbance for very similar reasons, because
      #   simulated measurement disturbance = (
      #       generated measurement disturbance -
      #       smoothed generated measurement disturbance +
      #       smoothed measurement disturbance)
      #   and here generated measurement disturbance and
      #   smoothed generated measurement disturbance are zero.
      # - The simulated state disturbance is equal to the smoothed
      #   state disturbance for exactly the same reason as above.
      sim = self.sim
      Z = self.model["design"]
  
      nobs = self.model.nobs
      k_endog = self.model.k_endog
      k_posdef = self.model.ssm.k_posdef
      k_states = self.model.k_states
  
      # Test against known quantities (see above for description)
      sim.simulate(
          measurement_disturbance_variates=np.zeros(nobs * k_endog),
          state_disturbance_variates=np.zeros(nobs * k_posdef),
          initial_state_variates=np.zeros(k_states),
      )
      assert_allclose(sim.generated_measurement_disturbance, 0)
      assert_allclose(sim.generated_state_disturbance, 0)
      assert_allclose(sim.generated_state, 0)
      assert_allclose(sim.generated_obs, 0)
      assert_allclose(sim.simulated_state, self.results.smoothed_state)
      if not self.model.ssm.filter_collapsed:
          assert_allclose(
              sim.simulated_measurement_disturbance,
              self.results.smoothed_measurement_disturbance,
          )
      assert_allclose(
          sim.simulated_state_disturbance,
          self.results.smoothed_state_disturbance,
      )
  
      # Test against R package KFAS values
      if self.test_against_KFAS:
          path = os.path.join(
              current_path,
              "results",
              "results_simulation_smoothing0.csv",
          )
          true = pd.read_csv(path)
  
          assert_allclose(
              sim.simulated_state,
              true[["state1", "state2", "state3"]].T,
              atol=1e-7,
          )
          assert_allclose(
              sim.simulated_measurement_disturbance,
              true[["eps1", "eps2", "eps3"]].T,
              atol=1e-7,
          )
          assert_allclose(
              sim.simulated_state_disturbance,
              true[["eta1", "eta2", "eta3"]].T,
              atol=1e-7,
          )
          signals = np.zeros((3, self.model.nobs))
          for t in range(self.model.nobs):
              signals[:, t] = np.dot(Z, sim.simulated_state[:, t])
          assert_allclose(
              signals,
              true[["signal1", "signal2", "signal3"]].T,
              atol=1e-7,
          )
  
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 6 for calling the MultivariateVARKnown obj's underlying member method code with example usage: obj.test_simulation_smoothing_0() without return types