mc_variability: Variability Matrix

View source: R/mc_variability.R

mc_variabilityR Documentation

Variability Matrix

Description

Computes the variability matrix associated with the Pearson estimating function. This function is intended for internal use in the fitting algorithm and implements Equation 8 from Bonat and Jorgensen (2016).

Usage

mc_variability(sensitivity, product, inv_C, C, res, W)

Arguments

sensitivity

A numeric matrix representing the sensitivity matrix. Typically obtained from mc_sensitivity.

product

A list of numeric matrices, usually used to compute contributions to the variability matrix.

inv_C

A numeric matrix representing the inverse of the covariance matrix, usually obtained from mc_build_C.

C

A numeric matrix representing the covariance matrix, usually obtained from mc_build_C.

res

A numeric vector of residuals, defined as y - \mu.

W

A numeric matrix of weights.

Details

This function implements Equation 8 from Bonat and Jorgensen (2016), which defines the variability matrix used in generalized estimating equations for multiple response variables.

Value

A symmetric numeric matrix representing the variability matrix associated with the Pearson estimating function. The returned object is intended for internal use only.

Author(s)

Wagner Hugo Bonat


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