'Derivative of the expected endog with respect to the parameters.
Parameters
exog : array-like
The exogeneous data at which the derivative is computed.
lin_pred : array-like
The values of the linear predictor.
Returns
The value of the derivative of the expected endog with respect
to the parameter vector.
Notes
If there is an offset or exposure, it should be added to
`lin_pred` prior to calling this function.'

def mean_deriv(self, exog, lin_pred):

    idl = self.family.link.inverse_deriv(lin_pred)
    dmat = (exog * idl[:, None])
    return dmat
