Description Usage Arguments References Examples
The Bayesian Multi-Trait Multi-Environment models (BMTME) package was developed to implement...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Y |
|
X |
|
Z1 |
|
Z2 |
|
nIter |
|
burnIn |
|
thin |
|
bs |
|
parallelCores |
|
digits |
|
progressBar |
|
testingSet |
|
Montesinos-Lopez, O.A., Montesinos-Lopez, A., Crossa, J., Toledo, F.H., Perez-Hernandez, O., Eskridge, K.M., … Rutkoski, J. (2016). A Genomic Bayesian Multi-trait and Multi-environment Model. G3: Genes|Genomes|Genetics, 6(9), 2725–2744. https://doi.org/10.1534/g3.116.032359.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | data("WheatIranianToy")
# Matrix Design
LG <- cholesky(genoIranianToy)
ZG <- model.matrix(~0 + as.factor(phenoIranianToy$GID))
Z.G <- ZG %*% LG
Z.E <- model.matrix(~0 + as.factor(phenoIranianToy$Env))
ZEG <- model.matrix(~0 + as.factor(phenoIranianToy$GID):as.factor(phenoIranianToy$Env))
G2 <- kronecker(diag(length(unique(phenoIranianToy$Env))), data.matrix(genoIranianToy))
LG2 <- cholesky(G2)
Z.EG <- ZEG %*% LG2
#Pheno
Y <- as.matrix(phenoIranianToy[, -c(1, 2)])
#Check fitting
fm <- BMTME(Y = Y, X = Z.E, Z1 = Z.G, Z2 = Z.EG,
nIter = 10000, burnIn = 5000, thin = 2, bs = 50)
fm
# Check predictive capacities of the model
pheno <- data.frame(GID = phenoIranianToy[, 1],
Env = phenoIranianToy[, 2],
Response = phenoIranianToy[, 3])
CrossV <- CV.RandomPart(pheno, NPartitions = 4, PTesting = 0.2, set_seed = 123)
pm <- BMTME(Y = Y, X = Z.E, Z1 = Z.G, Z2 = Z.EG,
nIter = 10000, burnIn = 5000, thin = 2,
bs = 50, testingSet = CrossV)
pm
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.