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: Makes forecast with the estimated model
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps ahead would you like to forecast?
  
  oos_data : pd.DataFrame
      Data to use for the predictors in the forecast
  
  intervals : boolean (default: False)
      Whether to return prediction intervals
  
  Returns
  ----------
  - pd.DataFrame with predicted values
docstr_tok: ["Makes","forecast","with","the","estimated","model","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","ahead","would","you","like","to","forecast","?","oos_data",":","pd.DataFrame","Data","to","use","for","the","predictors","in","the","forecast","intervals",":","boolean","(","default",":","False",")","Whether","to","return","prediction","intervals","Returns","--","--","--","--","--","-","pd.DataFrame","with","predicted","values"]
code: def predict(self, h=5, oos_data=None, intervals=False):
      """Makes forecast with the estimated model
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps ahead would you like to forecast?
  
      oos_data : pd.DataFrame
          Data to use for the predictors in the forecast
  
      intervals : boolean (default: False)
          Whether to return prediction intervals
  
      Returns
      ----------
      - pd.DataFrame with predicted values
      """
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          _, 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.array(
                  [np.mean(i) for i in sim_vector]
              )
              prediction_01 = np.array(
                  [np.percentile(i, 1) for i in sim_vector]
              )
              prediction_05 = np.array(
                  [np.percentile(i, 5) for i in sim_vector]
              )
              prediction_95 = np.array(
                  [np.percentile(i, 95) for i in sim_vector]
              )
              prediction_99 = np.array(
                  [np.percentile(i, 99) for i in sim_vector]
              )
  
          else:
              t_z = self.transform_z()
  
              if intervals is True:
                  sim_values = self._sim_prediction(
                      lmda, Y, scores, h, t_z, 15000, X_pred
                  )
              else:
                  sim_values = self._sim_prediction(
                      lmda, Y, scores, h, t_z, 2, X_pred
                  )
  
              mean_values = self._sim_predicted_mean(
                  lmda, Y, scores, h, t_z, 15000, X_pred
              )
              forecasted_values = mean_values[-h:]
  
          if intervals is False:
              result = pd.DataFrame(np.exp(forecasted_values / 2.0))
              result.rename(columns={0: self.data_name}, inplace=True)
          else:
              if self.latent_variables.estimation_method not in ["M-H"]:
                  sim_values = self._sim_prediction(
                      lmda, Y, scores, h, t_z, 15000, X_pred
                  )
                  prediction_01 = np.array(
                      [np.percentile(i, 1) for i in sim_values]
                  )
                  prediction_05 = np.array(
                      [np.percentile(i, 5) for i in sim_values]
                  )
                  prediction_95 = np.array(
                      [np.percentile(i, 95) for i in sim_values]
                  )
                  prediction_99 = np.array(
                      [np.percentile(i, 99) for i in sim_values]
                  )
  
              result = np.exp(
                  pd.DataFrame(
                      [
                          forecasted_values,
                          prediction_01,
                          prediction_05,
                          prediction_95,
                          prediction_99,
                      ]
                  ).T
                  / 2.0
              )
              result.rename(
                  columns={
                      0: self.data_name,
                      1: "1% Prediction Interval",
                      2: "5% Prediction Interval",
                      3: "95% Prediction Interval",
                      4: "99% Prediction Interval",
                  },
                  inplace=True,
              )
  
          result.index = date_index[-h:]
  
          return result
  
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 17 for calling the EGARCHMReg obj's underlying member method code with example usage: obj.predict(h, oos_data, intervals) and returns: result