BMTME (version 1.0.4)

BMORS: Bayesian Multi-Output Regression Stacking (BMORS)

Description

Bayesian Multi-Output Regression Stacking (BMORS)

Usage

BMORS(Y = NULL, ETA = NULL, covModel = "BRR",
  predictor_Sec_complete = FALSE, nIter = 2500, burnIn = 500,
  thin = 5, progressBar = TRUE, testingSet = NULL,
  parallelCores = 1, digits = 4)

Arguments

Y

(matrix) Phenotypic response where each column is a different trait

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

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.

testingSet

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

parallelCores

(integer) Number of cores to use.

digits

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

Examples

Run this code
# NOT RUN {
data("WheatToy")
phenoWheatToy <- phenoWheatToy[order(phenoWheatToy$Env, phenoWheatToy$Gid),]

#Matrix Design
LG <- cholesky(genoWheatToy)
ZG <- model.matrix(~0 + as.factor(phenoWheatToy$Gid))
Z.G <- ZG %*% LG

#Linear Predictor
ETA <- list(Gen = list(X = Z.G, model = 'BRR'))

pheno <- phenoWheatToy[, c(1:3)] #Use only the first trait to do a cv
colnames(pheno) <- c('Line', 'Env', 'Response')
CrossValidation <- CV.RandomPart(pheno, NPartitions = 10, PTesting = 0.2, set_seed = 123)

#Pheno
Y <- as.matrix(phenoWheatToy[, c(3,4)])
#Check predictive capacities of the model
pm <- BMORS(Y, ETA = ETA, nIter = 10000, burnIn = 5000, thin = 2,
            testingSet = CrossValidation,  digits = 4)
# }

Run the code above in your browser using DataLab