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.

mc_matrix_linear_predictor(tau, Z)

Arguments

tau

a numeric vector of dispersion parameters.

Z

a list of known matrices.

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.

Value

A matrix.

Details

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

See also

mc_id, mc_dist, mc_ma, mc_rw, mc_mixed and mc_car.

Examples

require(Matrix) Z0 <- Diagonal(5, 1) Z1 <- Matrix(rep(1,5)%*%t(rep(1,5))) Z <- list(Z0, Z1) mc_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