gge {metan} | R Documentation |
Genotype plus genotype-by-environment model
Description
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
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 |
centering |
The centering method. Must be one of the |
scaling |
The scaling method. Must be one of the |
svp |
The method for singular value partitioning. Must be one of the |
by |
One variable (factor) to compute the function by. It is a shortcut
to |
... |
Arguments passed to the function
|
Value
The function returns a list of class gge
containing the following objects
-
coordgen The coordinates for genotypes for all components.
-
coordenv The coordinates for environments for all components.
-
eigenvalues The vector of eigenvalues.
-
totalvar The overall variance.
-
labelgen The name of the genotypes.
-
labelenv The names of the environments.
-
labelaxes The axes labels.
-
ge_mat The data used to produce the model (scaled and centered).
-
centering The centering method.
-
scaling The scaling method.
-
svp The singular value partitioning method.
-
d The factor used to generate in which the ranges of genotypes and environments are comparable when singular value partitioning is set to 'genotype' or 'environment'.
-
grand_mean The grand mean of the trial.
-
mean_gen A vector with the means of the genotypes.
-
mean_env A vector with the means of the environments.
-
scale_var The scaling vector when the scaling method is
'sd'
.
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
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()