Skip to contents

Multi-trait GBLUP via vec-stacked mixed-model equations

Usage

morie_multi_trait_gblup(x, y, markers, Sigma_g = NULL, Sigma_e = NULL)

Arguments

x

Fixed-effect design (vector or matrix).

y

Multi-trait response (n x t).

markers

Genotype matrix (n x m).

Sigma_g

Optional t x t genetic covariance.

Sigma_e

Optional t x t residual covariance.

Value

list(estimate, G_hat, B_hat, Sigma_g, Sigma_e, n, t, method).

References

Montesinos Lopez Ch 10.

Examples

set.seed(1)
morie_multi_trait_gblup(
  x = rnorm(50), y = rnorm(50),
  markers = matrix(sample(0:2, 200, TRUE), 50, 4)
)
#> $estimate
#> [1] -7.382549e-17
#> 
#> $G_hat
#>              [,1]
#>  [1,] -0.30372613
#>  [2,]  0.33009471
#>  [3,] -0.51433721
#>  [4,] -0.03312979
#>  [5,]  0.06729974
#>  [6,] -0.14363713
#>  [7,]  0.12175896
#>  [8,]  0.11814660
#>  [9,]  0.54363039
#> [10,] -0.19549580
#> [11,] -0.09278835
#> [12,] -0.20036979
#> [13,]  0.33269332
#> [14,] -0.29852829
#> [15,]  0.33497016
#> [16,] -0.14103696
#> [17,] -0.29852637
#> [18,]  0.44287524
#> [19,]  0.64893636
#> [20,] -0.24894159
#> [21,] -0.20036950
#> [22,]  0.12435865
#> [23,] -0.14591127
#> [24,] -0.09246723
#> [25,] -0.03313087
#> [26,]  0.33041879
#> [27,] -0.09019017
#> [28,]  0.17032859
#> [29,] -0.04060639
#> [30,] -0.03800599
#> [31,] -0.41130456
#> [32,] -0.29852605
#> [33,]  0.01284071
#> [34,] -0.30600043
#> [35,] -0.03573222
#> [36,] -0.40903128
#> [37,] -0.19322086
#> [38,]  0.12435794
#> [39,]  0.17520581
#> [40,]  0.33756918
#> [41,] -0.20297002
#> [42,]  0.12175834
#> [43,]  0.06502496
#> [44,] -0.30340028
#> [45,] -0.09279020
#> [46,] -0.14591164
#> [47,]  0.12175882
#> [48,]  0.22251444
#> [49,]  0.33041880
#> [50,]  0.43312580
#> 
#> $B_hat
#>           [,1]
#> [1,] 0.1132607
#> [2,] 0.1433676
#> 
#> $Sigma_g
#>           [,1]
#> [1,] 0.3456079
#> 
#> $Sigma_e
#>           [,1]
#> [1,] 0.3456079
#> 
#> $n
#> [1] 50
#> 
#> $t
#> [1] 1
#> 
#> $method
#> [1] "Multi-trait GBLUP (vec-stacked MME)"
#>