class_docstr: Inherits time series methods from TSM class.
  
  **** DYNAMIC AUTOREGRESSIVE MODEL ****
  
  Parameters
  ----------
  
  ar : int
      Number of autoregressive lags
  
  data : pd.DataFrame
      Field to specify the data that will be used
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","DYNAMIC","AUTOREGRESSIVE","MODEL","*","*","*","*","Parameters","--","--","--","--","--","ar",":","int","Number","of","autoregressive","lags","data",":","pd.DataFrame","Field","to","specify","the","data","that","will","be","used"]
code: def __init__(self, data, ar, integ=0, target=None):
      # Initialize TSM object
      super(DAR, self).__init__("DAR")
  
      # Latent Variable information
      self.ar = ar
      self.integ = integ
      self.target = target
      self.model_name = (
          "DAR("
          + str(self.ar)
          + ", integrated="
          + str(self.integ)
          + ")"
      )
      self.max_lag = self.ar
      self._z_hide = (
          0  # Whether to cutoff latent variables from results table
      )
      self.supported_methods = ["MLE", "PML", "Laplace", "M-H", "BBVI"]
      self.default_method = "MLE"
      self.multivariate_model = False
  
      # Format the data
      self.data_original = data.copy()
      (
          self.data,
          self.data_name,
          self.is_pandas,
          self.index,
      ) = dc.data_check(data, target)
      self.data = self.data.astype(
          np.float
      )  # treat as float for Cython
      self.data_original_nondf = self.data.copy()
  
      # Difference data
      for order in range(0, self.integ):
          self.data = np.diff(self.data)
          self.data_name = "Differenced " + self.data_name
  
      self.X = self._ar_matrix()
      self.data = self.data[self.max_lag :]
      self.y = self.data
      self.y_name = self.data_name
      self._create_latent_variables()
      self.z_no = len(self.latent_variables.z_list)
  
imports: import copy
  import sys
  import numpy
  import pandas
  import scipy.stats
  from patsy import dmatrices, dmatrix, demo_data
  from ..None import families
  from ..None import tsm
  from ..None import data_check
  from .kalman import *
label_desc: Use image node_id 1 to create a new DAR object from inherited base classes: tsm with example: obj = DAR(data, ar, integ, target)