get_glm_diag_approx_cov {catalytic} | R Documentation |
Compute Diagonal Approximate Covariance Matrix
Description
This function computes the diagonal elements of the approximate covariance matrix for the coefficients in a generalized linear model (GLM). The covariance is derived from the second derivative (Hessian) of the log-likelihood function.
Usage
get_glm_diag_approx_cov(X, model)
Arguments
X |
Matrix. The design matrix (predictors) for the GLM. |
model |
A fitted GLM model object. The object should contain the fitted values and prior weights necessary for computing the Hessian. |
Value
Numeric vector. The diagonal elements of the approximate covariance matrix.
[Package catalytic version 0.1.0 Index]