mc_quasi_score: Quasi-Score Function

View source: R/mc_quasi_score.R

mc_quasi_scoreR Documentation

Quasi-Score Function

Description

Computes the quasi-score function for the regression parameters in multivariate covariance generalized linear models, together with its associated sensitivity and variability matrices. These quantities are key components of the estimating function approach used to fit mcglm models.

Usage

mc_quasi_score(D, inv_C, y_vec, mu_vec, W)

Arguments

D

A numeric matrix corresponding to the derivative of the mean vector with respect to the regression parameters. This matrix is typically obtained from the output of mc_link_function.

inv_C

A numeric matrix giving the inverse of the covariance matrix of the response vector, usually obtained from mc_build_C.

y_vec

A numeric vector containing the stacked observed responses.

mu_vec

A numeric vector containing the stacked fitted mean values.

W

A numeric matrix of weights, typically diagonal, accounting for missing observations or differential weighting of the responses.

Details

Let y denote the response vector, \mu its mean, D the derivative of \mu with respect to the regression parameters, and C the covariance matrix of y. The quasi-score is defined as

U_\beta = D^\top C^{-1} W (y - \mu),

where W is a weight matrix. The sensitivity and variability matrices are computed according to standard estimating function theory and are used in the iterative fitting algorithm and for inference.

This function is internal and not intended to be called directly by end users.

Value

A list with the following components:

Score

A numeric vector containing the quasi-score values for the regression parameters.

Sensitivity

A numeric matrix giving the sensitivity matrix of the quasi-score function.

Variability

A numeric matrix giving the variability matrix of the quasi-score function.

Author(s)

Wagner Hugo Bonat


mcglm documentation built on Jan. 9, 2026, 1:07 a.m.