def hessian(self, params):
    '\n        Generic Zero Inflated model Hessian matrix of the loglikelihood\n\n        Parameters\n        ----------\n        params : array_like\n            The parameters of the model\n\n        Returns\n        -------\n        hess : ndarray, (k_vars, k_vars)\n            The Hessian, second derivative of loglikelihood function,\n            evaluated at `params`\n\n        Notes\n        -----\n        '
    hess_arr_main = self._hessian_main(params)
    hess_arr_infl = self._hessian_inflate(params)
    if ((hess_arr_main is None) or (hess_arr_infl is None)):
        return approx_hess(params, self.loglike)
    dim = (self.k_exog + self.k_inflate)
    hess_arr = np.zeros((dim, dim))
    hess_arr[:self.k_inflate, :] = hess_arr_infl
    hess_arr[self.k_inflate:, self.k_inflate:] = hess_arr_main
    tri_idx = np.triu_indices((self.k_exog + self.k_inflate), k=1)
    hess_arr[tri_idx] = hess_arr.T[tri_idx]
    return hess_arr
Generic Zero Inflated model Hessian matrix of the loglikelihood

Parameters
----------
params : array_like
    The parameters of the model

Returns
-------
hess : ndarray, (k_vars, k_vars)
    The Hessian, second derivative of loglikelihood function,
    evaluated at `params`

Notes
-----
def hessian(self, params):
    '\n        Generic Zero Inflated model Hessian matrix of the loglikelihood\n\n        Parameters\n        ----------\n        params : array_like\n            The parameters of the model\n\n        Returns\n        -------\n        hess : ndarray, (k_vars, k_vars)\n            The Hessian, second derivative of loglikelihood function,\n            evaluated at `params`\n\n        Notes\n        -----\n        '
    hess_arr_main = self._hessian_main(params)
    hess_arr_infl = self._hessian_inflate(params)
    if ((hess_arr_main is None) or (hess_arr_infl is None)):
        return approx_hess(params, self.loglike)
    dim = (self.k_exog + self.k_inflate)
    hess_arr = np.zeros((dim, dim))
    hess_arr[:self.k_inflate, :] = hess_arr_infl
    hess_arr[self.k_inflate:, self.k_inflate:] = hess_arr_main
    tri_idx = np.triu_indices((self.k_exog + self.k_inflate), k=1)
    hess_arr[tri_idx] = hess_arr.T[tri_idx]
    return hess_arr