'Derivative of the expected endog with respect to exog.
Parameters
exog : array-like
Values of the independent variables at which the derivative
is calculated.
params : array-like
Parameter values at which the derivative is calculated.
offset_exposure : array-like, optional
Combined offset and exposure.
Returns
The derivative of the expected endog with respect to exog.'

def mean_deriv_exog(self, exog, params, offset_exposure=None):

    lin_pred = np.dot(exog, params)
    if (offset_exposure is not None):
        lin_pred += offset_exposure
    idl = self.family.link.inverse_deriv(lin_pred)
    dmat = np.outer(idl, params)
    return dmat
