class_docstr: Inherits time series methods from TSM class.
  
  **** GENERALIZED AUTOREGRESSIVE SCORE (GAS) REGRESSION MODELS ****
  
  Parameters
  ----------
  
  formula : string
      patsy string describing the regression
  
  data : pd.DataFrame or np.array
      Field to specify the data that will be used
  
  family : GAS family object
      Which distribution to use, e.g. GASNormal()
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","GENERALIZED","AUTOREGRESSIVE","SCORE","(","GAS",")","REGRESSION","MODELS","*","*","*","*","Parameters","--","--","--","--","--","formula",":","string","patsy","string","describing","the","regression","data",":","pd.DataFrame","or","np.array","Field","to","specify","the","data","that","will","be","used","family",":","GAS","family","object","Which","distribution","to","use",",","e.g",".","GASNormal","(",")"]
code: def __init__(self, formula, data, family):
      # Initialize TSM object
      super(GASReg, self).__init__("GASReg")
  
      # Latent Variables
      self.max_lag = 0
      self._z_hide = (
          0  # Whether to cutoff variance latent variables from results
      )
      self.supported_methods = ["MLE", "PML", "Laplace", "M-H", "BBVI"]
      self.default_method = "MLE"
      self.multivariate_model = False
      self.skewness = False
  
      # Format the data
      self.is_pandas = True  # This is compulsory for this model type
      self.data_original = data
      self.formula = formula
      self.y, self.X = dmatrices(formula, data)
      self.y_name = self.y.design_info.describe()
      self.X_names = self.X.design_info.describe().split(" + ")
      self.y = self.y.astype(np.float)
      self.X = self.X.astype(np.float)
      self.z_no = self.X.shape[1]
      self.data_name = self.y_name
      self.y = np.array([self.y]).ravel()
      self.data = self.y
      self.X = np.array([self.X])[0]
      self.index = data.index
      self.initial_values = np.zeros(self.z_no)
  
      self.data_length = self.data.shape[0]
      self._create_model_matrices()
      self._create_latent_variables()
  
      self.family = family
  
      (
          self.model_name2,
          self.link,
          self.scale,
          self.shape,
          self.skewness,
          self.mean_transform,
          self.cythonized,
      ) = self.family.setup()
  
      # Identify whether model has cythonized backend - then choose update type
      if self.cythonized is True:
          self._model = self._cythonized_model
          self._mb_model = self._cythonized_mb_model
          self.recursion = self.family.gradientreg_recursion()
      else:
          self._model = self._uncythonized_model
          self._mb_model = self._uncythonized_mb_model
  
      self.model_name = self.model_name2 + " GAS Regression"
  
      # Build any remaining latent variables that are specific to the family chosen
      for no, i in enumerate(self.family.build_latent_variables()):
          self.latent_variables.add_z(i[0], i[1], i[2])
          self.latent_variables.z_list[no + self.z_no].start = i[3]
  
      self.family_z_no = len(self.family.build_latent_variables())
      self.z_no += len(self.family.build_latent_variables())
  
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 tsm
  from ..None import data_check
  from .gas_core_recursions import gas_reg_recursion
label_desc: Use image node_id 1 to create a new GASReg object from inherited base classes: tsm with example: obj = GASReg(formula, data, family)