class_docstr: Fit a conditional logistic regression model to grouped data.
  
  Every group is implicitly given an intercept, but the model is fit using
  a conditional likelihood in which the intercepts are not present.  Thus,
  intercept estimates are not given, but the other parameter estimates can
  be interpreted as being adjusted for any group-level confounders.
  
  Parameters
  ----------
  endog : array_like
      The response variable, must contain only 0 and 1.
  exog : array_like
      The array of covariates.  Do not include an intercept
      in this array.
  groups : array_like
      Codes defining the groups. This is a required keyword parameter.
class_docstr_tok: ["Fit","a","conditional","logistic","regression","model","to","grouped","data",".","Every","group","is","implicitly","given","an","intercept",",","but","the","model","is","fit","using","a","conditional","likelihood","in","which","the","intercepts","are","not","present",".","Thus",",","intercept","estimates","are","not","given",",","but","the","other","parameter","estimates","can","be","interpreted","as","being","adjusted","for","any","group-level","confounders",".","Parameters","--","--","--","--","--","endog",":","array_like","The","response","variable",",","must","contain","only","0","and","1.","exog",":","array_like","The","array","of","covariates",".","Do","not","include","an","intercept","in","this","array",".","groups",":","array_like","Codes","defining","the","groups",".","This","is","a","required","keyword","parameter","."]
code: def _denom_grad(self, grp, params, ofs=None):
      if ofs is None:
          ofs = 0
  
      ex = self._exog_grp[grp]
      exb = np.exp(np.dot(ex, params) + ofs)
  
      # s may be called multiple times in the recursions with the
      # same arguments, so memoize the results.
      memo = {}
  
      def s(t, k):
          if t < k:
              return 0, np.zeros(self.k_params)
          if k == 0:
              return 1, 0
  
          try:
              return memo[(t, k)]
          except KeyError:
              pass
  
          h = exb[t - 1]
          a, b = s(t - 1, k)
          c, e = s(t - 1, k - 1)
          d = c * h * ex[t - 1, :]
  
          u, v = a + c * h, b + d + e * h
          memo[(t, k)] = (u, v)
  
          return u, v
  
      return s(self._groupsize[grp], self._n1[grp])
  
imports: import numpy
  import statsmodels.base.model
  import statsmodels.regression.linear_model
  import statsmodels.base.wrapper
  from statsmodels.discrete.discrete_model import MultinomialResults, MultinomialResultsWrapper
  import collections
  import warnings
  import itertools
label_desc: Use image node_id 5 for calling the ConditionalLogit obj's underlying member method code with example usage: obj._denom_grad(grp, params, ofs) and returns: s, u,  v, int,  np, int,  int, memo