[Experimental]

get_model_data(x, what = NULL, type = "GEN", verbose = TRUE)

gmd(x, what = NULL, type = "GEN", verbose = TRUE)

sel_gen(x)

Arguments

x

An object created with the functions ammi_indexes(), anova_ind(), anova_joint(), can_corr() ecovalence(), Fox(), gai(), gamem(),gafem(), ge_acv(), ge_means(), ge_reg(), gytb(), mgidi(), performs_ammi(), blup_indexes(), Shukla(), superiority(), waas() or waasb().

what

What should be captured from the model. See more in section Details.

type

Chose if the statistics must be show by genotype (type = "GEN", default) or environment (TYPE = "ENV"), when possible.

verbose

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

Value

A tibble showing the values of the variable chosen in argument what.

Details

  • get_model_data() Easily get data from some objects generated in the metan package such as the WAASB and WAASBY indexes (Olivoto et al., 2019a, 2019b) BLUPs, variance components, details of AMMI models and AMMI-based stability statistics.

  • gmd() Is a shortcut to get_model_data.

  • sel_gen() Extracts the selected genotypes by a given index.

Bellow are listed the options allowed in the argument what depending on the class of the object

Objects of class ammi_indexes:

  • "ASV" AMMI stability value.

  • "EV" Averages of the squared eigenvector values.

  • "SIPC" Sums of the absolute value of the IPCA scores.

  • "WAAS" Weighted average of absolute scores (default).

  • "ZA" Absolute value of the relative contribution of IPCAs to the interaction.

Objects of class anova_ind:

  • "MEAN"The mean value of the variable

  • "DFG", "DFB", "DFCR", "DFIB_R", "DFE". The degree of freedom for genotypes, blocks (randomized complete block design), complete replicates, incomplete blocks within replicates (alpha-lattice design), and error, respectively.

  • "MSG", "FCG", "PFG" The mean square, F-calculated and P-values for genotype effect, respectively.

  • "MSB", "FCB", "PFB" The mean square, F-calculated and P-values for block effect in randomized complete block design.

  • "MSCR", "FCR", "PFCR" The mean square, F-calculated and P-values for complete replicates in alpha lattice design.

  • "MSIB_R", "FCIB_R", "PFIB_R" The mean square, F-calculated and P-values for incomplete blocks within complete replicates, respectively (for alpha lattice design only).

  • "MSE" The mean square of error.

  • "CV" The coefficient of variation.

  • "h2" The broad-sence heritability

  • "AS" The accucary of selection (square root of h2).

  • "FMAX" The Hartley's test (the ratio of the largest MSE to the smallest MSE).

Objects of class anova_joint or gafem:

  • "Y" The observed values.

  • "h2" The broad-sense heritability.

  • "Sum Sq" Sum of squares.

  • "Mean Sq" Mean Squares.

  • "F value" F-values.

  • "Pr(>F)" P-values.

  • ".fitted" Fitted values (default).

  • ".resid" Residuals.

  • ".stdresid" Standardized residuals.

  • ".se.fit" Standard errors of the fitted values.

  • "details" Details.

Objects of class Annicchiarico and Schmildt:

  • "Sem_rp" The standard error of the relative mean performance (Schmildt).

  • "Mean_rp" The relative performance of the mean.

  • "rank" The rank for genotypic confidence index.

  • "Wi" The genotypic confidence index.

Objects of class can_corr:

  • "coefs" The canonical coefficients (default).

  • "loads" The canonical loadings.

  • "crossloads" The canonical cross-loadings.

  • "canonical" The canonical correlations and hypothesis testing.

Objects of class ecovalence:

  • "Ecoval" Ecovalence value (default).

  • "Ecov_perc" Ecovalence in percentage value.

  • "rank" Rank for ecovalence.

Objects of class fai_blup: See the Value section of fai_blup() to see valid options for what argument.

Objects of class ge_acv:

  • "ACV" The adjusted coefficient of variation (default).

  • "ACV_R" The rank for adjusted coefficient of variation.

