gge: Genotype plus genotype-by-environment model

Description Usage Arguments Value Author(s) References Examples

View source: R/gge.R

Description

[Stable]

Produces genotype plus genotype-by-environment model based on a multi-environment trial dataset containing at least the columns for genotypes, environments and one response variable or a two-way table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gge(
  .data,
  env,
  gen,
  resp,
  centering = "environment",
  scaling = "none",
  svp = "environment",
  by = NULL,
  ...
)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes and the response variable(s).

env

The name of the column that contains the levels of the environments.

gen

The name of the column that contains the levels of the genotypes.

resp

The response variable(s). To analyze multiple variables in a single procedure a vector of variables may be used. For example resp = c(var1, var2, var3). Select helpers are also supported.

centering

The centering method. Must be one of the 'none | 0', for no centering; 'global | 1', for global centered (E+G+GE); 'environment | 2' (default), for environment-centered (G+GE); or 'double | 3', for double centered (GE). A biplot cannot be produced with models produced without centering.

scaling

The scaling method. Must be one of the 'none | 0' (default), for no scaling; or 'sd | 1', where each value is divided by the standard deviation of its corresponding environment (column). This will put all environments roughly he same rang of values.

svp

The method for singular value partitioning. Must be one of the 'genotype | 1', (The singular value is entirely partitioned into the genotype eigenvectors, also called row metric preserving); 'environment | 2', default, (The singular value is entirely partitioned into the environment eigenvectors, also called column metric preserving); or 'symmetrical | 3' (The singular value is symmetrically partitioned into the genotype and the environment eigenvectors This SVP is most often used in AMMI analysis and other biplot analysis, but it is not ideal for visualizing either the relationship among genotypes or that among the environments).

by

One variable (factor) to compute the function by. It is a shortcut to dplyr::group_by().This is especially useful, for example, when the researcher want to produce GGE biplots for each level of a categorical variable. In this case, an object of class gge_grouped is returned.

...

Arguments passed to the function impute_missing_val() for imputation of missing values in case of unbalanced data.

Value

The function returns a list of class gge containing the following objects

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

References

Yan, W., and M.S. Kang. 2003. GGE biplot analysis: a graphical tool for breeders, geneticists, and agronomists. CRC Press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(metan)
mod <- gge(data_ge, ENV, GEN, GY)
plot(mod)

# GGE model for all numeric variables
mod2 <- gge(data_ge2, ENV, GEN, resp = everything())
plot(mod2, var = "ED")

# If we have a two-way table with the mean values for
# genotypes and environments

table <- make_mat(data_ge, GEN, ENV, GY) %>% round(2)
table
make_long(table) %>%
gge(ENV, GEN, Y) %>%
plot()

metan documentation built on Nov. 10, 2021, 9:11 a.m.