Skip to contents

Solves Henderson's MME with VanRaden G.

Usage

morie_gblup_full(x, y, markers, lambda_gblup = NULL)

Arguments

x

Fixed-effect design (vector or matrix).

y

Numeric response.

markers

Genotype matrix (n x m).

lambda_gblup

Optional ratio sigma_e^2 / sigma_g^2 (default h^2=0.5).

Value

Named list (estimate, g_hat, beta, se, lambda_gblup, n, method).

References

Montesinos Lopez Ch 3.

Examples

# Seeded, and with more markers than individuals: VanRaden G is
# centred, so it is rank deficient by one dimension whatever the
# data, and 4 markers at n = 50 left solve() close enough to
# singular that an unlucky draw failed on some BLAS builds.
set.seed(1)
n <- 50
markers <- matrix(sample(0:2, n * 500, TRUE), n, 500)
morie_gblup_full(x = rnorm(n), y = rnorm(n), markers = markers)$beta
#> [1]  0.1069635 -0.1358484