BMTME (version 1.0.4)

BME: Bayesian Multi-Environment Model (BME)

Description

Bayesian Multi-Environment Model (BME)

Usage

BME(Y, Z1, nIter = 1000L, burnIn = 300L, thin = 2L,
  bs = ceiling(dim(Z1)[2]/6), parallelCores = 1, digits = 4,
  progressBar = TRUE, testingSet = NULL)

Arguments

Y

(matrix) Phenotypic response where each column is a different environment.

Z1

(matrix) Matrix design for the genetic effects.

nIter

(integer) Number of iterations to fit the model.

burnIn

(integer) Number of items to burn at the beginning of the model.

thin

(integer) Number of items to thin the model.

bs

(integer) Number of groups.

parallelCores

(integer) Number of cores to use.

digits

(integer) Number of digits of accuracy in the results.

progressBar

(Logical) Show the progress bar.

testingSet

(object or vector) Crossvalidation object or vector with the positions to use like testing in a cross-validation test.

Value

If the testingSet is NULL, the function returns the predictions.

Else, if the testingSet is not NULL, the function returns the correlation of the predictions of the cross-validation test.

References

Montesinos-Lopez, O.A., Montesinos-Lopez, A., Crossa, J., Toledo, F.H., Perez-Hernandez, O., Eskridge, K.M., <U+2026> Rutkoski, J. (2016). A Genomic Bayesian Multi-trait and Multi-environment Model. G3: Genes|Genomes|Genetics, 6(9), 2725<U+2013>2744. https://doi.org/10.1534/g3.116.032359.

Examples

Run this code
# NOT RUN {
  data("WheatMadaToy")
  phenoMada <- (phenoMada[order(phenoMada$GID),])

  #Matrix design
  LG <- cholesky(genoMada)
  ZG <- model.matrix(~0 + as.factor(phenoMada$GID))
  Z.G <- ZG %*% LG

  #Pheno data
  Y <- as.matrix(phenoMada[, -c(1)])
  # Check fitting
  fm <- BME(Y = Y, Z1 = Z.G, nIter = 10000, burnIn = 5000, thin = 2, bs = 50)

  # Check predictive capacities of the model with CrossValidation object
  pheno <- data.frame(GID = phenoMada[, 1], Env = '', Response = phenoMada[, 3])
  CrossV <- CV.RandomPart(pheno, NPartitions = 4, PTesting = 0.2, set_seed = 123)

  pm <- BME(Y = Y, Z1 = Z.G, nIter = 10000, burnIn = 5000, thin = 2, bs = 50, testingSet = CrossV)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab