WGR3 (MV) {bWGR}R Documentation

Multivariate Regression

Description

Multivariate model to find breeding values.

Usage

  mkr(Y,K,...)
  mrr(Y,X,...)
  mrr_float(Y,X,...)

Arguments

Y

Numeric matrix of observations x trait. NA is allowed.

K

Numeric matrix containing the relationship matrix.

X

Numeric matrix containing the genotyping matrix.

...

Arguments to pass to MRR3/MRR3F. See args(MRR3).

Details

Algorithm is described in Xavier and Habier (2022). The model for the ridge regression (mrr) is as follows:

Y = Mu + XB + E

where Y is a matrix of response variables, Mu represents the intercepts, X is the matrix of genotypic information, B is the matrix of marker effects, and E is the residual matrix.

The model for the kernel regression (mkr) is as follows:

Y = Mu + UB + E

where Y is a matrix of response variables, Mu represents the intercepts, U is the matrix of Eigenvector of K, b is a vector of regression coefficients and E is the residual matrix.

Algorithm: Residuals are assumed to be independent among traits. Regression coefficients are solved via a multivaraite adaptation of Gauss-Seidel Residual Update. Since version 2.0, the solver of mrr is based on the Randomized Gauss-Seidel algorithm. Variance and covariance components are solved with an EM-REML like approach proposed by Schaeffer called Pseudo-Expectation.

Other related implementations:

01) mkr2X(Y,K1,K2): Solves multi-trait kernel regressions with two random effects.

02) mrr2X(Y,X1,X2): Solves multi-trait ridge regressions with two random effects.

03) MRR3(Y,X,...): Extension of mrr with additional parameters.

04) MRR3F(Y,X,...): MRR3 running on float.

05) mrr_svd(Y,W): Solves mrr through the principal components of parameters.

06) MLM(Y,X,Z,maxit=500,logtol=-8,cores=1): Multivariate model with fixed effects.

07) SEM(Y,Z,...): Fits a XFA structural equation model (i.e., MegaSEM).

08) MEGA(Y,X,npc=-1): Toy implementation of MegaLMM.

09) GSEM(Y,X,npc=-1): Toy C++ implementaiton of MegaSEM.

10) XSEMF(Y,X,npc=0): PC-based SEM - h2 fixed at 0.5.

11) ZSEMF(Y,X): PC-based SEM - h2 is estimated.

In GSEM and MEGA, 'npc' means number of latent spaces if input is above zero, otherwise, 0 means all and -1 means 2*sqrt(ncol(Y)).

Value

Returns a list with the random effect covariances (Vb), residual variances (Ve), genetic correlations (GC), matrix with marker effects (b) or eigenvector effects (if mkr), intercepts (mu), heritabilities (h2), and a matrix with fitted values (hat).

NOTE: Numeric stability is a serious concern with multivariate models with large number of response variables, as the covariance matrix is often not invesible. If output is filled with NAs, try using MRR3 and play with some parameters. For example, one may try adding priors to stabilize variances, e.g., fit=MRR3(Y,X,df0=20).

Author(s)

Alencar Xavier, David Habier

References

Xavier, A and Habier, D. (2022). A new approach fits multivariate genomic prediction models efficiently. GSE, DOI: 10.1186/s12711-022-00730-w

Examples

    
    # Load genomic data
    
    data(tpod)
    X = CNT(gen)
    
    # Simulate phenotyp
    
    sim = SimY(X)
    Y = sim$Y
    TBV = sim$tbv
    
    # Fit regression model
    
    test = mrr(Y,X)
    
    # Genetic correlation
    
    test$GC
    
    # Heritabilies
    
    test$h2
    
    # Accuracy
    
    diag(cor(TBV,test$hat))
    
    # try: demo(multivariates)


[Package bWGR version 2.2.9 Index]