Objects of class ge_polar:

  • "POLAR" The Power Law Residuals (default).

  • "POLAR_R" The rank for Power Law Residuals.

Objects of class ge_reg:

  • GEN: the genotypes.

  • b0 and b1 (default): the intercept and slope of the regression, respectively.

  • t(b1=1): the calculated t-value

  • pval_t: the p-value for the t test.

  • s2di the deviations from the regression (stability parameter).

  • F(s2di=0): the F-test for the deviations.

  • pval_f: the p-value for the F test;

  • RMSE the root-mean-square error.

  • R2 the determination coefficient of the regression.

Objects of class ge_effects:

  • For objects of class ge_effects no argument what is required.

Objects of class ge_means:

  • "ge_means" Genotype-environment interaction means (default).

  • "env_means" Environment means.

  • "gen_means" Genotype means.

Objects of class gge:

  • "scores" The scores for genotypes and environments for all the analyzed traits (default).

  • "exp_var" The eigenvalues and explained variance.

  • "projection" The projection of each genotype in the AEC coordinates in the stability GGE plot

Objects of class gytb:

  • "gyt" Genotype by yield*trait table (Default).

  • "stand_gyt" The standardized (zero mean and unit variance) Genotype by yield*trait table.

  • "si" The superiority index (sum standardized value across all yield*trait combinations).

Objects of class mgidi: See the Value section of mgidi() to see valid options for what argument.

Objects of class mtsi: See the Value section of mtsi() to see valid options for what argument.

Objects of class Shukla:

  • "rMean" Rank for the mean.

  • "ShuklaVar" Shukla's stablity variance (default).

  • "rShukaVar" Rank for Shukla's stablity variance.

  • "ssiShukaVar" Simultaneous selection index.

Objects of class sh: See the Value section of Smith_Hazel() to see valid options for what argument.

Objects of class Fox:

  • "TOP" The proportion of locations at which the genotype occurred in the top third (default).

Objects of class gai:

  • "GAI" The geometric adaptability index (default).

  • "GAI_R" The rank for the GAI values.

Objects of class superiority:

  • "Pi_a" The superiority measure for all environments (default).

  • "R_a" The rank for Pi_a.

  • "Pi_f" The superiority measure for favorable environments.

  • "R_f" The rank for Pi_f.

  • "Pi_u" The superiority measure for unfavorable environments.

  • "R_u" The rank for Pi_u.

Objects of class Huehn:

  • "S1" Mean of the absolute rank differences of a genotype over the n environments (default).

  • "S2" variance among the ranks over the k environments.

  • "S3" Sum of the absolute deviations.

  • "S6" Relative sum of squares of rank for each genotype.

  • "S1_R", "S2_R", "S3_R", and "S6_R", the ranks for S1, S2, S3, and S6, respectively.

Objects of class Thennarasu:

  • "N1" First statistic (default).

  • "N2" Second statistic.

  • "N3" Third statistic.

  • "N4" Fourth statistic.

  • "N1_R", "N2_R", "N3_R", and "N4_R", The ranks for the statistics.

Objects of class performs_ammi:

  • "PC1", "PC2", ..., "PCn" The values for the nth interaction principal component axis.

  • "ipca_ss" Sum of square for each IPCA.

  • "ipca_ms" Mean square for each IPCA.

  • "ipca_fval" F value for each IPCA.

  • "ipca_pval" P-value for for each IPCA.

  • "ipca_expl" Explained sum of square for each IPCA (default).

  • "ipca_accum" Accumulated explained sum of square.

Objects of class waas, waas_means, and waasb:

  • "PC1", "PC2", ..., "PCn" The values for the nth interaction principal component axis.

  • "WAASB" The weighted average of the absolute scores (default for objects of class waas).

  • "PctResp" The rescaled values of the response variable.

  • "PctWAASB" The rescaled values of the WAASB.

  • "wResp" The weight for the response variable.

  • "wWAASB" The weight for the stability.

  • "OrResp" The ranking regarding the response variable.

  • "OrWAASB" The ranking regarding the WAASB.

  • "OrPC1" The ranking regarding the first principal component axix.

  • "WAASBY" The superiority index WAASBY.

  • "OrWAASBY" The ranking regarding the superiority index.

Objects of class gamem and waasb:

  • "blupge" Best Linear Unbiased Prediction for genotype-environment interaction (mixed-effect model, class waasb).

  • "blupg" Best Linear Unbiased Prediction for genotype effect.

  • "bluege" Best Linear Unbiased Estimation for genotype-environment interaction (fixed-effect model, class waasb).

  • "blueg" Best Linear Unbiased Estimation for genotype effect (fixed model).

  • "data" The data used.

  • "details" The details of the trial.

  • "genpar" Genetic parameters (default).

  • "gcov" The genotypic variance-covariance matrix.

  • "pcov" The phenotypic variance-covariance matrix.

  • "gcor" The genotypic correlation matrix.

  • "pcor" The phenotypic correlation matrix.

  • "h2" The broad-sense heritability.

  • "lrt" The likelihood-ratio test for random effects.

  • "vcomp" The variance components for random effects.

  • "ranef" Random effects.

Objects of class blup_ind

  • "HMGV","HMGV_R" For harmonic mean of genotypic values or its ranks.

  • "RPGV", RPGV_Y" For relative performance of genotypic values or its ranks.

  • "HMRPGV", "HMRPGV_R" For harmonic mean of relative performance of genotypic values or its ranks.

  • "WAASB", "WAASB_R" For the weighted average of absolute scores from the singular or its ranks. value decomposition of the BLUPs for GxE interaction or its ranks.

References

Annicchiarico, P. 1992. Cultivar adaptation and recommendation from alfalfa trials in Northern Italy. J. Genet. Breed. 46:269-278.

Dias, P.C., A. Xavier, M.D.V. de Resende, M.H.P. Barbosa, F.A. Biernaski, R.A. Estopa. 2018. Genetic evaluation of Pinus taeda clones from somatic embryogenesis and their genotype x environment interaction. Crop Breed. Appl. Biotechnol. 18:55-64. doi: 10.1590/1984-70332018v18n1a8

Azevedo Peixoto, L. de, P.E. Teodoro, L.A. Silva, E.V. Rodrigues, B.G. Laviola, and L.L. Bhering. 2018. Jatropha half-sib family selection with high adaptability and genotypic stability. PLoS One 13:e0199880. doi: 10.1371/journal.pone.0199880

Eberhart, S.A., and W.A. Russell. 1966. Stability parameters for comparing Varieties. Crop Sci. 6:36-40. doi: 10.2135/cropsci1966.0011183X000600010011x

Fox, P.N., B. Skovmand, B.K. Thompson, H.J. Braun, and R. Cormier. 1990. Yield and adaptation of hexaploid spring triticale. Euphytica 47:57-64. doi: 10.1007/BF00040364

Huehn, V.M. 1979. Beitrage zur erfassung der phanotypischen stabilitat. EDV Med. Biol. 10:112.

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

Olivoto, T., A.D.C. L\'ucio, J.A.G. da silva, B.G. Sari, and M.I. Diel. 2019b. Mean performance and stability in multi-environment trials II: Selection based on multiple traits. Agron. J. 111:2961-2969. doi: 10.2134/agronj2019.03.0221

Purchase, J.L., H. Hatting, and C.S. van Deventer. 2000. Genotype vs environment interaction of winter wheat (Triticum aestivum L.) in South Africa: II. Stability analysis of yield performance. South African J. Plant Soil 17:101-107. doi: 10.1080/02571862.2000.10634878

Resende MDV (2007) Matematica e estatistica na analise de experimentos e no melhoramento genetico. Embrapa Florestas, Colombo

Sneller, C.H., L. Kilgore-Norquest, and D. Dombek. 1997. Repeatability of Yield Stability Statistics in Soybean. Crop Sci. 37:383-390. doi: 10.2135/cropsci1997.0011183X003700020013x

Mohammadi, R., & Amri, A. (2008). Comparison of parametric and non-parametric methods for selecting stable and adapted durum wheat genotypes in variable environments. Euphytica, 159(3), 419-432. doi: 10.1007/s10681-007-9600-6

Wricke, G. 1965. Zur berechnung der okovalenz bei sommerweizen und hafer. Z. Pflanzenzuchtg 52:127-138.

Zali, H., E. Farshadfar, S.H. Sabaghpour, and R. Karimizadeh. 2012. Evaluation of genotype vs environment interaction in chickpea using measures of stability from AMMI model. Ann. Biol. Res. 3:3126-3136.

See also

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)

#################### joint-regression analysis #####################
ge_r <- ge_reg(data_ge2,
               env = ENV,
               gen = GEN,
               rep =  REP,
               resp = c(PH, EH, CD, CL, ED))
#> Evaluating trait PH |=========                                   | 20% 00:00:00 
Evaluating trait EH |==================                          | 40% 00:00:00 
Evaluating trait CD |==========================                  | 60% 00:00:00 
Evaluating trait CL |===================================         | 80% 00:00:01 
Evaluating trait ED |============================================| 100% 00:00:01 

get_model_data(ge_r)
#> Class of the model: ge_reg
#> Variable extracted: b1
#> # A tibble: 13 x 6
#>    GEN      PH    EH      CD     CL      ED
#>    <chr> <dbl> <dbl>   <dbl>  <dbl>   <dbl>
#>  1 H1    0.806 1.06  -0.0594 -2.19   0.0280
#>  2 H10   1.22  1.30   2.31    4.63   2.47  
#>  3 H11   1.08  1.00   2.74    2.37   0.707 
#>  4 H12   0.465 0.590  1.73    2.94   0.808 
#>  5 H13   0.306 0.575 -0.661   0.129  0.636 
#>  6 H2    0.963 0.525 -1.26   -3.86  -0.0534
#>  7 H3    1.35  1.15   1.40   -1.33   0.987 
#>  8 H4    1.27  1.41   0.555  -0.393  1.20  
#>  9 H5    1.17  1.30   0.356   0.486  0.197 
#> 10 H6    0.936 0.780  3.00    1.60   0.940 
#> 11 H7    0.992 0.950 -0.0386  1.48   0.797 
#> 12 H8    1.01  0.886  0.903   3.73   1.89  
#> 13 H9    1.42  1.48   2.04    3.42   2.40  
# Significance of deviations from the regression
# Use gmd(), a shortcut for get_model_data
gmd(ge_r, "pval_f")
#> Class of the model: ge_reg
#> Variable extracted: pval_f
#> # A tibble: 13 x 6
#>    GEN           PH         EH      CD          CL       ED
#>    <chr>      <dbl>      <dbl>   <dbl>       <dbl>    <dbl>
#>  1 H1    0.0000756  0.0000949  0.896   0.508       0.619   
#>  2 H10   0.00685    0.00611    0.447   0.135       0.662   
#>  3 H11   0.0112     0.0112     0.917   0.0666      0.00341 
#>  4 H12   0.000110   0.00000707 0.227   0.219       0.218   
#>  5 H13   0.000231   0.00652    0.0877  0.000000327 0.00108 
#>  6 H2    0.0000241  0.00000186 0.173   0.0473      0.000299
#>  7 H3    0.00000995 0.00000637 0.0108  0.208       0.0594  
#>  8 H4    0.000671   0.00403    0.134   0.0277      0.0340  
#>  9 H5    0.0484     0.198      0.546   0.000277    0.0520  
#> 10 H6    0.000994   0.0845     0.00620 0.0000280   0.144   
#> 11 H7    0.00609    0.0435     0.00458 0.0171      0.107   
#> 12 H8    0.0000403  0.0000472  0.00188 0.0000225   0.117   
#> 13 H9    0.0249     0.503      0.0144  0.106       0.905   


#################### WAASB index #####################
# Fitting the WAAS index
AMMI <- waasb(data_ge2,
              env = ENV,
              gen = GEN,
              rep = REP,
              resp = c(PH, ED, TKW, NKR))
#> Evaluating trait PH |===========                                 | 25% 00:00:00 
Evaluating trait ED |======================                      | 50% 00:00:00 
Evaluating trait TKW |================================           | 75% 00:00:01 
Evaluating trait NKR |===========================================| 100% 00:00:01 

#> Method: REML/BLUP
#> Random effects: GEN, GEN:ENV
#> Fixed effects: ENV, REP(ENV)
#> Denominador DF: Satterthwaite's method
#> ---------------------------------------------------------------------------
#> P-values for Likelihood Ratio Test of the analyzed traits
#> ---------------------------------------------------------------------------
#>     model       PH       ED      TKW     NKR
#>  COMPLETE       NA       NA       NA      NA
#>       GEN 9.39e-01 2.99e-01 1.00e+00 0.78738
#>   GEN:ENV 1.09e-13 1.69e-08 4.21e-10 0.00404
#> ---------------------------------------------------------------------------
#> All variables with significant (p < 0.05) genotype-vs-environment interaction

# Getting the weighted average of absolute scores
gmd(AMMI, what = "WAASB")
#> Class of the model: waasb
#> Variable extracted: WAASB
#> # A tibble: 13 x 5
#>    GEN      PH    ED   TKW   NKR
#>    <fct> <dbl> <dbl> <dbl> <dbl>
#>  1 H1    0.319 0.695 3.49  0.545
#>  2 H10   0.287 0.879 2.47  0.291
#>  3 H11   0.210 0.579 0.801 0.533
#>  4 H12   0.298 0.344 1.59  0.433
#>  5 H13   0.258 0.758 0.423 0.547
#>  6 H2    0.312 0.990 3.86  0.271
#>  7 H3    0.340 0.364 3.08  0.172
#>  8 H4    0.268 0.321 2.77  0.615
#>  9 H5    0.171 0.465 0.476 0.561
#> 10 H6    0.232 0.528 0.591 1.07 
#> 11 H7    0.209 0.301 2.55  0.369
#> 12 H8    0.334 0.640 4.50  0.612
#> 13 H9    0.208 0.913 5.13  0.632

# And the rank for the WAASB index.
gmd(AMMI, what = "OrWAASB")
#> Class of the model: waasb
#> Variable extracted: OrWAASB
#> # A tibble: 13 x 5
#>    GEN      PH    ED   TKW   NKR
#>    <fct> <dbl> <dbl> <dbl> <dbl>
#>  1 H1       11     9    10     7
#>  2 H10       8    11     6     3
#>  3 H11       4     7     4     6
#>  4 H12       9     3     5     5
#>  5 H13       6    10     1     8
#>  6 H2       10    13    11     2
#>  7 H3       13     4     9     1
#>  8 H4        7     2     8    11
#>  9 H5        1     5     2     9
#> 10 H6        5     6     3    13
#> 11 H7        3     1     7     4
#> 12 H8       12     8    12    10
#> 13 H9        2    12    13    12


#################### BLUP model #####################
# Fitting a mixed-effect model
# Genotype and interaction as random
blup <- gamem_met(data_ge2,
                  env = ENV,
                  gen = GEN,
                  rep = REP,
                  resp = c(PH, ED, TKW, NKR))
#> Evaluating trait PH |===========                                 | 25% 00:00:00 
Evaluating trait ED |======================                      | 50% 00:00:00 
Evaluating trait TKW |================================           | 75% 00:00:01 
Evaluating trait NKR |===========================================| 100% 00:00:01 

#> Method: REML/BLUP
#> Random effects: GEN, GEN:ENV
#> Fixed effects: ENV, REP(ENV)
#> Denominador DF: Satterthwaite's method
#> ---------------------------------------------------------------------------
#> P-values for Likelihood Ratio Test of the analyzed traits
#> ---------------------------------------------------------------------------
#>     model       PH       ED      TKW     NKR
#>  COMPLETE       NA       NA       NA      NA
#>       GEN 9.39e-01 2.99e-01 1.00e+00 0.78738
#>   GEN:ENV 1.09e-13 1.69e-08 4.21e-10 0.00404
#> ---------------------------------------------------------------------------
#> All variables with significant (p < 0.05) genotype-vs-environment interaction

# Getting p-values for likelihood-ratio test
gmd(blup, what = "lrt")
#> Class of the model: waasb
#> Variable extracted: lrt
#> # A tibble: 8 x 8
#>   VAR   model    npar  logLik    AIC      LRT    Df `Pr(>Chisq)`
#>   <chr> <chr>   <int>   <dbl>  <dbl>    <dbl> <dbl>        <dbl>
#> 1 PH    GEN        14    7.89   12.2 5.81e- 3     1     9.39e- 1
#> 2 PH    GEN:ENV    14  -19.7    67.4 5.52e+ 1     1     1.09e-13
#> 3 ED    GEN        14 -327.    681.  1.08e+ 0     1     2.99e- 1
#> 4 ED    GEN:ENV    14 -342.    712.  3.18e+ 1     1     1.69e- 8
#> 5 TKW   GEN        14 -748.   1525.  2.27e-13     1     1.00e+ 0
#> 6 TKW   GEN:ENV    14 -768.   1564.  3.90e+ 1     1     4.21e-10
#> 7 NKR   GEN        14 -387.    802.  7.27e- 2     1     7.87e- 1
#> 8 NKR   GEN:ENV    14 -391.    810.  8.26e+ 0     1     4.04e- 3

# Getting the variance components
gmd(blup, what = "vcomp")
#> Class of the model: waasb
#> Variable extracted: vcomp
#> # A tibble: 3 x 5
#>   Group          PH    ED      TKW   NKR
#>   <chr>       <dbl> <dbl>    <dbl> <dbl>
#> 1 GEN      0.000455 0.557 8.07e-13 0.187
#> 2 GEN:ENV  0.0425   2.82  1.15e+ 3 2.96 
#> 3 Residual 0.0224   2.59  9.18e+ 2 7.85 

# Getting the genetic parameters
gmd(blup)
#> Class of the model: waasb
#> Variable extracted: genpar
#> # A tibble: 9 x 5
#>   Parameters               PH     ED      TKW     NKR
#>   <chr>                 <dbl>  <dbl>    <dbl>   <dbl>
#> 1 Phenotypic variance 0.0654  5.97   2.07e+ 3 11.0   
#> 2 Heritability        0.00696 0.0932 3.91e-16  0.0170
#> 3 GEIr2               0.650   0.472  5.55e- 1  0.269 
#> 4 h2mg                0.0351  0.377  2.22e-15  0.118 
#> 5 Accuracy            0.187   0.614  4.71e- 8  0.344 
#> 6 rge                 0.655   0.521  5.55e- 1  0.274 
#> 7 CVg                 0.858   1.51   2.65e- 7  1.34  
#> 8 CVr                 6.03    3.25   8.95e+ 0  8.69  
#> 9 CV ratio            0.142   0.463  2.96e- 8  0.154 

### BLUP-based stability indexes ###
blup %>%
blup_indexes() %>%
gmd("HMRPGV_R")
#> Warning: The WAASB index was not computed.
#> Use an object computed with `waasb()` to get this index.
#> Class of the model: blup_ind
#> Variable extracted: HMRPGV_R
#> # A tibble: 13 x 5
#>    GEN      ED   NKR    PH   TKW
#>    <chr> <dbl> <dbl> <dbl> <dbl>
#>  1 H1        2     7     1     1
#>  2 H10      11     6    13    10
#>  3 H11       9     3    10     9
#>  4 H12      10    13     8    11
#>  5 H13       4    12     7     8
#>  6 H2        3     8     2     3
#>  7 H3        7    10     3     5
#>  8 H4        8     1     4     4
#>  9 H5        5     2     5     7
#> 10 H6        1     4     6     2
#> 11 H7        6     9     9     6
#> 12 H8       12    11    12    12
#> 13 H9       13     5    11    13

# }