Skip to contents

Compute the matrix linear predictor. It is an internal function, however, since the concept of matrix linear predictor was proposed recently. I decided let this function visible to the interested reader gets some feeling about how it works.

Usage

mt_matrix_linear_predictor(tau, Z)

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 Royal Statistical Society - Series C 65:649–675.

Arguments

tau

a numeric vector of dispersion parameters.

Z

a list of known matrices.

Value

A matrix.

Details

Given a list with a set of known matrices (\(Z_0,...,Z_D\)) the function
mt_matrix_linear_predictor returns \(U = \tau_0 Z_0 + ... + \tau_D Z_D\).

Author

Wagner Hugo Bonat, wbonat@ufpr.br

Examples

require(Matrix)
#> Loading required package: Matrix
Z0 <- Diagonal(5, 1)
Z1 <- Matrix(rep(1,5)%*%t(rep(1,5)))
Z <- list(Z0, Z1)
mt_matrix_linear_predictor(tau = c(1,0.8), Z = Z)
#> 5 x 5 Matrix of class "dsyMatrix"
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]  1.8  0.8  0.8  0.8  0.8
#> [2,]  0.8  1.8  0.8  0.8  0.8
#> [3,]  0.8  0.8  1.8  0.8  0.8
#> [4,]  0.8  0.8  0.8  1.8  0.8
#> [5,]  0.8  0.8  0.8  0.8  1.8