docstr: derivative of score_obs w.r.t. endog
  
  Parameters
  ----------
  params : ndarray
      parameter at which score is evaluated
  
  Returns
  -------
  derivative : ndarray_2d
      The derivative of the score_obs with respect to endog.
docstr_tok: ["derivative","of","score_obs","w.r.t",".","endog","Parameters","--","--","--","--","--","params",":","ndarray","parameter","at","which","score","is","evaluated","Returns","--","--","--","-","derivative",":","ndarray_2d","The","derivative","of","the","score_obs","with","respect","to","endog","."]
code: def _deriv_score_obs_dendog(self, params):
      """derivative of score_obs w.r.t. endog
  
      Parameters
      ----------
      params : ndarray
          parameter at which score is evaluated
  
      Returns
      -------
      derivative : ndarray_2d
          The derivative of the score_obs with respect to endog.
      """
      from statsmodels.tools.numdiff import _approx_fprime_cs_scalar
  
      def f(y):
          if y.ndim == 2 and y.shape[1] == 1:
              y = y[:, 0]
          sf = self.score_factor(params, endog=y)
          return np.column_stack(sf)
  
      dsf = _approx_fprime_cs_scalar(self.endog[:, None], f)
      # deriv is 2d vector
      d1 = dsf[:, :1] * self.exog
      d2 = dsf[:, 1:2] * self.exog_precision
  
      return np.column_stack((d1, d2))
  
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 19 for calling the BetaModel obj's underlying member method code with example usage: obj._deriv_score_obs_dendog(params) and returns: np, np