Skip to contents

Formula: [[X'R^-1 X, X'R^-1 Z], [Z'R^-1 X, Z'R^-1 Z + Sigma^-1]] [beta; u] = [X'R^-1 y; Z'R^-1 y]

Usage

Hendmme(X, Z, y, Sigma_inv, R_inv = NULL)

Arguments

X

Design matrix of fixed effects.

Z

Design matrix of random effects.

y

Response vector of length n.

Sigma_inv

Inverse of the random-effect variance-covariance matrix.

R_inv

Inverse residual variance-covariance matrix; None uses the identity.

Value

List with beta, u, fitted, n, p, q.

References

Montesinos Lopez, Montesinos Lopez and Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, doi:10.1007/978-3-030-89010-0. Chapter 2, Eq. (2.2) p. 37: Henderson's mixed model equations, whose solution for beta is the BLUE and for u is the BLUP. Delegates to the chapter-2 MME solver verified against the book.

Examples

set.seed(1)
r <- Hendmme(X = rnorm(10), Z = rnorm(10), y = rnorm(10), Sigma_inv = 0.5); TRUE
#> [1] TRUE