class_docstr: Inherits time series methods from TSM class.
  
  **** BETA-t-EGARCH IN MEAN REGRESSION MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame
      Field to specify the time series data that will be used.
  
  p : int
      Field to specify how many GARCH terms the model will have.
  
  q : int
      Field to specify how many SCORE terms the model will have.
  
  formula : string
      patsy string describing the regression
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","BETA-t-EGARCH","IN","MEAN","REGRESSION","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","Field","to","specify","the","time","series","data","that","will","be","used",".","p",":","int","Field","to","specify","how","many","GARCH","terms","the","model","will","have",".","q",":","int","Field","to","specify","how","many","SCORE","terms","the","model","will","have",".","formula",":","string","patsy","string","describing","the","regression"]
docstr: Plots forecast with the estimated model
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps ahead would you like to forecast?
  
  past_values : int (default : 20)
      How many past observations to show on the forecast graph?
  
  intervals : Boolean
      Would you like to show prediction intervals for the forecast?
  
  oos_data : pd.DataFrame
      Data for the variables to be used out of sample (ys can be NaNs)
  
  Returns
  ----------
  - Plot of the forecast
docstr_tok: ["Plots","forecast","with","the","estimated","model","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","ahead","would","you","like","to","forecast","?","past_values",":","int","(","default",":","20",")","How","many","past","observations","to","show","on","the","forecast","graph","?","intervals",":","Boolean","Would","you","like","to","show","prediction","intervals","for","the","forecast","?","oos_data",":","pd.DataFrame","Data","for","the","variables","to","be","used","out","of","sample","(","ys","can","be","NaNs",")","Returns","--","--","--","--","--","-","Plot","of","the","forecast"]
code: def plot_predict(
      self, h=5, past_values=20, intervals=True, oos_data=None, **kwargs
  ):
      """Plots forecast with the estimated model
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps ahead would you like to forecast?
  
      past_values : int (default : 20)
          How many past observations to show on the forecast graph?
  
      intervals : Boolean
          Would you like to show prediction intervals for the forecast?
  
      oos_data : pd.DataFrame
          Data for the variables to be used out of sample (ys can be NaNs)
  
      Returns
      ----------
      - Plot of the forecast
      """
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      figsize = kwargs.get("figsize", (10, 7))
  
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          # Retrieve data, dates and (transformed) latent variables
          _, X_oos = dmatrices(self.formula, oos_data)
          X_oos = np.array([X_oos])[0]
          X_pred = X_oos[:h]
          lmda, Y, scores = self._model(
              self.latent_variables.get_z_values()
          )
          date_index = self.shift_dates(h)
  
          if self.latent_variables.estimation_method in ["M-H"]:
              sim_vector = self._sim_prediction_bayes(h, 15000, X_pred)
              error_bars = []
  
              for pre in range(5, 100, 5):
                  error_bars.append(
                      np.insert(
                          [np.percentile(i, pre) for i in sim_vector],
                          0,
                          lmda[-1],
                      )
                  )
  
              forecasted_values = np.insert(
                  [np.mean(i) for i in sim_vector], 0, lmda[-1]
              )
              plot_values = np.append(
                  lmda[-1 - past_values : -2], forecasted_values
              )
              plot_index = date_index[-h - past_values :]
  
          else:
              t_z = self.transform_z()
              sim_values = self._sim_prediction(
                  lmda, Y, scores, h, t_z, 15000, X_pred
              )
              (
                  error_bars,
                  forecasted_values,
                  plot_values,
                  plot_index,
              ) = self._summarize_simulations(
                  lmda, sim_values, date_index, h, past_values
              )
  
          plt.figure(figsize=figsize)
          if intervals == True:
              alpha = [0.15 * i / float(100) for i in range(50, 12, -2)]
              for count, pre in enumerate(error_bars):
                  plt.fill_between(
                      date_index[-h - 1 :],
                      np.exp(error_bars[count] / 2.0),
                      np.exp(error_bars[-count - 1] / 2.0),
                      alpha=alpha[count],
                  )
  
          plt.plot(plot_index, np.exp(plot_values / 2.0))
          plt.title(
              "Forecast for "
              + self.data_name
              + " Conditional Volatility"
          )
          plt.xlabel("Time")
          plt.ylabel(self.data_name + " Conditional Volatility")
          plt.show()
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  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 gas
  from ..None import data_check
label_desc: Use image node_id 14 for calling the EGARCHMReg obj's underlying member method code with example usage: obj.plot_predict(h, past_values, intervals, oos_data) without return types