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"]
docstr: Creates Autoregressive matrix
  
  Returns
  ----------
  X : np.ndarray
      Autoregressive Matrix
docstr_tok: ["Creates","Autoregressive","matrix","Returns","--","--","--","--","--","X",":","np.ndarray","Autoregressive","Matrix"]
code: def _ar_matrix(self):
      """Creates Autoregressive matrix
  
      Returns
      ----------
      X : np.ndarray
          Autoregressive Matrix
  
      """
      Y = np.array(self.data[self.max_lag : self.data.shape[0]])
      X = np.ones(Y.shape[0])
  
      if self.ar != 0:
          for i in range(0, self.ar):
              X = np.vstack(
                  (X, self.data[(self.max_lag - i - 1) : -i - 1])
              )
  
      return X.T
  
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 2 for calling the DAR obj's underlying member method code with example usage: obj._ar_matrix() and returns: X