gvsr | R Documentation |
gvsr
function to build general variance-covariance structures for combination of random effects to be fitted in the mmer
solver.
gvsr(..., Gu=NULL, Guc=NULL, Gti=NULL, Gtc=NULL, form=NULL)
... |
names of the random effects (variables in the dataset) to be used to create a general variance structure. For example, for 2 random effects (variables); mom and progeny, a model specified as:
will create a variance structure of the form:
where not only variance components for each random effect will be estimated but also the covariance component between the 2 random effects is estimated. The user can also provide a numeric vector or matrix to be considered the design matrix for the ith random effect. More than two random effects can be provided. |
Gu |
list of matrices with the known variance-covariance values for the levels of the different random effects provided in the "..." argument (i.e. relationship matrix among individuals or any other known covariance matrix). If NULL, then an identity matrix is assumed. For example, a model with 2 random effects with covariance structure should be provided as:
where |
Guc |
matrix with the constraints for the u random effects. This is used to specify which variance and covariance parameters between the 1 to 1 combinations of random effects should be estimated. For example, for 2 random effects the expected variance-covariance matrix expected to be estimated (when the default Guc=NULL) is and unstructured model:
but the user can constrain which parameters should be estimated. Providing:
|
Gti |
matrix with dimensions t x t (t equal to number of traits) with initial values of the variance-covariance components for the random effect specified in the .... argument. If the value is NULL the program will provide the initial values. |
Gtc |
matrix with dimensions t x t (t equal to number of traits) of constraints for the variance-covariance components for the random effect specified in the ... argument according to the following rules:
In the multi-response scenario if the user doesn't specify this argument the default is to build an unstructured matrix (using the |
form |
an additional structure to specify a kronecker product on top of the general covariance structure defined in the ... argument. |
a list with all neccesary elements (incidence matrices, known var-cov structures, unknown covariance structures to be estimated and constraints) to be used in the mmer solver.
Giovanny Covarrubias-Pazaran
Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744
Covarrubias-Pazaran G (2018) Software update: Moving the R package sommer to multivariate mixed models for genome-assisted prediction. doi: https://doi.org/10.1101/354639
The core function of the package: mmer
data(DT_ige)
DT <- DT_ige
Af <- A_ige
An <- A_ige
### Direct genetic effects model
# modDGE <- mmer(trait ~ block,
# random = ~ focal,
# rcov = ~ units,
# data = DT)
# summary(modDGE)$varcomp
#
### Indirect genetic effects model without covariance between DGE and IGE
# modDGE <- mmer(trait ~ block,
# random = ~focal + neighbour,
# rcov = ~ units,
# data = DT)
# summary(modDGE)$varcomp
#
### Indirect genetic effects model with covariance between DGE and IGE
# modIGE <- mmer(trait ~ block,
# random = ~ gvsr(focal, neighbour),
# rcov = ~ units, iters=4,
# data = DT)
# summary(modIGE)$varcomp
#
### Indirect genetic effects model with covariance between DGE and IGE using relatioship matrices
# modIGEb <- mmer(trait ~ block,
# random = ~ gvsr(focal, neighbour, Gu=list(Af,An)),
# rcov = ~ units,
# data = DT)
# summary(modIGEb)$varcomp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.