Skip to contents

Genomic best linear unbiased prediction and its SNP-space equivalent, with the VanRaden genomic relationship matrix.

Usage

morie_grm(M) 

morie_gblup(X, y, G, sigma2_g, sigma2_e = 1) 

morie_gblup_model(y, Z_L, G, sigma2_g, sigma2_e = 1) 

morie_snp_blup(X, y, M, sigma2_m, sigma2_e = 1) 

morie_bayes_gblup(y, G, n_iter = 2000L, burn_in = 500L, seed = 42L, ...)

Arguments

y

numeric response vector

X

fixed-effect design matrix

G

genomic relationship matrix

M

centred and scaled marker matrix

...

further arguments passed to the underlying solver

sigma2_g

argument sigma2_g; not described in the source.

sigma2_e

argument sigma2_e; not described in the source.

Z_L

argument Z_L; not described in the source.

sigma2_m

argument sigma2_m; not described in the source.

n_iter

argument n_iter; not described in the source.

burn_in

argument burn_in; not described in the source.

seed

argument seed; not described in the source.

Value

A list holding the fitted quantities for the method called: point estimates, fitted values and any diagnostics it produces. See the individual method descriptions above for the components each returns.

Details

These functions mirror, in R, the implementations in the Python package morie; the two are checked against each other by the parity tests in tests/testthat/.

Examples

set.seed(1)
M <- matrix(rbinom(60, 2, 0.4), 10, 6)
morie_grm(M)
#>              [,1]        [,2]        [,3]        [,4]        [,5]        [,6]
#>  [1,]  1.17163278  0.39204462  0.13644341 -0.73048482 -0.04298482 -0.22331269
#>  [2,]  0.39204462  1.21191667  0.09865853 -0.39232008 -0.20482008 -0.37695123
#>  [3,]  0.13644341  0.09865853  0.11439706 -0.25662953 -0.06912953  0.00464096
#>  [4,] -0.73048482 -0.39232008 -0.25662953  1.17159918 -0.07840082  0.24946803
#>  [5,] -0.04298482 -0.20482008 -0.06912953 -0.07840082  0.60909918 -0.06303197
#>  [6,] -0.22331269 -0.37695123  0.00464096  0.24946803 -0.06303197  0.51073852
#>  [7,] -0.70965148 -0.37148675 -0.23579620  0.25493251 -0.05756749  0.27030136
#>  [8,] -0.51657383 -0.55435872 -0.02137880  0.54509461 -0.20490539 -0.13113490
#>  [9,]  0.45611554 -0.07347262  0.18816755 -0.42876068 -0.24126068  0.07841145
#> [10,]  0.06677128  0.27078967  0.04062657 -0.33449838  0.35300162 -0.31912953
#>              [,7]        [,8]        [,9]       [,10]
#>  [1,] -0.70965148 -0.51657383  0.45611554  0.06677128
#>  [2,] -0.37148675 -0.55435872 -0.07347262  0.27078967
#>  [3,] -0.23579620 -0.02137880  0.18816755  0.04062657
#>  [4,]  0.25493251  0.54509461 -0.42876068 -0.33449838
#>  [5,] -0.05756749 -0.20490539 -0.24126068  0.35300162
#>  [6,]  0.27030136 -0.13113490  0.07841145 -0.31912953
#>  [7,]  1.94243251 -0.37157206 -0.40792735 -0.31366505
#>  [8,] -0.37157206  1.29758671  0.05239169 -0.09514930
#>  [9,] -0.40792735  0.05239169  0.50783968 -0.13150458
#> [10,] -0.31366505 -0.09514930 -0.13150458  0.46275771