class_docstr: Cox Proportional Hazards Regression Model
  
  The Cox PH Model is for right censored data.
  
  Parameters
  ----------
  endog : array_like
      The observed times (event or censoring)
  exog : 2D array_like
      The covariates or exogeneous variables
  status : array_like
      The censoring status values; status=1 indicates that an
      event occurred (e.g. failure or death), status=0 indicates
      that the observation was right censored. If None, defaults
      to status=1 for all cases.
  entry : array_like
      The entry times, if left truncation occurs
  strata : array_like
      Stratum labels.  If None, all observations are taken to be
      in a single stratum.
  ties : str
      The method used to handle tied times, must be either 'breslow'
      or 'efron'.
  offset : array_like
      Array of offset values
  missing : str
      The method used to handle missing data
  
  Notes
  -----
  Proportional hazards regression models should not include an
  explicit or implicit intercept.  The effect of an intercept is
  not identified using the partial likelihood approach.
  
  `endog`, `event`, `strata`, `entry`, and the first dimension
  of `exog` all must have the same length
class_docstr_tok: ["Cox","Proportional","Hazards","Regression","Model","The","Cox","PH","Model","is","for","right","censored","data",".","Parameters","--","--","--","--","--","endog",":","array_like","The","observed","times","(","event","or","censoring",")","exog",":","2D","array_like","The","covariates","or","exogeneous","variables","status",":","array_like","The","censoring","status","values",";","status=1","indicates","that","an","event","occurred","(","e.g",".","failure","or","death",")",",","status=0","indicates","that","the","observation","was","right","censored",".","If","None",",","defaults","to","status=1","for","all","cases",".","entry",":","array_like","The","entry","times",",","if","left","truncation","occurs","strata",":","array_like","Stratum","labels",".","If","None",",","all","observations","are","taken","to","be","in","a","single","stratum",".","ties",":","str","The","method","used","to","handle","tied","times",",","must","be","either","'breslow'","or","'efron","'",".","offset",":","array_like","Array","of","offset","values","missing",":","str","The","method","used","to","handle","missing","data","Notes","--","--","-","Proportional","hazards","regression","models","should","not","include","an","explicit","or","implicit","intercept",".","The","effect","of","an","intercept","is","not","identified","using","the","partial","likelihood","approach",".","`","endog","`",",","`","event","`",",","`","strata","`",",","`","entry","`",",","and","the","first","dimension","of","`","exog","`","all","must","have","the","same","length"]
docstr: Fit a proportional hazards regression model.
  
  Parameters
  ----------
  groups : array_like
      Labels indicating groups of observations that may be
      dependent.  If present, the standard errors account for
      this dependence. Does not affect fitted values.
  
  Returns
  -------
  PHRegResults
      Returns a results instance.
docstr_tok: ["Fit","a","proportional","hazards","regression","model",".","Parameters","--","--","--","--","--","groups",":","array_like","Labels","indicating","groups","of","observations","that","may","be","dependent",".","If","present",",","the","standard","errors","account","for","this","dependence",".","Does","not","affect","fitted","values",".","Returns","--","--","--","-","PHRegResults","Returns","a","results","instance","."]
code: def fit(self, groups=None, **args):
      """
      Fit a proportional hazards regression model.
  
      Parameters
      ----------
      groups : array_like
          Labels indicating groups of observations that may be
          dependent.  If present, the standard errors account for
          this dependence. Does not affect fitted values.
  
      Returns
      -------
      PHRegResults
          Returns a results instance.
      """
  
      # TODO process for missing values
      if groups is not None:
          if len(groups) != len(self.endog):
              msg = "len(groups) = %d and len(endog) = %d differ" % (
                  len(groups),
                  len(self.endog),
              )
              raise ValueError(msg)
          self.groups = np.asarray(groups)
      else:
          self.groups = None
  
      if "disp" not in args:
          args["disp"] = False
  
      fit_rslts = super().fit(**args)
  
      if self.groups is None:
          cov_params = fit_rslts.cov_params()
      else:
          cov_params = self.robust_covariance(fit_rslts.params)
  
      results = PHRegResults(self, fit_rslts.params, cov_params)
  
      return results
  
imports: import numpy
  from statsmodels.base import model
  import statsmodels.base.model
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.compat.pandas import Appender
label_desc: Use image node_id 3 for calling the PHReg obj's underlying member method code with example usage: obj.fit(groups) and returns: results