class_docstr: Inherits time series methods from TSM class.
  
  **** GENERALIZED AUTOREGRESSIVE CONDITIONAL HETEROSCEDASTICITY (GARCH) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.array
      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 ARCH terms the model will have.
  
  target : str (pd.DataFrame) or int (np.array)
      Specifies which column name or array index to use. By default, first
      column/array will be selected as the dependent variable.
docstr: Creates the structure of the model
  
  Parameters
  ----------
  beta : np.array
      Contains untransformed starting values for latent variables
  
  Returns
  ----------
  sigma2 : np.array
      Contains the values for the conditional volatility series
  
  Y : np.array
      Contains the length-adjusted time series (accounting for lags)
  
  eps : np.array
      Contains the squared residuals (ARCH terms) for the time series
docstr_tok: ["Creates","the","structure","of","the","model","Parameters","--","--","--","--","--","beta",":","np.array","Contains","untransformed","starting","values","for","latent","variables","Returns","--","--","--","--","--","sigma2",":","np.array","Contains","the","values","for","the","conditional","volatility","series","Y",":","np.array","Contains","the","length-adjusted","time","series","(","accounting","for","lags",")","eps",":","np.array","Contains","the","squared","residuals","(","ARCH","terms",")","for","the","time","series"]
code: def _model(self, beta):
      """Creates the structure of the model
  
      Parameters
      ----------
      beta : np.array
          Contains untransformed starting values for latent variables
  
      Returns
      ----------
      sigma2 : np.array
          Contains the values for the conditional volatility series
  
      Y : np.array
          Contains the length-adjusted time series (accounting for lags)
  
      eps : np.array
          Contains the squared residuals (ARCH terms) for the time series
      """
  
      # Transform latent variables
      parm = np.array(
          [
              self.latent_variables.z_list[k].prior.transform(beta[k])
              for k in range(beta.shape[0])
          ]
      )
  
      xeps = np.power(self.data - parm[-1], 2)
      Y = np.array(self.data[self.max_lag :])
      eps = np.power(Y - parm[-1], 2)
      X = np.ones(Y.shape[0])
  
      # ARCH terms
      if self.q != 0:
          for i in range(0, self.q):
              X = np.vstack((X, xeps[(self.max_lag - i - 1) : -i - 1]))
          sigma2 = np.matmul(np.transpose(X), parm[0 : -self.p - 1])
      else:
          sigma2 = np.transpose(X * parm[0])
  
      sigma2 = garch_recursion(
          parm, sigma2, self.q, self.p, Y.shape[0], self.max_lag
      )
  
      return np.array(sigma2), Y, eps
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .garch_recursions import garch_recursion
label_desc: Use image node_id 3 for calling the GARCH obj's underlying member method code with example usage: obj._model(beta) and returns: np,  Y,  eps