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: Makes forecast with the estimated model
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps ahead would you like to forecast?
  
  Returns
  ----------
  - pd.DataFrame with predictions
docstr_tok: ["Makes","forecast","with","the","estimated","model","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","ahead","would","you","like","to","forecast","?","Returns","--","--","--","--","--","-","pd.DataFrame","with","predictions"]
code: def predict(self, h=5):
      """Makes forecast with the estimated model
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps ahead would you like to forecast?
  
      Returns
      ----------
      - pd.DataFrame with predictions
      """
  
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          y_holder = (
              self.y.copy()
          )  # holds past data and predicted data to create AR matrix
          full_X = self.X.copy()
          full_X = np.append(
              full_X,
              np.array([np.append(1.0, y_holder[-self.ar :][::-1])]),
              axis=0,
          )
          Z = full_X
  
          for step in range(h):
              a, P = self._forecast_model(
                  self.latent_variables.get_z_values(), Z, step
              )
              new_value = np.dot(Z[-1, :], a[:, self.y.shape[0] + step])
              y_holder = np.append(y_holder, new_value)
              Z = np.append(
                  Z,
                  np.array(
                      [np.append(1.0, y_holder[-self.ar :][::-1])]
                  ),
                  axis=0,
              )
  
          date_index = self.shift_dates(h)
  
          result = pd.DataFrame(y_holder[-h:])
          result.rename(columns={0: self.y_name}, inplace=True)
          result.index = date_index[-h:]
  
          return result
  
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 10 for calling the DAR obj's underlying member method code with example usage: obj.predict(h) and returns: result