mc_matrix_linear_predictor: Matrix Linear Predictor

View source: R/mc_matrix_linear_predictor.R

mc_matrix_linear_predictorR Documentation

Matrix Linear Predictor

Description

Computes the matrix linear predictor used in multivariate covariance generalized linear models. The matrix linear predictor is defined as a linear combination of known matrices weighted by dispersion parameters.

Usage

mc_matrix_linear_predictor(tau, Z)

Arguments

tau

A numeric vector of dispersion parameters.

Z

A list of known matrices with compatible dimensions.

Details

Given a list of known matrices (Z_1, \ldots, Z_D) and a vector of dispersion parameters (\tau_1, \ldots, \tau_D), this function computes their weighted sum. This object is typically used as a component of the matrix linear predictor in covariance modeling.

Value

A matrix of class Matrix representing the matrix linear predictor

U = \tau_1 Z_1 + \cdots + \tau_D Z_D.

The returned matrix has the same dimensions as the elements of Z. The returned object is intended for internal use only.

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br

Source

Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4):1–30.

Bonat, W. H. and Jorgensen, B. (2016). Multivariate covariance generalized linear models. Journal of the Royal Statistical Society: Series C, 65:649–675.

See Also

mc_id, mc_dist, mc_ma, mc_rw, mc_mixed, mc_car

Examples

Z0 <- Matrix::Diagonal(5, 1)
Z1 <- Matrix::Matrix(rep(1, 5) %*% t(rep(1, 5)))
Z <- list(Z0, Z1)
mc_matrix_linear_predictor(tau = c(1, 0.8), Z = Z)


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