kernel_model: Kernel Models for Predicting Phenotypes across...

View source: R/met_kernel_model.R

kernel_modelR Documentation

Kernel Models for Predicting Phenotypes across Multi-Environment Conditions

Description

Runs Bayesian Linear-Mixed Models for Multiple Environments using kernels from get_kernel function

Usage

kernel_model(
  y,
  data = NULL,
  random = NULL,
  fixed = NULL,
  env,
  gid,
  verbose = FALSE,
  iterations = 1000,
  burnin = 200,
  thining = 10,
  tol = 1e-20,
  R2 = 0.5,
  digits = 4
)

Arguments

y

numeric. denotes the name of the column respectively to phenotype values

data

data.frame. Should contain the following colunms: environemnt, genotype, phenotype.

random

list A two-level list Specify the regression kernels (co-variance matrix). The former is the Kernel, where is included the regression kernels. The later is the Type, specifying if the matrix is either D Dense or BD Block Diagonal. A number of regression kernels or random effects to be fitted are specified in this list.

fixed

matrix Design matrix (n \times p) for fixed effects (NULL by default)

env

character. denotes the name of the column respectively to environments

gid

character. denotes the name of the column respectively to the genotype identification (names)

verbose

Should iteration history be printed on console? If TRUE or 1 then it is printed, otherwise, if another number $n$ is choosen the history is printed every $n$ times. The default is FALSE

iterations

numeric Number of iterations (1000 by default)

burnin

numeric, number of iterations to be discarded as burn-in (200 by default).

thining

numeric, number of thining used in Markov Chains (10 by default)

tol

a numeric tolerance level. Eigenvalues lower than tol are discarded. Default is 1e-10.

R2

the proportion of variance expected to be explained by the regression.

digits

numeric. Digits for round variance components.

Details

TODO

Value

A list contaning predicted phenotypes (yHat), posterior means of residual (VarE) and genetic/enviromic variance component for each term in the linear model with the respective confidence intervals (VarComp). Also the values along with the chains are released (BGGE).

Author(s)

Germano Costa Neto (Adapted from Granato et al. 2018, BGGE package)


allogamous/EnvRtype documentation built on Nov. 1, 2024, 3:48 a.m.