src/estimagic/inference/ml_covs.py
def _sandwich_step(hess, meat):
    """The sandwich estimator for variance estimation.

    This is used in several robust covariance formulae.

    Args:
        hess (np.array): "hessian" - a k + 1 x k + 1-dimensional array of
            second derivatives of the pseudo-log-likelihood function w.r.t.
            the parameters
        meat (np.array): the variance of the total scores

    Returns:
        se (np.array): a 1d array of k + 1 standard errors
        var (np.array): 2d variance-covariance matrix

    """
    invhessian = robust_inverse(hess, INVALID_INFERENCE_MSG)
    var = np.dot(np.dot(invhessian, meat), invhessian)
    return var
The sandwich estimator for variance estimation.

    This is used in several robust covariance formulae.

    Args:
        hess (np.array): "hessian" - a k + 1 x k + 1-dimensional array of
            second derivatives of the pseudo-log-likelihood function w.r.t.
            the parameters
        meat (np.array): the variance of the total scores

    Returns:
        se (np.array): a 1d array of k + 1 standard errors
        var (np.array): 2d variance-covariance matrix

    
The sandwich estimator for variance estimation.
This is used in several robust covariance formulae.
The sandwich estimator for variance estimation . This is used in several robust covariance formulae .
def _sandwich_step(hess, meat):
    invhessian = robust_inverse(hess, INVALID_INFERENCE_MSG)
    var = np.dot(np.dot(invhessian, meat), invhessian)
    return var
def _sandwich_step ( hess , meat ) : invhessian = robust_inverse ( hess , INVALID_INFERENCE_MSG ) var = np . dot ( np . dot ( invhessian , meat ) , invhessian ) return var
The sandwich estimator for variance estimation.
The sandwich estimator for variance estimation .
"""The sandwich estimator for variance estimation.

    This is used in several robust covariance formulae.

    Args:
        hess (np.array): "hessian" - a k + 1 x k + 1-dimensional array of
            second derivatives of the pseudo-log-likelihood function w.r.t.
            the parameters
        meat (np.array): the variance of the total scores

    Returns:
        se (np.array): a 1d array of k + 1 standard errors
        var (np.array): 2d variance-covariance matrix

    """
se (np.array): a 1d array of k + 1 standard errors
var (np.array): 2d variance-covariance matrix
se ( np . array ) : a 1d array of k + 1 standard errors var ( np . array ) : 2d variance - covariance matrix
hess
"hessian" - a k + 1 x k + 1-dimensional array of
second derivatives of the pseudo-log-likelihood function w.r.t.
the parameters
" hessian " - a k + 1 x k + 1 - dimensional array of second derivatives of the pseudo - log - likelihood function w . r . t . the parameters
meat
the variance of the total scores
the variance of the total scores