Compute the Weighted Average of Absolute Scores (Olivoto et al., 2019) based on means for genotype-environment data as follows: $WAAS_i = \sum_{k = 1}^{p} |IPCA_{ik} \times EP_k|/ \sum_{k = 1}^{p}EP_k$

where $$WAAS_i$$ is the weighted average of absolute scores of the ith genotype; $$PCA_{ik}$$ is the score of the ith genotype in the kth IPCA; and $$EP_k$$ is the explained variance of the kth IPCA for k = 1,2,..,p, where p is the number of IPCAs that explain at least an amount of the genotype-interaction variance declared in the argument min_expl_var.

Usage

waas_means(
.data,
env,
gen,
resp,
mresp = NULL,
wresp = NULL,
min_expl_var = 85,
verbose = TRUE,
...
)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes, replication/block and 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 allowed.

mresp

The new maximum value after rescaling the response variable. By default, all variables in resp are rescaled so that de maximum value is 100 and the minimum value is 0 (i.e., mresp = NULL). It must be a character vector of the same length of resp if rescaling is assumed to be different across variables, e.g., if for the first variable smaller values are better and for the second one, higher values are better, then mresp = c("l, h") must be used. Character value of length 1 will be recycled with a warning message.

wresp

The weight for the response variable(s) for computing the WAASBY index. Must be a numeric vector of the same length of resp. Defaults to 50, i.e., equal weights for stability and mean performance.

min_expl_var

The minimum explained variance. Defaults to 85. Interaction Principal Compoment Axis are iteractively retained up to the explained variance (eigenvalues in the singular value decomposition of the matrix with the interaction effects) be greather than or equal to min_expl_var. For example, if the explained variance (in percentage) in seven possible IPCAs are 56, 21, 9, 6, 4, 3, 1, resulting in a cumulative proportion of 56, 77, 86, 92, 96, 99, 100, then p = 3, i.e., three IPCAs will be used to compute the index WAAS.

verbose

Logical argument. If verbose = FALSE the code is run silently.

...

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

Value

An object of class waas_means with the following items for each variable:

• model A data frame with the response variable, the scores of all Principal Components, the estimates of Weighted Average of Absolute Scores, and WAASY (the index that consider the weights for stability and productivity in the genotype ranking.

• ge_means A tbl_df containing the genotype-environment means.

• ge_eff A gxe matrix containing the genotype-environment effects.

• eigenvalues The eigenvalues from the singular value decomposition of the matrix withe the genotype-environment interaction effects.

• proportion The proportion of the variance explained by each IPCA.

• cum_proportion The cumulative proportion of the variance explained.

References

Olivoto, T., A.D.C. L\'ucio, J.A.G. da silva, V.S. Marchioro, V.Q. de Souza, and E. Jost. 2019a. Mean performance and stability in multi-environment trials I: Combining features of AMMI and BLUP techniques. Agron. J. 111:2949-2960. doi:10.2134/agronj2019.03.0220

waas() waasb()

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
# Data with replicates
model <- waas(data_ge,
env = ENV,
gen = GEN,
rep = REP,
resp = everything())
#> variable GY
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>     Source  Df  Sum Sq Mean Sq F value   Pr(>F) Proportion Accumulated
#>        ENV  13 279.574 21.5057   62.33 0.00e+00         NA          NA
#>   REP(ENV)  28   9.662  0.3451    3.57 3.59e-08         NA          NA
#>        GEN   9  12.995  1.4439   14.93 2.19e-19         NA          NA
#>    GEN:ENV 117  31.220  0.2668    2.76 1.01e-11         NA          NA
#>        PC1  21  10.749  0.5119    5.29 0.00e+00       34.4        34.4
#>        PC2  19   9.924  0.5223    5.40 0.00e+00       31.8        66.2
#>        PC3  17   4.039  0.2376    2.46 1.40e-03       12.9        79.2
#>        PC4  15   3.074  0.2049    2.12 9.60e-03        9.8        89.0
#>        PC5  13   1.446  0.1113    1.15 3.18e-01        4.6        93.6
#>        PC6  11   0.932  0.0848    0.88 5.61e-01        3.0        96.6
#>        PC7   9   0.567  0.0630    0.65 7.53e-01        1.8        98.4
#>        PC8   7   0.362  0.0518    0.54 8.04e-01        1.2        99.6
#>        PC9   5   0.126  0.0252    0.26 9.34e-01        0.4       100.0
#>  Residuals 252  24.367  0.0967      NA       NA         NA          NA
#>      Total 536 389.036  0.7258      NA       NA         NA          NA
#> ---------------------------------------------------------------------------
#>
#> variable HM
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>     Source  Df  Sum Sq Mean Sq F value   Pr(>F) Proportion Accumulated
#>        ENV  13 5710.32 439.255   57.22 1.11e-16         NA          NA
#>   REP(ENV)  28  214.93   7.676    2.70 2.20e-05         NA          NA
#>        GEN   9  269.81  29.979   10.56 7.41e-14         NA          NA
#>    GEN:ENV 117 1100.73   9.408    3.31 1.06e-15         NA          NA
#>        PC1  21  381.13  18.149    6.39 0.00e+00       34.6        34.6
#>        PC2  19  319.43  16.812    5.92 0.00e+00       29.0        63.6
#>        PC3  17  114.26   6.721    2.37 2.10e-03       10.4        74.0
#>        PC4  15   81.96   5.464    1.92 2.18e-02        7.4        81.5
#>        PC5  13   68.11   5.240    1.84 3.77e-02        6.2        87.7
#>        PC6  11   59.07   5.370    1.89 4.10e-02        5.4        93.0
#>        PC7   9   46.69   5.188    1.83 6.33e-02        4.2        97.3
#>        PC8   7   26.65   3.808    1.34 2.32e-01        2.4        99.7
#>        PC9   5    3.41   0.682    0.24 9.45e-01        0.3       100.0
#>  Residuals 252  715.69   2.840      NA       NA         NA          NA
#>      Total 536 9112.21  17.000      NA       NA         NA          NA
#> ---------------------------------------------------------------------------
#>
#> All variables with significant (p < 0.05) genotype-vs-environment interaction
#> Done!

# Based on means of genotype-environment data
data_means <- means_by(data_ge, ENV, GEN)
model2 <- waas_means(data_ge,
env = ENV,
gen = GEN,
resp = everything())
#> Evaluating trait GY |======================                      | 50% 00:00:00
Evaluating trait HM |============================================| 100% 00:00:00

# The index WAAS
get_model_data(model, what = "OrWAAS")
#> Class of the model: waas
#> Variable extracted: OrWAAS
#> # A tibble: 10 × 3
#>    GEN      GY    HM
#>    <chr> <dbl> <dbl>
#>  1 G1        2     2
#>  2 G10      10    10
#>  3 G2        5     8
#>  4 G3        1     1
#>  5 G4        6     6
#>  6 G5        4     9
#>  7 G6        3     3
#>  8 G7        8     7
#>  9 G8        7     4
#> 10 G9        9     5
get_model_data(model2, what = "OrWAAS")
#> Class of the model: waas_means
#> Variable extracted: OrWAAS
#> # A tibble: 10 × 3
#>    GEN      GY    HM
#>    <chr> <dbl> <dbl>
#>  1 G1        2     3
#>  2 G10      10    10
#>  3 G2        5     8
#>  4 G3        1     1
#>  5 G4        6     6
#>  6 G5        4     9
#>  7 G6        3     2
#>  8 G7        8     7
#>  9 G8        7     4
#> 10 G9        9     5

# }