code: def __init__(self, endog):
      if not isinstance(endog, pd.DataFrame):
          endog = pd.DataFrame(endog)
  
      k = endog.shape[1]
      augmented = lagmat(
          endog, 1, trim="both", original="in", use_pandas=True
      )
      endog = augmented.iloc[:, :k]
      exog = add_constant(augmented.iloc[:, k:])
  
      k_states = k * (k + 1)
      super().__init__(endog, k_states=k_states)
  
      self.ssm.initialize(
          "known", stationary_cov=np.eye(self.k_states) * 5
      )
  
      self["design"] = np.zeros(
          (self.k_endog, self.k_states, self.nobs)
      )
      for i in range(self.k_endog):
          start = i * (self.k_endog + 1)
          end = start + self.k_endog + 1
          self["design", i, start:end, :] = exog.T
      self["transition"] = np.eye(k_states)
      self["selection"] = np.eye(k_states)
  
      self._obs_cov_slice = np.s_[
          : self.k_endog * (self.k_endog + 1) // 2
      ]
      self._obs_cov_tril = np.tril_indices(self.k_endog)
      self._state_cov_slice = np.s_[-self.k_states :]
      self._state_cov_ix = ("state_cov",) + np.diag_indices(
          self.k_states
      )
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_cfa_tvpvar.py
imports: import os
  import numpy
  import pandas
  from numpy.testing import assert_allclose
  from statsmodels import datasets
  from statsmodels.tools import add_constant
  from statsmodels.tsa.tsatools import lagmat
  from statsmodels.tsa.statespace import mlemodel
label_desc: Use image node_id 1 to create a new TVPVAR object from inherited base classes: mlemodel with example: obj = TVPVAR(endog)