get_glm_diag_approx_cov: Compute Diagonal Approximate Covariance Matrix

View source: R/misc.R

get_glm_diag_approx_covR 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.


catalytic documentation built on April 4, 2025, 5:51 a.m.