class_docstr: Inherits time series methods from TSM parent class.
  
  **** AUTOREGRESSIVE INTEGRATED MOVING AVERAGE EXOGENOUS (ARIMAX) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame
      Field to specify the univariate time series data that will be used.
  
  formula : string
      patsy string notation describing the regression
  
  ar : int
      Field to specify how many AR lags the model will have.
  
  ma : int
      Field to specify how many MA lags the model will have.
  
  integ : int (default : 0)
      Specifies how many times to difference the time series.
  
  family : family object
      E.g pf.Normal(), pf.t(), pf.Laplace()...
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","parent","class",".","*","*","*","*","AUTOREGRESSIVE","INTEGRATED","MOVING","AVERAGE","EXOGENOUS","(","ARIMAX",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","Field","to","specify","the","univariate","time","series","data","that","will","be","used",".","formula",":","string","patsy","string","notation","describing","the","regression","ar",":","int","Field","to","specify","how","many","AR","lags","the","model","will","have",".","ma",":","int","Field","to","specify","how","many","MA","lags","the","model","will","have",".","integ",":","int","(","default",":","0",")","Specifies","how","many","times","to","difference","the","time","series",".","family",":","family","object","E.g","pf.Normal","(",")",",","pf.t","(",")",",","pf.Laplace","(",")","..."]
docstr: Creates the Autoregressive matrix
  
  Returns
  ----------
  X : np.ndarray
      Autoregressive Matrix
docstr_tok: ["Creates","the","Autoregressive","matrix","Returns","--","--","--","--","--","X",":","np.ndarray","Autoregressive","Matrix"]
code: def _ar_matrix(self):
      """Creates the Autoregressive matrix
  
      Returns
      ----------
      X : np.ndarray
          Autoregressive Matrix
      """
  
      if self.ar != 0:
          X = self.data[(self.max_lag - 1) : -1]
          for i in range(1, self.ar):
              X = np.vstack(
                  (X, self.data[(self.max_lag - i - 1) : -i - 1])
              )
          return X
      else:
          return np.zeros(self.data_length - self.max_lag)
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  import scipy.special
  from patsy import dmatrices, dmatrix, demo_data
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .arma_recursions import arimax_recursion
label_desc: Use image node_id 2 for calling the ARIMAX obj's underlying member method code with example usage: obj._ar_matrix() and returns: X, np