round_cols()


# BLUP model

The implementation of linear-mixed effect models to predict the response variable in MET is made with the function gamem_met(). By default, genotype and genotype-vs-environment interaction are assumed to have random effects. Use the argument random to change this default. In the following example the model is fitted to all numeric variables in data_ge.

model2 <- gamem_met(data_ge, ENV, GEN, REP, everything())


## Residual plots

Several residual plots may be obtained using the S3 generic function plot()..

plot(model2, which = c(1, 2, 7), ncol = 1)


## Distribution of random effects

The distribution of the random effects may be obtained using the argument type = "re".

plot(model2, type = "re", nrow = 3)


## Genetic parameters and variance components

We can get easily the model results such as the Likelihood Ration Test for random effects, the variance components, and the BLUPs for genotypes with get_model_data(). By default, the function returns the genetic parameters.

get_model_data(model2) %>% round_cols(digits = 3)


## Plotting the BLUPs for genotypes

library(ggplot2)
d <- plot_blup(model2)
e <- plot_blup(model2,
prob = 0.1,
col.shape  =  c("gray20", "gray80")) +
coord_flip()
arrange_ggplot(d, e, tag_levels = list(c("d", "e")), ncol = 1)


## BLUPS for genotype-vs-environment interaction

get_model_data(model2, what = "blupge") %>%
round_cols()


## BLUP-based stability index

The WAASB index [@Olivoto2019] is a quantitative stability measure based on the weighted average of the absolute scores from the singular value decomposition of the BLUPs for genotype-vs-interaction effects. We can obtain this statistic with the function waasb() combined with get_model_data() using what = "WAASB".

model3 <- waasb(data_ge, ENV, GEN, REP, everything(), verbose = FALSE)
get_model_data(model3, what = "WAASB") %>%
round_cols()


The function blup_indexes() can be used to compute the harmonic mean of genotypic values (HMGV), the relative performance of the genotypic values (RPGV) and the harmonic mean of the relative performance of genotypic values (HMRPGV). See @Alves2018 for more details. We use the function get_model_data() to get the HMRPGV (default) for all analyzed variables.

index <- blup_indexes(model3)
get_model_data(index) %>% round_cols()


# GGE model

## Fitting the model

The GGE model is fitted with the function gge(). This function produces a GGE model based on both a two-way table (in our case the object table) with genotypes in the rows and environments in columns, or a data.frame containing at least the columns for genotypes, environments and the response variable(s).

gge_model <- gge(data_ge, ENV, GEN, GY)


## Visualizing the Biplot

The generic function plot() is used to generate a biplot using as input a fitted model of class gge. The type of biplot is chosen by the argument type in the function. Ten biplots type are available according to {@Yan2003}.

• type = 1 A basic biplot.
• type = 2 Mean performance vs. stability.
• type = 3 Which-won-where.
• type = 4 Discriminativeness vs. representativeness.
• type = 5 Examine an environment.
• type = 6 Ranking environments.
• type = 7 Examine a genotype.
• type = 8 Ranking gentoypes.
• type = 9 Compare two genotypes.
• type = 10 Relationship among environments.
f <- plot(gge_model)
g <- plot(gge_model, type = 2)
arrange_ggplot(e, f, tag_levels = list(c("e", "f")), ncol = 1)


# Wrapper function ge_stats()

To compute all the stability statistics at once, we can use the function ge_stats(). Again we get the results with get_model_data().

stat_ge <- ge_stats(data_ge, ENV, GEN, REP, GY)
get_model_data(stat_ge) %>%
round_cols()


# Selection based on multiple traits

The multi-trait stability index (MTSI) was proposed by @Olivoto2019a and is used for simultaneous selection considering mean performance and stability (of several traits) in the analysis of METs using both fixed and mixed-effect models. For more details see the complete vignette.

# Getting help

• If you encounter a clear bug, please file a minimal reproducible example on github

# References

## Try the metan package in your browser

Any scripts or data that you put into this service are public.

metan documentation built on July 16, 2021, 1:06 a.m.