BMTME (version 1.0.4)

BMORS_Env: Bayesian Multi-Output regression stacking for specific environment estimations

Description

Bayesian Multi-Output regression stacking for specific environment estimations

Usage

BMORS_Env(data = NULL, testingEnv = "", ETA = NULL,
  covModel = "BRR", predictor_Sec_complete = FALSE, nIter = 2500,
  burnIn = 500, thin = 5, progressBar = TRUE, digits = 4)

Arguments

data

(data.frame) Phenotypic response where each column is a different trait and the first column are the name of the environment where it was evaluated.

testingEnv

(string) Name of the Environment to test.

ETA

(matrix) This is a two-level list used to specify the regression function (or linear predictor).

covModel

(string) Name of the covariates model to implement (BRR, BayesA, BayesB, BayesC).

predictor_Sec_complete

(Logical) FALSE by default.

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.

progressBar

(Logical) Show the progress bar.

digits

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

Examples

Run this code
# NOT RUN {
data('MaizeToy')
phenoMaizeToy <- phenoMaizeToy[order(phenoMaizeToy$Env, phenoMaizeToy$Line),]

#Matrix design
LG <- cholesky(genoMaizeToy)
ZG <- model.matrix(~0 + as.factor(phenoMaizeToy$Line))
Z.G <- ZG %*% LG
#Linear Predictor
ETA <- list(Gen = list(X = Z.G, model = 'BRR'))

dataset <- phenoMaizeToy[, 2:5] #Must Include in the first column the environments
#Check predictive capacities of the model
pm <- BMORS_Env(dataset, testingEnv = 'EBU', ETA = ETA, covModel = 'BRR', nIter = 10000,
                burnIn = 5000, thin = 2, progressBar = FALSE, digits = 3)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace