waas: Weighted Average of Absolute Scores

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/waas.R

Description

[Stable]

Compute the Weighted Average of Absolute Scores for AMMI analysis (Olivoto et al., 2019).

This function compute the weighted average of absolute scores, estimated as follows: \loadmathjax \mjsdeqnWAAS_i = \sum_k = 1^p |IPCA_ik \times EP_k|/ \sum_k = 1^pEP_k

where \mjseqnWAAS_i is the weighted average of absolute scores of the ith genotype; \mjseqnIPCA_ik is the score of the ith genotype in the kth IPCA; and \mjseqnEP_k is the explained variance of the kth IPCA for k = 1,2,..,p, considering p the number of significant PCAs, or a declared number of PCAs. For example if prob = 0.05, all axis that are significant considering this probability level are used. The number of axis can be also informed by declaring naxis = x. This will override the number of significant axes according to the argument codeprob.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
waas(
  .data,
  env,
  gen,
  rep,
  resp,
  block = NULL,
  mresp = NULL,
  wresp = NULL,
  prob = 0.05,
  naxis = NULL,
  ind_anova = FALSE,
  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.

rep

The name of the column that contains the levels of the replications/blocks.

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).

block

Defaults to NULL. In this case, a randomized complete block design is considered. If block is informed, then a resolvable alpha-lattice design (Patterson and Williams, 1976) is employed. All effects, except the error, are assumed to be fixed.

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. By default, all variables in resp have equal weights for mean performance and stability (i.e., wresp = 50). It must be a numeric vector of the same length of resp to assign different weights across variables, e.g., if for the first variable equal weights for mean performance and stability are assumed and for the second one, a higher weight for mean performance (e.g. 65) is assumed, then wresp = c(50, 65) must be used. Numeric value of length 1 will be recycled with a warning message.

prob

The p-value for considering an interaction principal component axis significant.

naxis

The number of IPCAs to be used for computing the WAAS index. Default is NULL (Significant IPCAs are used). If values are informed, the number of IPCAS will be used independently on its significance. Note that if two or more variables are included in resp, then naxis must be a vector.

ind_anova

Logical argument set to FALSE. If TRUE an within-environment ANOVA is performed.

verbose

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

Value

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

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

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

See Also

waas_means() waasb() get_model_data()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
library(metan)
#===============================================================#
# Example 1: Analyzing all numeric variables considering p-value#
# <= 0.05 to compute the WAAS.                                  #
#===============================================================#
model <- waas(data_ge,
             env = ENV,
             gen = GEN,
             rep = REP,
             resp = everything())
# Residual plot (first variable)
plot(model)

# Get the WAAS index
get_model_data(model, "WAAS")

# Plot WAAS and response variable
plot_scores(model, type = 3)


#===============================================================#
# Example 2: Declaring the number of axis to be used for        #
# computing WAAS and assigning a larger weight for the response #
# variable when computing the WAASBY index.                     #
#===============================================================#

model2 <- waas(data_ge,
               env = ENV,
               gen = GEN,
               rep = REP,
               resp = everything(),
               naxis = 1, # Only to compare with PC1
               wresp = 60)
# Get the WAAS index (it will be |PC1|)
get_model_data(model2)

# Get values for IPCA1
get_model_data(model2, "PC1")


#===============================================================#
# Example 3: Analyzing GY and HM assuming a random-effect model.#
# Smaller values for HM and higher values for GY are better.    #
# To estimate WAASBY, higher weight for the GY (60%) and lower  #
# weight for HM (40%) are considered for mean performance.      #
#===============================================================#

model3 <- waas(data_ge,
               env = ENV,
               gen = GEN,
               rep = REP,
               resp = c(GY, HM),
               mresp = c("h, l"),
               wresp = c(60, 40))


# Get the ranks for the WAASY index
get_model_data(model3, what = "OrWAASY")

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