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: Produces forecasted values to plot, along with prediction intervals
  
  This is a utility function that constructs the prediction intervals and other quantities 
  used for plot_predict() in particular.
  
  Parameters
  ----------
  mean_values : np.ndarray
      Mean predictions for h-step ahead forecasts
  
  sim_vector : np.ndarray
      N simulation predictions for h-step ahead forecasts
  
  date_index : pd.DateIndex or np.ndarray
      Dates for the simulations
  
  h : int
      How many steps ahead are forecast
  
  past_values : int
      How many past observations to include in the forecast plot
docstr_tok: ["Produces","forecasted","values","to","plot",",","along","with","prediction","intervals","This","is","a","utility","function","that","constructs","the","prediction","intervals","and","other","quantities","used","for","plot_predict","(",")","in","particular",".","Parameters","--","--","--","--","--","mean_values",":","np.ndarray","Mean","predictions","for","h-step","ahead","forecasts","sim_vector",":","np.ndarray","N","simulation","predictions","for","h-step","ahead","forecasts","date_index",":","pd.DateIndex","or","np.ndarray","Dates","for","the","simulations","h",":","int","How","many","steps","ahead","are","forecast","past_values",":","int","How","many","past","observations","to","include","in","the","forecast","plot"]
code: def _summarize_simulations(
      self, mean_values, sim_vector, date_index, h, past_values
  ):
      """Produces forecasted values to plot, along with prediction intervals
  
      This is a utility function that constructs the prediction intervals and other quantities
      used for plot_predict() in particular.
  
      Parameters
      ----------
      mean_values : np.ndarray
          Mean predictions for h-step ahead forecasts
  
      sim_vector : np.ndarray
          N simulation predictions for h-step ahead forecasts
  
      date_index : pd.DateIndex or np.ndarray
          Dates for the simulations
  
      h : int
          How many steps ahead are forecast
  
      past_values : int
          How many past observations to include in the forecast plot
      """
  
      error_bars = []
      for pre in range(5, 100, 5):
          error_bars.append(
              np.insert(
                  [np.percentile(i, pre) for i in sim_vector],
                  0,
                  mean_values[-h - 1],
              )
          )
      if self.latent_variables.estimation_method in ["M-H"]:
          forecasted_values = np.insert(
              [np.mean(i) for i in sim_vector], 0, mean_values[-h - 1]
          )
      else:
          forecasted_values = mean_values[-h - 1 :]
      plot_values = mean_values[-h - past_values :]
      plot_index = date_index[-h - past_values :]
      return error_bars, forecasted_values, plot_values, plot_index
  
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 13 for calling the ARIMAX obj's underlying member method code with example usage: obj._summarize_simulations(mean_values, sim_vector, date_index, h, past_values) and returns: error_bars,  forecasted_values,  plot_values,  plot_index