Learn R Programming

invivoPKfit (version 2.0.1)

hess_sd2: Inverse diagonal, method 2

Description

Get square root of diagonal of inverse matrix, second method

Usage

hess_sd2(m)

Value

A numeric vector of length \(n\).

Arguments

m

A square numeric matrix, \(n \times n\).

Author

Caroline Ring

Details

Following the procedure outlined in Gill & King (2004): Calculate generalized inverse of a matrix `m` using [MASS::ginv()]. Then perform a generalized Cholesky factorization of the generalized inverse using [Matrix::Cholesky()] with `perm = TRUE`. Reconstruct the generalized inverse as

$$\left(m^{-1} + E\right) = P_1^{\prime} L L^{\prime} P_1$$

This should ensure positive semi-definiteness of the reconstruction.

Then, take the diagonal of \(\left(m^{-1} + E \right)\), and take the square root.

References

Gill J, King G. (2004) What to Do When Your Hessian is Not Invertible: Alternatives to Model Respecification in Nonlinear Estimation. Sociological Methods & Research 33(1):54-87. DOI: 10.1177/0049124103262681