BMORS_Env: Bayesian Multi-Output regression stacking for specific...

Description Usage Arguments Examples

View source: R/BMORSEnv.R

Description

Bayesian Multi-Output regression stacking for specific environment estimations

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

BMTME documentation built on Aug. 27, 2020, 1:08 a.m.

Related to BMORS_Env in BMTME...