'For computing marginal effects standard errors.
This is used only in the case of discrete and count regressors to
get the variance-covariance of the marginal effects. It returns
[d F / d params] where F is the predict.
Transform can be \'dydx\' or \'eydx\'. Checking is done in margeff
computations for appropriate transform.'

def _derivative_predict(self, params, exog=None, transform='dydx'):

    if (exog is None):
        exog = self.exog
    dF = (self.pdf(np.dot(exog, params))[:, None] * exog)
    if ('ey' in transform):
        dF /= self.predict(params, exog)[:, None]
    return dF
