Learn R Programming

catalytic (version 0.1.0)

get_glm_diag_approx_cov: 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)

Value

Numeric vector. The diagonal elements of the approximate covariance matrix.

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.