docstr: Predict values for mean or precision
  
  Parameters
  ----------
  params : array_like
      The model parameters.
  exog : array_like
      Array of predictor variables for mean.
  exog_precision : array_like
      Array of predictor variables for precision parameter.
  which : str
  
      - "mean" : mean, conditional expectation E(endog | exog)
      - "precision" : predicted precision
      - "linear" : linear predictor for the mean function
      - "linear-precision" : linear predictor for the precision parameter
  
  Returns
  -------
  ndarray, predicted values
docstr_tok: ["Predict","values","for","mean","or","precision","Parameters","--","--","--","--","--","params",":","array_like","The","model","parameters",".","exog",":","array_like","Array","of","predictor","variables","for","mean",".","exog_precision",":","array_like","Array","of","predictor","variables","for","precision","parameter",".","which",":","str","-","``","mean","''",":","mean",",","conditional","expectation","E","(","endog","|","exog",")","-","``","precision","''",":","predicted","precision","-","``","linear","''",":","linear","predictor","for","the","mean","function","-","``","linear-precision","''",":","linear","predictor","for","the","precision","parameter","Returns","--","--","--","-","ndarray",",","predicted","values"]
code: def predict(
      self, params, exog=None, exog_precision=None, which="mean"
  ):
      """Predict values for mean or precision
  
      Parameters
      ----------
      params : array_like
          The model parameters.
      exog : array_like
          Array of predictor variables for mean.
      exog_precision : array_like
          Array of predictor variables for precision parameter.
      which : str
  
          - "mean" : mean, conditional expectation E(endog | exog)
          - "precision" : predicted precision
          - "linear" : linear predictor for the mean function
          - "linear-precision" : linear predictor for the precision parameter
  
      Returns
      -------
      ndarray, predicted values
      """
      # compatibility with old names and misspelling
      if which == "linpred":
          which = "linear"
      if which in ["linpred_precision", "linear_precision"]:
          which = "linear-precision"
  
      k_mean = self.exog.shape[1]
      if which in ["mean", "linear"]:
          if exog is None:
              exog = self.exog
          params_mean = params[:k_mean]
          # Zparams = params[k_mean:]
          linpred = np.dot(exog, params_mean)
          if which == "mean":
              mu = self.link.inverse(linpred)
              res = mu
          else:
              res = linpred
  
      elif which in ["precision", "linear-precision"]:
          if exog_precision is None:
              exog_precision = self.exog_precision
          params_prec = params[k_mean:]
          linpred_prec = np.dot(exog_precision, params_prec)
  
          if which == "precision":
              phi = self.link_precision.inverse(linpred_prec)
              res = phi
          else:
              res = linpred_prec
  
      elif which == "var":
          res = self._predict_var(
              params, exog=exog, exog_precision=exog_precision
          )
  
      else:
          raise ValueError("which = %s is not available" % which)
  
      return res
  
imports: import numpy
  from scipy.special import gammaln
  import patsy
  import statsmodels.base.wrapper
  import statsmodels.regression.linear_model
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.base.model import GenericLikelihoodModel, GenericLikelihoodModelResults, _LLRMixin
  from statsmodels.genmod import families
label_desc: Use image node_id 4 for calling the BetaModel obj's underlying member method code with example usage: obj.predict(params, exog, exog_precision, which) and returns: res