Skip to contents

Formula: G = L L'; Zstar = Z L; then Y = X beta + Zstar ustar + e with ustar ~ N(0, sigma2_g I) has the same marginal variance as u ~ N(0, sigma2_g G)

Usage

Gblupeq(Z, G, sigma2_g)

Arguments

Z

Design matrix of lines.

G

Genomic relationship matrix; must be positive definite.

sigma2_g

Genomic variance component.

Value

List with Zstar, L, V_original, V_reparameterized, max_gap, n, 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, p. 46: the GBLUP model can be expressed equivalently as Y = X beta + Z* u + e with Z* = Z L', G = L'L the Cholesky decomposition of G, and u ~ N(0, sigma2_g I_q). The book's L is the upper factor returned by R's chol(); this implementation uses the lower factor L with G = L L' and Z* = Z L in BOTH language arms, which gives the identical marginal variance sigma2_g Z G Z' – max_gap reports the largest entry-wise difference between the two marginal variances, and is zero up to rounding. Read from the chapter PDF, not recalled.

Examples

set.seed(1)
Z <- matrix(rbinom(50, 1, 0.5), 10, 5)
G <- diag(5)
Gblupeq(Z, G, sigma2_g = 1)
#> $Zstar
#>       [,1] [,2] [,3] [,4] [,5]
#>  [1,]    0    0    1    0    1
#>  [2,]    0    0    0    1    1
#>  [3,]    1    1    1    0    1
#>  [4,]    1    0    0    0    1
#>  [5,]    0    1    0    1    1
#>  [6,]    1    0    0    1    1
#>  [7,]    1    1    0    1    0
#>  [8,]    1    1    0    0    0
#>  [9,]    1    0    1    1    1
#> [10,]    0    1    0    0    1
#> 
#> $L
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]    1    0    0    0    0
#> [2,]    0    1    0    0    0
#> [3,]    0    0    1    0    0
#> [4,]    0    0    0    1    0
#> [5,]    0    0    0    0    1
#> 
#> $V_original
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#>  [1,]    2    1    2    1    1    1    0    0    2     1
#>  [2,]    1    2    1    1    2    2    1    0    2     1
#>  [3,]    2    1    4    2    2    2    2    2    3     2
#>  [4,]    1    1    2    2    1    2    1    1    2     1
#>  [5,]    1    2    2    1    3    2    2    1    2     2
#>  [6,]    1    2    2    2    2    3    2    1    3     1
#>  [7,]    0    1    2    1    2    2    3    2    2     1
#>  [8,]    0    0    2    1    1    1    2    2    1     1
#>  [9,]    2    2    3    2    2    3    2    1    4     1
#> [10,]    1    1    2    1    2    1    1    1    1     2
#> 
#> $V_reparameterized
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#>  [1,]    2    1    2    1    1    1    0    0    2     1
#>  [2,]    1    2    1    1    2    2    1    0    2     1
#>  [3,]    2    1    4    2    2    2    2    2    3     2
#>  [4,]    1    1    2    2    1    2    1    1    2     1
#>  [5,]    1    2    2    1    3    2    2    1    2     2
#>  [6,]    1    2    2    2    2    3    2    1    3     1
#>  [7,]    0    1    2    1    2    2    3    2    2     1
#>  [8,]    0    0    2    1    1    1    2    2    1     1
#>  [9,]    2    2    3    2    2    3    2    1    4     1
#> [10,]    1    1    2    1    2    1    1    1    1     2
#> 
#> $max_gap
#> [1] 0
#> 
#> $n
#> [1] 10
#> 
#> $q
#> [1] 5
#> 
#> $method
#> [1] "GBLUP Cholesky re-parameterization, MVSML Chap. 2 p. 46"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"