Skip to contents

Formula: Ktilde = (K^-1/sigma2_u + I/sigma2_e)^-1; utilde = Ktilde (y - 1 mu)/sigma2_e

Usage

Rkhsbayes(y, K, sigma2_u = 1, sigma2_e = 1, mu = NULL)

Arguments

y

Response vector of length n.

K

Kernel matrix.

sigma2_u

Variance component of the kernel effects.

sigma2_e

Residual variance component.

mu

Intercept; None uses the mean of y.

Value

List with u, K_tilde, mu, n.

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 8, Eq. (8.8) p. 281 and its full conditionals on p. 282: y = 1 mu + u + e with u ~ N(0, sigma2_u K), which is kernel ridge regression with lambda = sigma2_e/sigma2_u. Only the CLOSED-FORM conditional mean is computed here, not the Gibbs sampler: a sampler would make the two language arms depend on matching random number streams, and the conditional mean is the quantity the equation defines.

Examples

Rkhsbayes(y = 5L, K = 5L)
#> $u
#> [1] 0
#> 
#> $K_tilde
#>           [,1]
#> [1,] 0.8333333
#> 
#> $mu
#> [1] 5
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "Bayesian kernel BLUP conditional mean, MVSML Eq. (8.8)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"