def deriv2(self, p):
    "\n        Second derivative of the negative binomial link function.\n\n        Parameters\n        ----------\n        p : array_like\n            Mean parameters\n\n        Returns\n        -------\n        g''(p) : ndarray\n            The second derivative of the negative binomial transform link\n            function\n\n        Notes\n        -----\n        g''(x) = -(1+2*alpha*x)/(x+alpha*x^2)^2\n        "
    numer = (- (1 + ((2 * self.alpha) * p)))
    denom = ((p + (self.alpha * (p ** 2))) ** 2)
    return (numer / denom)
Second derivative of the negative binomial link function.

Parameters
----------
p : array_like
    Mean parameters

Returns
-------
g''(p) : ndarray
    The second derivative of the negative binomial transform link
    function

Notes
-----
g''(x) = -(1+2*alpha*x)/(x+alpha*x^2)^2
def deriv2(self, p):
    "\n        Second derivative of the negative binomial link function.\n\n        Parameters\n        ----------\n        p : array_like\n            Mean parameters\n\n        Returns\n        -------\n        g(p) : ndarray\n            The second derivative of the negative binomial transform link\n            function\n\n        Notes\n        -----\n        g(x) = -(1+2*alpha*x)/(x+alpha*x^2)^2\n        "
    numer = (- (1 + ((2 * self.alpha) * p)))
    denom = ((p + (self.alpha * (p ** 2))) ** 2)
    return (numer / denom)