Package {stability}


Type: Package
Title: Genotype-by-Environment Interaction and Yield Stability Analysis
Version: 1.0.0
Date: 2026-11-03
Description: Analyses multi-environment trials of plant breeding, laid out in randomized complete blocks in every environment, to find genotypes that are high-yielding and stable: analyses of variance in each environment and combined; Eberhart and Russell's analysis (1966) <doi:10.2135/cropsci1966.0011183X000600010011x> and Finlay and Wilkinson's regression (1963) <doi:10.1071/AR9630742>; Wricke's ecovalence, Shukla's stability variance (1972) <doi:10.1038/hdy.1972.87> and Kang and Pham's yield-stability statistic (1991) <doi:10.2134/agronj1991.00021962008300010037x>; Kang's rank-sum and Fox's top-third ranking; Eskridge's safety-first indices (1990), Annicchiarico's reliability index (1992), Lin and Binns' superiority measure (1988) and Huehn's nonparametric statistics (1979) with tests; additive main effects and multiplicative interaction (AMMI) analysis with biplots and AMMI stability values on any number of axes; the GGE biplot with which-won-where, mean-stability and discrimination views in three scalings; and a plain-language interpretation of every result, computed from its numbers.
License: GPL-2
URL: https://myaseen208.com/stability/, https://github.com/myaseen208/stability
BugReports: https://github.com/myaseen208/stability/issues
Encoding: UTF-8
Language: en-US
LazyData: true
Depends: R (≥ 4.2)
Imports: collapse, data.table, ggplot2, ggrepel, grDevices, scales, stats, utils
Suggests: bench, flextable, knitr, officer, pkgload, quarto, R.rsp, svglite, testthat (≥ 3.0.0), withr
VignetteBuilder: quarto, R.rsp
Config/Needs/website: pkgdown (>= 2.1.0)
Config/testthat/edition: 3
Config/skill/prefix: stab
Config/roxygen2/version: 8.1.1
NeedsCompilation: no
Packaged: 2026-11-07 06:08:17 UTC; myaseen208
Author: Muhammad Yaseen ORCID iD [aut, cre, cph], Kent Eskridge [aut, ctb]
Maintainer: Muhammad Yaseen <myaseen208@gmail.com>
Repository: CRAN
Date/Publication: 2026-11-07 12:20:02 UTC

stability: Genotype-by-Environment Interaction and Yield Stability Analysis

Description

stability analyses multi-environment trials of plant breeding, laid out in randomized complete blocks in every environment, to find genotypes that are high-yielding and stable: analyses of variance, regression on the environment index, variance-based and rank-based stability statistics, AMMI and GGE biplots, and a plain-language interpretation of every result.

Details

Functions, in the order of an analysis:

Every analysis keeps the names, arguments and result components of the earlier versions and returns the result with a class and the methods print, summary, plot and as.data.table; see stab-methods. Utilities: stab_theme, stab_save, stab_notation, stab_reference.

Data. ge_data: 60 wheat genotypes in 11 environments.

Vignettes. Start with vignette("stability_01_getting_started", package = "stability"); browseVignettes("stability") lists all of them, each as HTML and as PDF.

Notation

Scalars are upper-case letters in normal face, indices lower-case italic, vectors lower-case bold and matrices upper-case bold. The full table is stab_notation().

G, E, B numbers of genotypes, environments and replicates
i, j, k genotype, environment, replicate
\mathbf{Y}, \bar{y}_{ij} table of means, mean of genotype i in environment j
\bar{y}_{i\cdot}, \bar{y}_{\cdot j}, \bar{y} genotype, environment and grand means
\mathbf{Z}, z_{ij} interaction effects
I_j environment index \bar{y}_{\cdot j} - \bar{y}
s^2, f_e pooled error mean square of the plots and its degrees of freedom
\beta_i, S^2_{d_i} regression slope and deviation variance
W_i, \sigma^2_i ecovalence and stability variance
\lambda_n singular values of the interaction (AMMI) or of G + GE (GGE)

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Becker, H. C. and Leon, J. (1988). Stability analysis in plant breeding. Plant Breeding, 101(1), 1–23.

Kang, M. S. (2002). Quantitative Genetics, Genomics and Plant Breeding. CABI Publishing, Wallingford.

Singh, R. K. and Chaudhary, B. D. (2004). Biometrical Methods in Quantitative Genetic Analysis. Kalyani Publishers, New Delhi.

Yan, W. and Kang, M. S. (2003). GGE Biplot Analysis: A Graphical Tool for Breeders, Geneticists, and Agronomists. CRC Press, Boca Raton.

See Also

Useful links:


Combined analysis of variance of a multi-environment trial

Description

add_anova() gives the combined analysis of variance of genotypes grown in randomized complete blocks in several environments: environments, replicates within environments, genotypes, genotype-by-environment interaction and the pooled error. It is the first step of a stability analysis: a significant interaction is the reason for studying stability.

Usage

add_anova(.data, .y, .rep, .gen, .env)

## Default S3 method:
add_anova(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate (block within environment): a column of .data or a vector, as for .y.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

With G genotypes, E environments and B replicates the model is

y_{ijk} = \mu + e_j + b_{k(j)} + g_i + (ge)_{ij} + \varepsilon_{ijk},

i = 1, \ldots, G, j = 1, \ldots, E, k = 1, \ldots, B. With the cell means \bar{y}_{ij}, the genotype means \bar{y}_{i\cdot}, the environment means \bar{y}_{\cdot j}, the replicate means \bar{y}_{\cdot jk} and the grand mean \bar{y} the sums of squares are

SS_E = GB\sum_j(\bar{y}_{\cdot j} - \bar{y})^2, \quad SS_{B(E)} = G\sum_j\sum_k(\bar{y}_{\cdot jk} - \bar{y}_{\cdot j})^2, \quad SS_G = EB\sum_i(\bar{y}_{i\cdot} - \bar{y})^2,

SS_{GE} = B\sum_i\sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot} - \bar{y}_{\cdot j} + \bar{y})^2,

and the error is the remainder, on E(G - 1)(B - 1) degrees of freedom. Environments are tested against replicates within environments, genotypes and the interaction against the pooled error. With missing plots the sums of squares are the sequential ones of the same linear model.

Value

An object of class c("stab_add_anova", "stab_result", "list") with the component of earlier versions:

anova

analysis of variance (class anova) with rows Env, Rep(Env), Gen, Gen:Env, Residuals and columns Df, Sum Sq, Mean Sq, F value, Pr(>F).

and a new one:

Summary

data frame: grand mean, coefficient of variation (percent), numbers of genotypes, environments and replicates, and the shares (percent) of environments, genotypes and interaction in their summed sums of squares.

Methods: print(), summary(), plot() (residuals against fitted values, which = "residuals", or their normal quantile plot, which = "qq"), stab_interpret(), data.table::as.data.table(x, component =).

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Singh, R. K. and Chaudhary, B. D. (2004). Biometrical Methods in Quantitative Genetic Analysis. Kalyani Publishers, New Delhi.

See Also

indiv_anova, er_anova, stab_interpret

Other stability analyses: ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  add_anova(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
fit
fit$Summary
stab_interpret(
    x             = fit
  , higher_better = TRUE
  , top           = 5L
  )

Additive main effects and multiplicative interaction (AMMI) analysis

Description

ammi() fits the AMMI model: additive genotype and environment effects plus a sum of multiplicative terms for the interaction, found by the singular value decomposition of the table of interaction effects (Gauch 1992). It gives the combined analysis of variance, the split of the interaction into principal components with Gollob's (1968) F tests, and the genotype and environment scores.

Usage

ammi(.data, .y, .rep, .gen, .env)

## Default S3 method:
ammi(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate (block within environment): a column of .data or a vector, as for .y.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

The model for the cell means is

\bar{y}_{ij} = \mu + g_i + e_j + \sum_{n=1}^{N}\lambda_n\gamma_{in}\delta_{jn} + \rho_{ij},

where \lambda_n are the singular values of the interaction matrix \mathbf{Z} = (z_{ij}), z_{ij} = \bar{y}_{ij} - \bar{y}_{i\cdot} - \bar{y}_{\cdot j} + \bar{y}, and \gamma_{in}, \delta_{jn} its singular vectors. Axis n has the sum of squares B\lambda_n^2 on G + E - 1 - 2n degrees of freedom (Gollob 1968) and is tested against the pooled error. The scores are \gamma_{in}\sqrt{\lambda_n} for genotypes and \delta_{jn}\sqrt{\lambda_n} for environments, so that their products give the interaction. The number of significant axes (tested in order, at 0.05) suggests the model: AMMI0 (no axis), AMMI1, AMMI2, ....

Changes from the earlier version. The table pc_anova lists the \min(G, E) - 1 axes that exist (the earlier version added a row of zeros); the interaction is computed from the table of means directly (no refitted aov()).

Value

An object of class c("stab_ammi", "stab_result", "list") with the components of earlier versions:

anova

the combined analysis of variance of add_anova.

pc_anova

data.table, one row per axis: PC, SingVal, Percent, AccumPerc, Df, SS, MeanSq, Fvalue, ProbF.

gen_scores, env_scores

matrices of genotype and environment scores (columns PC1, PC2, ...).

and a new one:

ammi_model

the model suggested by the tests, e.g. "AMMI2".

Methods: print(), summary(), plot() (which = c("scree", "ammi1", "ammi2")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Gauch, H. G. (1992). Statistical Analysis of Regional Yield Trials: AMMI Analysis of Factorial Designs. Elsevier, Amsterdam.

Gollob, H. F. (1968). A statistical model which combines features of factor analytic and analysis of variance techniques. Psychometrika, 33(1), 73–115. doi:10.1007/BF02289676

Zobel, R. W., Wright, M. J. and Gauch, H. G. (1988). Statistical analysis of a yield trial. Agronomy Journal, 80(3), 388–393. doi:10.2134/agronj1988.00021962008000030002x

See Also

ammi_biplot, stab_asv, stab_masv, stab_dist, stab_interpret

Other stability analyses: add_anova(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  ammi(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
fit$pc_anova
fit$ammi_model
plot(x = fit, which = c("scree", "ammi1", "ammi2")[1])

AMMI biplots

Description

ammi_biplot() draws the two AMMI biplots of a multi-environment trial: the AMMI2 biplot (scores of the first two interaction axes of genotypes and environments) and the AMMI1 biplot (means against the first axis).

Usage

ammi_biplot(.data, .y, .rep, .gen, .env)

## Default S3 method:
ammi_biplot(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: as for .y; optional (the scores do not depend on it).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

The scores are those of ammi: \gamma_{in}\sqrt{\lambda_n} for genotypes and \delta_{jn}\sqrt{\lambda_n} for environments, so the inner product of a genotype point and an environment point approximates their interaction. In the AMMI1 biplot genotypes to the right of the grand mean yield above average; genotypes close to PC1 = 0 interact little (are stable); genotypes and environments with PC1 scores of the same sign interact positively.

Changes from the earlier version. The genotype means of the AMMI1 plot were paired with the scores of other genotypes unless the data were sorted by genotype; the plot now shows environments too, with the mean on the horizontal axis as is usual. Genotypes and environments are scaled symmetrically.

Value

An object of class c("stab_ammi_biplot", "stab_result", "list") with the components of earlier versions:

ammi_biplot

ggplot: the AMMI2 biplot.

MeanPC1Plot

ggplot: the AMMI1 biplot.

and a new one:

scores

data.table: label, type ("Genotype" or "Environment"), Mean, PC1, PC2.

Methods: print() (draws both), plot() (which = c("ammi2", "ammi1")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Gauch, H. G. (1992). Statistical Analysis of Regional Yield Trials: AMMI Analysis of Factorial Designs. Elsevier, Amsterdam.

Zobel, R. W., Wright, M. J. and Gauch, H. G. (1988). Statistical analysis of a yield trial. Agronomy Journal, 80(3), 388–393. doi:10.2134/agronj1988.00021962008000030002x

See Also

ammi, gge_biplot, stab_interpret

Other stability analyses: add_anova(), ammi(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  ammi_biplot(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
plot(x = fit, which = c("ammi2", "ammi1")[1])

Eberhart and Russell's analysis of stability

Description

er_anova() gives Eberhart and Russell's (1966) analysis of variance of a multi-environment trial, which splits the environments and the genotype-by-environment interaction into a linear part (the regression of each genotype on the environment index) and the deviations from regression, with a test of the deviations of every genotype, together with the stability parameters of each genotype.

Usage

er_anova(.data, .y, .rep, .gen, .env)

## Default S3 method:
er_anova(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate (block within environment): a column of .data or a vector, as for .y.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

With the table of means \mathbf{Y} = (\bar{y}_{ij}) (G genotypes by E environments) and the environment index I_j = \bar{y}_{\cdot j} - \bar{y}, every genotype is regressed on the index:

\bar{y}_{ij} = \mu_i + \beta_i I_j + \delta_{ij}, \qquad \hat{\beta}_i = \frac{\sum_j \bar{y}_{ij}I_j}{\sum_j I_j^2}, \qquad S^2_{d_i} = \frac{\sum_j \hat{\delta}_{ij}^2}{E - 2} - \frac{s^2}{B},

where s^2 is the pooled error mean square of the plots and B the number of replicates. On the scale of the means the analysis of variance is

Total GE - 1 \sum_{ij}(\bar{y}_{ij} - \bar{y})^2
Gen G - 1 E\sum_i(\bar{y}_{i\cdot} - \bar{y})^2
Env + (Gen x Env) G(E - 1) \sum_{ij}(\bar{y}_{ij} - \bar{y}_{i\cdot})^2
Env (linear) 1 G\sum_j I_j^2
Gen x Env (linear) G - 1 \sum_i(\sum_j\bar{y}_{ij}I_j)^2/\sum_j I_j^2 - G\sum_j I_j^2
Pooled deviation G(E - 2) \sum_{ij}\hat{\delta}_{ij}^2
Pooled error f_e f_e s^2/B

Genotypes and the linear interaction are tested against the pooled deviation, the deviation of each genotype (E - 2 degrees of freedom) against the pooled error. A stable genotype in the sense of Eberhart and Russell has a high mean, \beta_i = 1 and S^2_{d_i} = 0.

Changes from the earlier version. The lines Total and Gen used the replicate sum of squares; the deviation sums of squares were divided by the number of replicates (they are already on the scale of the means); the pooled error had EG(B - 1) instead of E(G - 1)(B - 1) degrees of freedom. All three are corrected, and the regression is computed in closed form (lme4 is no longer needed).

Value

An object of class c("stab_er_anova", "stab_result", "list") with the components of earlier versions:

add_anova

the combined analysis of variance of add_anova.

er_anova

Eberhart and Russell's analysis of variance (class anova): lines Total, Gen, Env + (Gen x Env), Env (linear), Gen x Env(linear), Pooled deviation, one line per genotype, Pooled error.

and a new one:

Parameters

data.table, one row per genotype: Gen, Mean, Slope (\hat{\beta}_i), SE, p.b1 (test of \beta_i = 1), S2d (S^2_{d_i}), p.S2d (test of S^2_{d_i} = 0).

Methods: print(), summary(), plot() (mean against slope, which = "slope"; residuals, which = "residuals" or "qq"), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Eberhart, S. A. and Russell, W. A. (1966). Stability parameters for comparing varieties. Crop Science, 6(1), 36–40. doi:10.2135/cropsci1966.0011183X000600010011x

Singh, R. K. and Chaudhary, B. D. (2004). Biometrical Methods in Quantitative Genetic Analysis. Kalyani Publishers, New Delhi.

See Also

stab_reg, add_anova, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  er_anova(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
fit
head(fit$Parameters)
plot(x = fit, which = c("slope", "residuals", "qq")[1])

Multi-environment trial of 60 wheat genotypes in 11 environments

Description

Grain yield of 60 wheat genotypes from breeding institutes of Pakistan, grown in 11 environments (locations of Punjab) in randomized complete blocks with two replicates; every replicate is split into six incomplete blocks of ten plots. The data illustrate every analysis of the package.

Usage

data(ge_data)

Format

A data.frame with 1320 rows (60 genotypes by 11 environments by 2 replicates) and 6 columns:

Gen

genotype (factor, 60 levels).

Institute

breeding institute of the genotype (factor; empty for two check varieties).

Rep

replicate within environment (factor, levels 1, 2).

Block

incomplete block within replicate (factor, levels 1 to 6); the analyses of the package treat the replicates as complete blocks.

Env

environment (factor, 11 levels: FSD, FSDR, Okara, Sargodha, Gujranwala, KotNaina, KSK, Khanewal, Sahiwal, Bhakkar, Bahawalnagar).

Yield

grain yield (integer, kilograms per hectare; 2363 to 6300).

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

Source

National uniform wheat yield trial data of the authors' collaborators in Pakistan.

See Also

add_anova, stab_interpret

Examples

data(ge_data)
str(ge_data)
with(data = ge_data, expr = table(Env, Rep))

Interaction effects and genotype-plus-interaction effects

Description

ge_effects() gives the table of means, the genotype-plus-interaction (GGE) effects (means centred on the environment means) and the interaction (GE) effects (means centred on genotype and environment means). A large positive interaction effect marks a genotype specifically adapted to that environment.

Usage

ge_effects(.data, .y, .gen, .env)

## Default S3 method:
ge_effects(.data, .y, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

gge_{ij} = \bar{y}_{ij} - \bar{y}_{\cdot j}, \qquad z_{ij} = \bar{y}_{ij} - \bar{y}_{i\cdot} - \bar{y}_{\cdot j} + \bar{y}.

The interaction effects sum to zero over every row and column; their squares summed over a row are Wricke's ecovalence (stab_measures).

Value

An object of class c("stab_ge_effects", "stab_result", "list") with the components of earlier versions:

ge_means

data.table of means, genotypes in rows.

gge_effects

matrix of genotype-plus-interaction effects.

ge_effects

matrix of interaction effects.

Methods: print(), summary(), plot() (which = c("ge", "gge")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

See Also

ge_means, ammi, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  ge_effects(
      .data = ge_data
    , .y    = Yield
    , .gen  = Gen
    , .env  = Env
    )
round(x = fit$ge_effects[1:5, 1:5], digits = 1)
plot(x = fit, which = c("ge", "gge")[1])

Genotype-by-environment means and rankings

Description

ge_means() tabulates the mean of every genotype in every environment, the genotype and environment means, and the ranking of the genotypes within each environment, which shows at a glance whether the best genotypes change from one environment to another (crossover interaction).

Usage

ge_means(.data, .y, .gen, .env)

## Default S3 method:
ge_means(.data, .y, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

\bar{y}_{ij} is the mean of genotype i in environment j; \bar{y}_{i\cdot} and \bar{y}_{\cdot j} are the means of the table's rows and columns (with missing plots, the means of the cell means). Row j of ge_ranks lists the genotypes of environment j from the highest mean down. The new component rank_cor holds Spearman's rank correlations of the genotype means between pairs of environments; low or negative correlations indicate crossover interaction.

Change from the earlier version. g_means and e_means were in the order of the data; they are now in the order of the levels (as the rows and columns of ge_means_mat).

Value

An object of class c("stab_ge_means", "stab_result", "list") with the components of earlier versions:

ge_means

data.table, genotypes in rows and environments in columns.

ge_means_mat

the same as a matrix.

g_means, e_means

data.tables of genotype and environment means.

ge_ranks

character matrix, environments in rows: the genotypes in decreasing order of mean.

and a new one:

rank_cor

matrix of Spearman's rank correlations between environments.

Methods: print(), summary(), plot() (which = c("heatmap", "ranks")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

See Also

ge_effects, stab_fox, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  ge_means(
      .data = ge_data
    , .y    = Yield
    , .gen  = Gen
    , .env  = Env
    )
fit$ge_ranks[, 1:5]
plot(x = fit, which = c("heatmap", "ranks")[1])

GGE biplot

Description

gge_biplot() draws the GGE biplot (Yan et al. 2000) of a multi-environment trial: the first two principal components of the genotype main effect plus the genotype-by-environment interaction (G + GE). Besides the basic biplot it draws the three views used for decisions: which won where (the polygon of the vertex genotypes and the sectors that group environments into mega-environments), mean against stability (the average environment coordination, ATC) and discriminativeness against representativeness of the environments.

Usage

gge_biplot(.data, .y, .rep, .gen, .env, .which = "basic", .svp = "genotype")

## Default S3 method:
gge_biplot(.data, .y, .rep, .gen, .env, .which = "basic", .svp = "genotype")

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: as for .y; optional (the biplot does not depend on it).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

.which

"basic" (default, the plot of earlier versions), "which-won-where", "mean-stability" or "discrimination".

.svp

singular value partition: "genotype" (default, as in earlier versions), "symmetric" or "environment".

Details

With the table of means centred on the environment means, \mathbf{X} = (\bar{y}_{ij} - \bar{y}_{\cdot j}), and its singular value decomposition \mathbf{X} = \mathbf{U}\mathbf{D}\mathbf{V}^{\top}, the genotype and environment scores of the first two components are \mathbf{U}\mathbf{D}^{P} and \mathbf{V}\mathbf{D}^{1-P}: P = 1 genotype-focused scaling (.svp = "genotype"; distances between genotypes; the scaling for mean against stability), P = 0.5 symmetric (the usual scaling for which won where), P = 0 environment-focused (lengths of and angles between environment vectors; the scaling for discriminativeness and representativeness). The inner products of genotype and environment points, and hence the winner of every environment and the ranking of genotypes on the average environment axis, are the same for every scaling; the polygon, the instability of genotypes and the lengths and angles of environment vectors are not. The vignette The GGE biplot: every view with every scaling draws and interprets all twelve combinations.

Which won where: the convex hull of the genotype points is drawn with lines from the origin perpendicular to its sides; they divide the plane into sectors, and the vertex genotype of a sector yields best in the environments that fall in it (Yan and Tinker 2006). The winner of every environment is also computed directly as the genotype with the largest two-component fitted value.

Mean against stability: the average environment axis (AEA) passes through the origin and the mean of the environment scores; the projection of a genotype on it ranks the means, the distance from it measures instability.

Discriminativeness and representativeness: the length of an environment vector measures how well it separates genotypes; a small angle with the AEA marks a representative environment.

Change from the earlier version. The function returns, as before, a ggplot; the data of the biplot (scores, percentages, winners, ATC ranking, environment vectors) are now attached as the attribute "gge", which stab_interpret() uses.

Value

A ggplot with the attribute "gge": a list with gen and env (data.tables of scores, with means), percent (of the G + GE sum of squares on the two components), winners (data.table: environment and winning genotype), vertex (vertex genotypes), atc (data.table: genotypes ranked on the AEA with their instability), envs (data.table: vector length and angle with the AEA of every environment), svp, which, meta (response, numbers of genotypes and environments, grand mean).

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Yan, W., Hunt, L. A., Sheng, Q. and Szlavnics, Z. (2000). Cultivar evaluation and mega-environment investigation based on the GGE biplot. Crop Science, 40(3), 597–605. doi:10.2135/cropsci2000.403597x

Yan, W. and Kang, M. S. (2003). GGE Biplot Analysis: A Graphical Tool for Breeders, Geneticists, and Agronomists. CRC Press, Boca Raton.

Yan, W. and Tinker, N. A. (2006). Biplot analysis of multi-environment trial data: principles and applications. Canadian Journal of Plant Science, 86(3), 623–645. doi:10.4141/P05-169

See Also

ammi_biplot, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
p <-
  gge_biplot(
      .data  = ge_data
    , .y     = Yield
    , .rep   = Rep
    , .gen   = Gen
    , .env   = Env
    , .which = c("basic", "which-won-where", "mean-stability", "discrimination")[2]
    , .svp   = c("genotype", "symmetric", "environment")[2]
    )
p
attr(x = p, which = "gge")$winners
stab_interpret(
    x             = p
  , higher_better = TRUE
  , top           = 5L
  )

Analysis of variance in each environment

Description

indiv_anova() analyses each environment of a multi-environment trial on its own, as a randomized complete block experiment, and tests whether the error variances of the environments are homogeneous, which the pooled error of the combined analysis (add_anova) assumes.

Usage

indiv_anova(.data, .y, .rep, .gen, .env)

## Default S3 method:
indiv_anova(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate (block within environment): a column of .data or a vector, as for .y.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

In environment j the model is y_{ik} = \mu + b_k + g_i + \varepsilon_{ik}, with B - 1 degrees of freedom for replicates, G - 1 for genotypes and f_j = (G - 1)(B - 1) for the error s^2_j. The coefficient of variation is 100\,s_j/\bar{y}_{\cdot j}. Bartlett's test of equal error variances is

\chi^2 = \frac{f\ln\bar{s}^2 - \sum_j f_j\ln s^2_j}{1 + \frac{1}{3(E - 1)}\left(\sum_j \frac{1}{f_j} - \frac{1}{f}\right)}, \qquad f = \sum_j f_j,\; \bar{s}^2 = \frac{\sum_j f_j s^2_j}{f},

on E - 1 degrees of freedom; the ratio of the largest to the smallest error mean square is also given (a ratio below about 3 is commonly taken as acceptable for pooling).

Change from the earlier version. The analysis in each environment now includes the replicates (a randomized complete block analysis); the earlier version fitted genotypes only, so its error contained the replicate variation and its F tests were too small.

Value

An object of class c("stab_indiv_anova", "stab_result", "list"): as in earlier versions, one component per environment, named "ANOVA", a dash and the environment (see names(x)), with the summary.aov table of that environment (lines Rep, Gen, Residuals); then two new components:

Summary

data frame, one row per environment: Env, Mean, CV (percent), MSE, Df.error, F.Gen, p.Gen.

Homogeneity

data frame: Bartlett's Chisq, Df, p.value, and Ratio (largest over smallest error mean square).

Methods: print(), summary(), plot() (environment means with their CV, which = "means"; error mean squares, which = "error"), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. Proceedings of the Royal Society of London, Series A, 160(901), 268–282. doi:10.1098/rspa.1937.0109

Gomez, K. A. and Gomez, A. A. (1984). Statistical Procedures for Agricultural Research, 2nd edition. John Wiley and Sons, New York.

See Also

add_anova, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  indiv_anova(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
fit$Summary
fit$Homogeneity
plot(x = fit, which = c("means", "error")[1])

Methods for stability results

Description

The analysis functions of stability return the named list they have always returned, now with the class c("stab_<analysis>", "stab_result", "list"). Components are read as before (x$ANOVA, x[["Means"]]); the methods below print, summarise and plot the result and turn any component into a data.table.

Usage

## S3 method for class 'stab_result'
print(x, digits = 4L, ...)

## S3 method for class 'stab_result'
summary(object, ...)

## S3 method for class 'summary.stab_result'
print(x, ...)

## S3 method for class 'stab_result'
format(x, ...)

## S3 method for class 'stab_result'
as.data.table(x, keep.rownames = FALSE, ..., component = 1L)

## S3 method for class 'stab_result'
as.data.frame(x, row.names = NULL, optional = FALSE, ..., component = 1L)

## S3 method for class 'stab_result'
plot(x, ...)

Arguments

x, object

a stability result.

digits

significant digits of printed numbers (default 4).

...

passed on (to print() of the components, or to the plotting function for plot()).

keep.rownames, row.names, optional

as in data.table::as.data.table() and as.data.frame(); row names of a matrix or data frame component are always kept, in a first column term.

component

name or number of the component to convert (default: the first one).

Value

print() returns x invisibly; summary() an object of class summary.stab_result; format() a character string; as.data.table() and as.data.frame() the chosen component as a table; plot() a ggplot object.

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)


AMMI stability value and yield stability index

Description

stab_asv() computes the AMMI stability value (ASV) of Purchase et al. (2000), which combines the genotype scores of the first two AMMI axes weighted by the share of the interaction each axis explains, and the yield stability index (YSI) of Farshadfar (2008), the sum of the ranks of the ASV and of the mean.

Usage

stab_asv(.data, .y, .rep, .gen, .env)

## Default S3 method:
stab_asv(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

With the AMMI genotype scores PC_{i1}, PC_{i2} (ammi) and the sums of squares SS_1, SS_2 of the two axes (SS_n \propto \lambda_n^2),

ASV_i = \sqrt{\left(\frac{SS_1}{SS_2}PC_{i1}\right)^2 + PC_{i2}^2}, \qquad YSI_i = R(ASV_i) + R(\bar{y}_{i\cdot}),

where R(ASV_i) = 1 for the smallest ASV (the most stable genotype) and R(\bar{y}_{i\cdot}) = 1 for the highest mean. The genotype with the smallest YSI is the most desirable. The formula is the one used by agricolae and metan.

Changes from the earlier version. The weight was the ratio of the singular values \lambda_1/\lambda_2 applied to the squared score, instead of the ratio of the sums of squares applied to the score; and the stability values were paired with other genotypes' means unless the data were sorted by genotype.

Value

An object of class c("stab_asv", "stab_result", "list") with the component of earlier versions:

ASD

data.table sorted by YSI: Gen, Mean, ASD (the ASV), rMean, rASD, YSI; new columns PC1, PC2 (the scores).

Methods: print(), summary(), plot() (which = c("ranks", "mean")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Purchase, J. L., Hatting, H. and van Deventer, C. S. (2000). Genotype x environment interaction of winter wheat (Triticum aestivum L.) in South Africa: II. Stability analysis of yield performance. South African Journal of Plant and Soil, 17(3), 101–107.

Farshadfar, E. (2008). Incorporation of AMMI stability value and grain yield in a single non-parametric index (GSI) in bread wheat. Pakistan Journal of Biological Sciences, 11(14), 1791–1796.

See Also

stab_masv, stab_dist, ammi, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_asv(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
head(fit$ASD)
plot(x = fit, which = c("ranks", "mean")[1])

AMMI stability distance

Description

stab_dist() measures the stability of every genotype by the distance of its point from the origin in the space of the first .m AMMI interaction axes, and combines its rank with the rank of the mean. The measure was developed by the author of the package (Muhammad Yaseen) for this package: unlike the ASV and the MASV it weighs the axes through the scores alone, so that no axis is up-weighted by the ratio of its sum of squares to that of the next axis.

Usage

stab_dist(.data, .y, .rep, .gen, .env, .m = 2L)

## Default S3 method:
stab_dist(.data, .y, .rep, .gen, .env, .m = 2L)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

.m

number of interaction axes (default 2).

Details

With the AMMI genotype scores PC_{in} = \gamma_{in}\sqrt{\lambda_n} (ammi),

D_i = \sqrt{\sum_{n=1}^{m} PC_{in}^2}, \qquad YSI^{D}_i = R(D_i) + R(\bar{y}_{i\cdot}),

with ranks as in stab_asv. A genotype near the origin contributes little to the interaction. Each axis enters with the weight \lambda_n, since D_i^2 = \sum_n \lambda_n\gamma_{in}^2; the axes beyond .m, mostly noise, are left out. Choose .m as the number of significant axes in ammi().

Change from the earlier version. The distances were paired with other genotypes' means unless the data were sorted by genotype.

Value

An object of class c("stab_dist", "stab_result", "list") with the component of earlier versions:

stabDist

data.table sorted by YSIDist: Gen, Mean, Dist, rMean, rDist, YSIDist.

Methods: print(), summary(), plot() (which = c("ranks", "mean")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Gauch, H. G. (1992). Statistical Analysis of Regional Yield Trials: AMMI Analysis of Factorial Designs. Elsevier, Amsterdam.

See Also

stab_asv, ammi, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_dist(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    , .m    = 2
    )
head(fit$stabDist)

Eskridge's safety-first selection indices

Description

stab_eskridge() computes the four safety-first selection indices of Eskridge (1990). Each index is a lower confidence limit of a genotype's yield: the mean minus a multiple of a stability measure. The breeder who wants a small probability alpha of a disastrously low yield prefers the genotype with the largest index (Kataoka's safety-first rule). The indices weigh yield against stability explicitly through alpha.

Usage

stab_eskridge(.data, .y, .rep, .gen, .env, alpha = 0.05)

## Default S3 method:
stab_eskridge(.data, .y, .rep, .gen, .env, alpha = 0.05)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

alpha

probability of a disastrously low yield that the breeder accepts (default 0.05).

Details

With Z = Z_{1-\alpha}, the 1 - \alpha quantile of the standard normal distribution, the table of means \bar{y}_{ij} of G genotypes in E environments and the environment index I_j = \bar{y}_{\cdot j} - \bar{y}:

EV_i = \bar{y}_{i\cdot} - Z\,S_i, \qquad FW_i = \bar{y}_{i\cdot} - Z\left[(b_i - 1)^2 S_y^2 (1 - 1/E) \right]^{1/2},

SH_i = \bar{y}_{i\cdot} - Z\left[\hat{\sigma}^2_E + \hat{\sigma}^2_i\right]^{1/2}, \qquad ER_i = \bar{y}_{i\cdot} - Z\left[(b_i - 1)^2 S_y^2 (1 - 1/E) + S^2_{d_i}\right]^{1/2},

where S^2_i = \sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot})^2/(E - 1) is the variance over environments, b_i = \sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot})I_j/\sum_j I_j^2 Finlay and Wilkinson's slope, S_y^2 = \sum_j I_j^2/(E - 1) the variance of the environment means, \hat{\sigma}^2_i Shukla's stability variance, \hat{\sigma}^2_E = [MS(E) - MS(GE)]/G the environmental variance component with MS(E) = G\sum_j I_j^2/(E - 1) and MS(GE) = \sum_{ij} z_{ij}^2/((G - 1)(E - 1)), and S^2_{d_i} = [\sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot})^2 - b_i^2 \sum_j I_j^2]/(E - 2) the mean square of the deviations from regression (Eskridge 1990, Table 1).

The four indices rest on four definitions of stability (Lin et al. 1986): EV on the variance over environments (type 1), FW and SH on the response relative to the other genotypes (type 2), ER on type 2 and the unpredictable deviations (type 3). EV favours genotypes that vary little, whatever the environments; FW, SH and ER favour genotypes that follow the average response. Small alpha weighs stability heavily (a breeder or farmer who cannot afford a poor yield); alpha near 0.5 (Z = 0) reduces every index to the mean. Eskridge used \alpha = 0.05 and notes that subsistence farmers have shown Z between 0.5 and 1.5 (\alpha between 0.30 and 0.05).

Value

An object of class c("stab_eskridge", "stab_result", "list"):

Eskridge

data.table sorted by ER: Gen, Mean, EV, FW, SH, ER and their ranks rMean, rEV, rFW, rSH, rER (1 = largest).

Parameters

data.table: Gen, Mean, S2 (variance over environments), b (slope), Sigma2 (Shukla's variance), S2d (deviation mean square).

Constants

named vector: z, S2y, Sigma2E, alpha.

RankCor

matrix of Kendall's rank correlations between the mean and the four indices (Eskridge's Table 5).

Methods: print(), summary(), plot() (which = c("indices", "ranks")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Eskridge, K. M. (1990). Selection of stable cultivars using a safety-first rule. Crop Science, 30(2), 369–374.

Kataoka, S. (1963). A stochastic programming model. Econometrica, 31(1–2), 181–196.

Lin, C. S., Binns, M. R. and Lefkovitch, L. P. (1986). Stability analysis: where do we stand? Crop Science, 26(5), 894–900.

See Also

stab_reliability, stab_measures, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_eskridge(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    , alpha = 0.05
    )
head(fit$Eskridge)
fit$RankCor
plot(x = fit, which = c("indices", "ranks")[1])

Fox's top-third ranking

Description

stab_fox() counts, for every genotype, the environments in which its mean ranks in the top third of all genotypes (Fox et al. 1990). A genotype often in the top third is widely adapted; the count needs no assumption about the distribution of yield.

Usage

stab_fox(.data, .y, .rep, .gen, .env)

## Default S3 method:
stab_fox(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

In environment j the genotypes are ranked by their means \bar{y}_{ij} (1 = highest); with T = \lceil G/3 \rceil,

TOP_i = \#\{j : R_j(\bar{y}_{ij}) \le T\},

which lies between 0 and E.

Change from the earlier version. The earlier version ranked the single plots and counted plots, so that TOP could exceed the number of environments (it reached 12 with 11 environments in ge_data); the ranking is now of the genotype means in each environment, as Fox et al. define it.

Value

An object of class c("stab_fox", "stab_result", "list") with the component of earlier versions:

Fox

data.table sorted by TOP and mean: Gen, Mean, TOP, and the new column TOP.pct (percent of the environments).

Methods: print(), summary(), plot() (counts as bars), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Fox, P. N., Skovmand, B., Thompson, B. K., Braun, H. J. and Cormier, R. (1990). Yield and adaptation of hexaploid spring triticale. Euphytica, 47(1), 57–64.

See Also

ge_means, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_fox(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
head(fit$Fox)
plot(x = fit)

Huehn's nonparametric stability statistics

Description

stab_huehn() computes Huehn's (1979) nonparametric stability statistics S^{(1)}_i (mean absolute rank difference over pairs of environments) and S^{(2)}_i (variance of the ranks) from the ranks of the genotypes in each environment after removing the genotype main effect, with the tests of Nassar and Huehn (1987). A stable genotype keeps its rank: its statistics are small.

Usage

stab_huehn(.data, .y, .rep, .gen, .env)

## Default S3 method:
stab_huehn(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

The ranks r_{ij} (1 = smallest) are those of the corrected values \bar{y}_{ij} - \bar{y}_{i\cdot} + \bar{y} within environment j, so that only the interaction moves a genotype's rank; with \bar{r}_i the mean rank of genotype i,

S^{(1)}_i = \frac{2\sum_{j<j'}|r_{ij} - r_{ij'}|}{E(E - 1)}, \qquad S^{(2)}_i = \frac{\sum_j(r_{ij} - \bar{r}_i)^2}{E - 1}.

Under the hypothesis of equal stability (Nassar and Huehn 1987)

E(S^{(1)}) = \frac{G^2 - 1}{3G}, \quad \mathrm{Var}(S^{(1)}) = \frac{(G^2 - 1)[(G^2 - 4)(E - 1) + 30]}{45G^2E}, \quad E(S^{(2)}) = \frac{G^2 - 1}{12}, \quad \mathrm{Var}(S^{(2)}) = \frac{(G^2 - 1)[2(G^2 - 4)(E - 1) + 5(G^2 - 1)]}{360E(E - 1)},

and Z_i = (S_i - E(S))^2/\mathrm{Var}(S) is approximately chi-square with one degree of freedom; the sum of the Z_i over genotypes, chi-square with G degrees of freedom, tests whether the genotypes differ in stability.

Value

An object of class c("stab_huehn", "stab_result", "list"):

Huehn

data.table sorted by S1: Gen, Mean, MeanRank, S1, Z1, p.Z1, S2, Z2, p.Z2, rS1, rS2.

Tests

data frame: the sums of Z for S^{(1)} and S^{(2)}, their degrees of freedom and p-values.

Methods: print(), summary(), plot(), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Huehn, M. (1979). Beitrage zur Erfassung der phanotypischen Stabilitat I. Vorschlag einiger auf Ranginformationen beruhenden Stabilitatsparameter. EDV in Medizin und Biologie, 10, 112–117.

Nassar, R. and Huehn, M. (1987). Studies on estimation of phenotypic stability: tests of significance for nonparametric measures of phenotypic stability. Biometrics, 43(1), 45–53.

See Also

stab_fox, stab_kang, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_huehn(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
head(fit$Huehn)
fit$Tests

Interpretation of a stability analysis

Description

stab_interpret() turns the result of any analysis of the package into a plain-language interpretation written for that method: what the tests say, which genotypes are high-yielding and stable, which are specifically adapted and to which environments, which environments discriminate, and what to check before acting on the results. Every statement is computed from the numbers of the result, so the interpretation is reproducible and needs no connection to any service.

Usage

stab_interpret(x, higher_better = TRUE, top = 5L, ...)

## S3 method for class 'stab_interpretation'
print(x, ...)

## S3 method for class 'stab_interpretation'
format(x, style = c("text", "markdown"), width = getOption("width", 80L), ...)

Arguments

x

a result of an analysis of the package (or the ggplot returned by gge_biplot).

higher_better

TRUE (default) when larger values of the trait are better (yield); FALSE for traits such as days to maturity or disease score. The rankings built into the stability indices assume larger is better; with FALSE the interpretation says so.

top

number of genotypes named in lists (default 5).

...

unused.

style

"text" (default) or "markdown".

width

line width of the text (default getOption("width")).

Details

The interpretation is built from the facts of the result (test results, rankings, classes of genotypes and environments), each a named element of the component facts, and from rules that are specific to the method:

The component guide explains how the statistics of the method are read; with facts it is the material for a longer written interpretation (for instance in the application of the companion package).

Value

An object of class "stab_interpretation": a list with analysis (the class of the result), title, headline (one sentence), findings, recommendations and cautions (character vectors of sentences), facts (named list of the numbers behind the sentences) and guide (how to read the method). print() shows the text; format(x, style = "markdown") returns it as Markdown.

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

See Also

The analyses: add_anova, stab_reg, ammi, gge_biplot.

Examples

data(ge_data)
fit <-
  stab_reg(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
txt <-
  stab_interpret(
      x             = fit
    , higher_better = TRUE
    , top           = 5
    )
txt
txt$facts$widely_adapted
cat(format(x = txt, style = "markdown"))

Kang's rank-sum of yield and stability variance

Description

stab_kang() ranks the genotypes by mean (1 = highest) and by Shukla's stability variance (1 = smallest) and adds the two ranks (Kang 1988); the genotype with the smallest rank-sum combines high yield with stability.

Usage

stab_kang(.data, .y, .rep, .gen, .env)

## Default S3 method:
stab_kang(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

RS_i = R(\bar{y}_{i\cdot}) + R(\sigma^2_i),

with R(\bar{y}_{i\cdot}) = 1 for the highest mean, R(\sigma^2_i) = 1 for the smallest stability variance (see stab_measures); ties take the smallest rank. Both parts weigh equally.

Change from the earlier version. The earlier version paired the means (in the order of the data) with the stability variances (in the order of the genotype levels), so the stability variance and its rank belonged to another genotype unless the data were sorted by genotype.

Value

An object of class c("stab_kang", "stab_result", "list") with the component of earlier versions:

Kang

data.table sorted by rank-sum: Gen, Mean, ShuklaVar, rMean, rShukaVar (rank of the stability variance; the name of earlier versions), rStab (rank-sum).

Methods: print(), summary(), plot() (ranks of yield and stability), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Kang, M. S. (1988). A rank-sum method for selecting high-yielding, stable corn genotypes. Cereal Research Communications, 16(1–2), 113–115.

Shukla, G. K. (1972). Some statistical aspects of partitioning genotype-environmental components of variability. Heredity, 29(2), 237–245. doi:10.1038/hdy.1972.87

See Also

stab_par (Kang's yield-stability statistic), stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_kang(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
head(fit$Kang)
plot(x = fit)

Modified AMMI stability value

Description

stab_masv() computes the modified AMMI stability value (MASV) of Zali et al. (2012), which extends the ASV (stab_asv) beyond the first interaction axis, and its yield stability index. The earlier versions of the package computed it on two axes (.m = 2); the package author (Muhammad Yaseen) extended the function to any number of axes .m, from 2 up to the number of non-zero interaction axes.

Usage

stab_masv(.data, .y, .rep, .gen, .env, .m = 2L)

## Default S3 method:
stab_masv(.data, .y, .rep, .gen, .env, .m = 2L)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

.m

number of interaction axes (default 2).

Details

With the genotype scores PC_{in} and the sums of squares SS_n of the axes (SS_n \propto \lambda_n^2),

MASV_i = \sqrt{\sum_{n=1}^{m-1}\frac{SS_n}{SS_{n+1}}PC_{in}^2 + PC_{im}^2}, \qquad MYSI_i = R(MASV_i) + R(\bar{y}_{i\cdot}),

with m = .m axes; ranks as in stab_asv. Each axis is weighted by the ratio of its sum of squares to that of the next, so the first axes dominate; choose .m as the number of significant axes in ammi().

Changes from the earlier version. The weights were the ratios of the singular values \lambda_n/\lambda_{n+1} instead of the ratios of the sums of squares; the stability values were paired with other genotypes' means unless the data were sorted by genotype.

Value

An object of class c("stab_masv", "stab_result", "list") with the component of earlier versions:

MASD

data.table sorted by MYSI: Gen, Mean, MASD (the MASV), rMean, rMASD, MYSI.

Methods: print(), summary(), plot() (which = c("ranks", "mean")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Zali, H., Farshadfar, E., Sabaghpour, S. H. and Karimizadeh, R. (2012). Evaluation of genotype x environment interaction in chickpea using measures of stability from AMMI model. Annals of Biological Research, 3(7), 3126–3136.

See Also

stab_asv, ammi, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_measures(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_masv(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    , .m    = 2
    )
head(fit$MASD)

Variance-based stability measures: environmental variance, ecovalence and stability variance

Description

stab_measures() computes, for every genotype, its mean over environments, the variance and coefficient of variation of its means over environments (the static or biological concept of stability), Wricke's (1962) ecovalence and Shukla's (1972) stability variance (the dynamic or agronomic concept), with plots of the mean against each measure.

Usage

stab_measures(.data, .y, .gen, .env)

## Default S3 method:
stab_measures(.data, .y, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

With the table of means \mathbf{Y} = (\bar{y}_{ij}) and the interaction effects z_{ij} = \bar{y}_{ij} - \bar{y}_{i\cdot} - \bar{y}_{\cdot j} + \bar{y}:

S^2_i = \frac{\sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot})^2}{E - 1}, \qquad CV_i = 100\,\frac{S_i}{\bar{y}_{i\cdot}}, \qquad W_i = \sum_j z_{ij}^2, \qquad \sigma^2_i = \frac{G(G - 1)W_i - \sum_k W_k}{(E - 1)(G - 1)(G - 2)}.

The measures are on the scale of the means; multiply W_i and \sigma^2_i by the number of replicates for the scale of the plots. Small S^2_i means a genotype that yields alike everywhere (often a poor responder); small W_i and \sigma^2_i mean a genotype that follows the environment means closely, its share of the interaction being small. A negative \sigma^2_i is taken as zero.

Value

An object of class c("stab_measures", "stab_result", "list") with the components of earlier versions:

StabMeasures

data.table, one row per genotype: Gen, Mean, GenSS (sum of squares of the genotype's means over environments), Var, CV, Ecov (W_i), ShuklaVar (\sigma^2_i).

MeanVarPlot, MeanEcovPlot, MeanShuklaVarPlot

ggplots of the mean against each measure.

Methods: print(), summary(), plot() (which = c("var", "ecov", "shukla")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Wricke, G. (1962). Uber eine Methode zur Erfassung der okologischen Streubreite in Feldversuchen. Zeitschrift fur Pflanzenzuchtung, 47, 92–96.

Shukla, G. K. (1972). Some statistical aspects of partitioning genotype-environmental components of variability. Heredity, 29(2), 237–245. doi:10.1038/hdy.1972.87

Becker, H. C. and Leon, J. (1988). Stability analysis in plant breeding. Plant Breeding, 101(1), 1–23.

See Also

stab_par, stab_kang, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_par(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_measures(
      .data = ge_data
    , .y    = Yield
    , .gen  = Gen
    , .env  = Env
    )
head(fit$StabMeasures)
plot(x = fit, which = c("var", "ecov", "shukla")[2])

Notation of stability

Description

The symbols used in the help pages and vignettes of stability, with their meaning and the argument or result component that holds them. The notation follows one rule throughout: scalars are upper-case letters in normal face (P, R), indices lower-case italic (i, j), vectors lower-case bold (\mathbf{y}, \boldsymbol{\beta}) and matrices upper-case bold (\mathbf{X}, \boldsymbol{\Sigma}).

Usage

stab_notation(format = c("table", "path", "tex"))

Arguments

format

"table" (default: a data.table with columns symbol (LaTeX), text (plain text), kind (scalar, index, vector, matrix, set, function, operator), meaning and argument), "path" (the path of notation.csv) or "tex" (the path of Notations.tex, the notation appendix used in the articles).

Value

See format.

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)

See Also

Other stability utilities: stab_reference(), stab_save(), stab_theme()

Examples

stab_notation(
    format = c("table", "path", "tex")[1]
  )

Stability parameters with Shukla's tests and Kang's yield-stability statistic

Description

stab_par() gives Shukla's (1972) analysis of the genotype-by-environment interaction (its split into a heterogeneity part explained by an environmental covariate and a residual), the stability parameters of every genotype with F tests of Shukla's stability variance, and Kang's (1993) yield-stability statistic YS_i for selecting genotypes that are high-yielding and stable at the same time.

Usage

stab_par(.data, .y, .rep, .gen, .env, alpha = 0.1, .envCov = NULL)

## Default S3 method:
stab_par(.data, .y, .rep, .gen, .env, alpha = 0.1, .envCov = NULL)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate (block within environment): a column of .data or a vector, as for .y.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

alpha

level of the weakest significance that lowers the stability rating by 2 (default 0.1).

.envCov

environmental covariate: a column of .data (or a vector of length nrow(.data)) with one value per environment (rainfall, an index measured independently); NULL (default) uses the environment index.

Details

Stability parameters (on the scale of the means; see stab_measures): the mean, the sum of squares, variance and CV over environments, Wricke's ecovalence W_i, Shukla's stability variance \sigma^2_i, and Shukla's s^2_i, the stability variance left after removing the linear effect of a covariate c_j (the environment index \bar{y}_{\cdot j} - \bar{y} when no covariate is given): with \hat{b}_i = \sum_j z_{ij}(c_j - \bar{c})/\sum_j(c_j - \bar{c})^2 and S_i = \sum_j(z_{ij} - \hat{b}_i(c_j - \bar{c}))^2,

s^2_i = \frac{G}{(G - 2)(E - 2)}\left(S_i - \frac{\sum_k S_k}{G(G - 1)}\right).

Each is tested by F = \sigma^2_i/(s^2/B) (respectively s^2_i/(s^2/B)) on E - 1 (E - 2) and f_e degrees of freedom; the columns . and .. code the result: ns, * (p < 0.05), ** (p < 0.01).

Analysis of variance (on the scale of the plots): genotypes, environments and interaction; the interaction split into heterogeneity (G - 1 degrees of freedom; B\sum_i\hat{b}_i^2\sum_j(c_j - \bar{c})^2) and residual ((G - 1)(E - 2); B\sum_i S_i); and the pooled error.

Kang's yield-stability statistic. Rank the means in ascending order (the highest mean gets rank G); with LSD = t_{0.025, f_e}\sqrt{2s^2/(BE)} add +1, +2 or +3 when the mean exceeds the grand mean by less than one, at least one, or at least two LSD, and -1, -2 or -3 when it is below it by less than one, at least one, or at least two LSD; add the stability rating -8, -4 or -2 when \sigma^2_i is significant at 0.01, 0.05 or alpha (0 otherwise). Genotypes with YS_i above the mean of YS are selected.

Changes from the earlier version. The stability parameters were divided by the number of replicates (the means, variances and coefficients of variation too); the pooled error had (G - 1)^2E degrees of freedom; the stability rating for significance at alpha was +2 instead of -2; the LSD used a one-sided t; a covariate given in .envCov was used plot by plot instead of once per environment. All are corrected.

Value

An object of class c("stab_par", "stab_result", "list") with the components of earlier versions:

ANOVA

analysis of variance (class anova): Total, Gen, Env, Gen x Env, Heterogeneity, Residual, Pooled error.

StabPar

data.table: Gen, Mean, GenSS, Var, CV, Ecov, GE.SS, GE.MSE, Sigma (\sigma^2_i), . (its test), SP (s^2_i), .. (its test); new columns p.Sigma and p.SP.

SimultSel

data.table sorted by YSi: Gen, Mean, Rank, Adjustment, Adj.Rank, Sigma, Stab.Rating, YSi, Select ("+" selected).

Methods: print(), summary(), plot() (which = c("ys", "sigma")), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Shukla, G. K. (1972). Some statistical aspects of partitioning genotype-environmental components of variability. Heredity, 29(2), 237–245. doi:10.1038/hdy.1972.87

Kang, M. S. and Pham, H. N. (1991). Simultaneous selection for high yielding and stable crop genotypes. Agronomy Journal, 83(1), 161–165. doi:10.2134/agronj1991.00021962008300010037x

Kang, M. S. (1993). Simultaneous selection for yield and stability in crop performance trials: consequences for growers. Agronomy Journal, 85(3), 754–757.

See Also

stab_measures, stab_kang, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_reg(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_par(
      .data   = ge_data
    , .y      = Yield
    , .rep    = Rep
    , .gen    = Gen
    , .env    = Env
    , alpha   = 0.1
    , .envCov = NULL
    )
fit$ANOVA
head(fit$SimultSel)
plot(x = fit, which = c("ys", "sigma")[1])

Published values used by the tests and vignettes

Description

Reads inst/extdata/reference.csv: one row per published number, with its source, the R call that recomputes it with this package (call), the expression that extracts the number from the result (extract, in terms of x), the printed value and the digits to compare. The same file drives the test of published values and the vignette that reproduces the published examples. Each distinct call is evaluated once.

Usage

stab_reference(source = NULL, evaluate = FALSE, level = 1)

Arguments

source

optional regular expression; keep rows whose source matches.

evaluate

logical; evaluate the rows and add columns computed and agrees (default FALSE).

level

largest level evaluated (1 = fast rows, 2 = slow rows; default 1); rows above it get NA.

Value

A data.table with columns id, source, quantity, call, extract, value, digits, level, note (and computed, agrees).

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)

See Also

Other stability utilities: stab_notation(), stab_save(), stab_theme()

Examples

ref <-
  stab_reference(
      source   = NULL
    , evaluate = FALSE
    , level    = 1
    )
ref

stab_reference(
    source   = "."
  , evaluate = TRUE
  , level    = 1
  )


Finlay and Wilkinson's regression of each genotype on the environment index

Description

stab_reg() regresses the mean of each genotype in each environment on the environment index (the mean of all genotypes in that environment minus the grand mean), as proposed by Finlay and Wilkinson (1963). The slope describes how a genotype responds to better environments; the deviations from the line describe how predictable that response is.

Usage

stab_reg(.data, .y, .rep, .gen, .env)

## Default S3 method:
stab_reg(.data, .y, .rep, .gen, .env)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: as for .y; optional (needed for Delta and its test).

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

Details

With the environment index I_j = \bar{y}_{\cdot j} - \bar{y} the fitted line of genotype i is \bar{y}_{ij} = \mu_i + \beta_i I_j + \delta_{ij} with

\hat{\beta}_i = \frac{\sum_j \bar{y}_{ij}I_j}{\sum_j I_j^2}, \qquad \mathrm{SE}(\hat{\beta}_i) = \sqrt{\frac{\sum_j\hat{\delta}_{ij}^2}{(E - 2)\sum_j I_j^2}}, \qquad t = \frac{\hat{\beta}_i - 1}{\mathrm{SE}(\hat{\beta}_i)},

the confidence limits \hat{\beta}_i \pm t_{0.975, E - 2}\,\mathrm{SE}(\hat{\beta}_i), the coefficient of determination R^2_i and, when replicates are given, Eberhart and Russell's deviation variance S^2_{d_i} = \sum_j\hat{\delta}_{ij}^2/(E - 2) - s^2/B with the test F = (\sum_j\hat{\delta}_{ij}^2/(E - 2))/(s^2/B) on E - 2 and f_e degrees of freedom.

Finlay and Wilkinson read the slope against the mean: \beta_i \approx 1 with a high mean indicates general adaptability; \beta_i > 1 a genotype that profits from favourable environments; \beta_i < 1 one that resists unfavourable environments.

Changes from the earlier version. The rows of the earlier table paired the genotype means (in the order of the data) with the slopes (in the order of the genotype levels), so that the slope shown for a genotype belonged to another one unless the data were sorted by genotype; the column Delta (deviation sum of squares divided by the number of replicates) is now S^2_{d_i}; the confidence limits use the deviations of each genotype (not those pooled over genotypes). The regression is computed in closed form.

Value

An object of class c("stab_reg", "stab_result", "list") with the components of earlier versions:

StabIndvReg

data.table, one row per genotype (in the order of the genotype levels): Gen, Mean, Slope, SE, LCI, UCI, t.b1, p.b1 (test of slope 1), R.Sqr, RMSE, SSE (deviation sum of squares), Delta (S^2_{d_i}) and p.Delta (its test).

MeanSlopePlot

ggplot of the mean against the slope.

Methods: print(), summary(), plot() (which = c("slope", "lines", "residuals", "qq"); "lines" draws the fitted line of every genotype), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Finlay, K. W. and Wilkinson, G. N. (1963). The analysis of adaptation in a plant-breeding programme. Australian Journal of Agricultural Research, 14(6), 742–754. doi:10.1071/AR9630742

Eberhart, S. A. and Russell, W. A. (1966). Stability parameters for comparing varieties. Crop Science, 6(1), 36–40. doi:10.2135/cropsci1966.0011183X000600010011x

See Also

er_anova, stab_par, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reliability(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_reg(
      .data = ge_data
    , .y    = Yield
    , .rep  = Rep
    , .gen  = Gen
    , .env  = Env
    )
head(fit$StabIndvReg)
plot(x = fit, which = c("slope", "lines", "residuals", "qq")[1])
stab_interpret(
    x             = fit
  , higher_better = TRUE
  , top           = 5L
  )

Annicchiarico's reliability index

Description

stab_reliability() computes the genotypic reliability index of Annicchiarico (1992): the lower confidence limit of a genotype's yield expressed in percent of the environment means. Like Eskridge's safety-first indices it gives the yield that a genotype exceeds with probability 1 - \alpha, but on a relative scale, so that environments of high and low yield weigh alike.

Usage

stab_reliability(
  .data,
  .y,
  .rep,
  .gen,
  .env,
  alpha = 0.25,
  higher_better = TRUE
)

## Default S3 method:
stab_reliability(
  .data,
  .y,
  .rep,
  .gen,
  .env,
  alpha = 0.25,
  higher_better = TRUE
)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

alpha

probability that the yield falls below the index (default 0.25).

higher_better

TRUE (default) when larger values of the trait are better.

Details

With r_{ij} = 100\,\bar{y}_{ij}/\bar{y}_{\cdot j}, the mean \bar{r}_i and standard deviation s_i of the r_{ij} over environments,

I_i = \bar{r}_i - Z_{1-\alpha}\,s_i.

I_i = 95 with \alpha = 0.25 means that the genotype yields at least 95 percent of the environment mean in three environments out of four. Annicchiarico used \alpha from 0.05 to 0.25. For a trait where lower values are better (higher_better = FALSE) the upper limit \bar{r}_i + Z\,s_i is given, and smaller is better.

Value

An object of class c("stab_reliability", "stab_result", "list"):

Reliability

data.table sorted by the index: Gen, Mean, Rel.Mean (mean relative performance, percent), Rel.SD, Index, rIndex (1 = best).

Methods: print(), summary(), plot(), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Annicchiarico, P. (1992). Cultivar adaptation and recommendation from alfalfa trials in Northern Italy. Journal of Genetics and Breeding, 46, 269–278.

See Also

stab_eskridge, stab_superiority, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_superiority()

Examples

data(ge_data)
fit <-
  stab_reliability(
      .data         = ge_data
    , .y            = Yield
    , .rep          = Rep
    , .gen          = Gen
    , .env          = Env
    , alpha         = 0.25
    , higher_better = TRUE
    )
head(fit$Reliability)

Save a figure (vector PDF by default)

Description

A wrapper of ggsave with the defaults of the package: a vector PDF through cairo_pdf (embedded fonts, correct glyphs), A4 landscape (11.69 x 8.27 inches) and 600 dpi for raster formats. The device follows the file extension for other formats (.png, .svg, .tiff, ...).

Usage

stab_save(
  plot = ggplot2::last_plot(),
  filename,
  path = NULL,
  width = 11.69,
  height = 8.27,
  units = c("in", "cm", "mm"),
  dpi = 600,
  scale = 1,
  device = NULL,
  limitsize = TRUE,
  ...
)

Arguments

plot

a ggplot object, for example the result of plot() on a stability result (default: the last plot).

filename

file name; its extension chooses the format.

path

directory to save in (default NULL: the working directory or the path in filename).

width, height

size (default 11.69 x 8.27, A4 landscape, in units).

units

"in" (default), "cm" or "mm".

dpi

resolution for raster formats (default 600).

scale

multiplicative scaling factor (default 1).

device

NULL (default: cairo_pdf for .pdf, otherwise chosen from the extension) or a device function or name, passed to ggsave().

limitsize

logical; refuse images larger than 50 x 50 inches (default TRUE).

...

passed to ggsave.

Value

The file name, invisibly.

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)

See Also

Other stability utilities: stab_notation(), stab_reference(), stab_theme()

Examples

library(ggplot2)
p <-
  ggplot(data = data.frame(x = 1:10, y = (1:10)^2), mapping = aes(x = x, y = y)) +
  geom_line() +
  stab_theme(
      base_size       = 11
    , base_family     = "serif"
    , ticks_inward    = TRUE
    , legend_position = "bottom"
    )
f <- tempfile(fileext = ".pdf")
stab_save(
    plot      = p
  , filename  = f
  , path      = NULL
  , width     = 11.69
  , height    = 8.27
  , units     = c("in", "cm", "mm")[1]
  , dpi       = 600
  , scale     = 1
  , device    = NULL
  , limitsize = TRUE
  )
stab_save(
    plot      = p
  , filename  = basename(f)
  , path      = tempdir()
  , width     = 11.69
  , height    = 8.27
  , units     = c("in", "cm", "mm")[1]
  , dpi       = 600
  , scale     = 1
  , device    = grDevices::cairo_pdf
  , limitsize = TRUE
  )
stab_save(
    plot      = p
  , filename  = tempfile(fileext = ".png")
  , path      = NULL
  , width     = 6
  , height    = 4
  , units     = c("in", "cm", "mm")[1]
  , dpi       = 300
  , scale     = 1
  , device    = NULL
  , limitsize = TRUE
  )

Lin and Binns' superiority measure

Description

stab_superiority() computes the cultivar superiority measure P_i of Lin and Binns (1988): the mean squared distance between a genotype and the best genotype of each environment. A small P_i marks a genotype that is close to the best everywhere, so the measure combines yield and stability in one number. It is split into a genotype part (distance of the genotype's mean from the mean of the best) and an interaction part.

Usage

stab_superiority(.data, .y, .rep, .gen, .env, higher_better = TRUE)

## Default S3 method:
stab_superiority(.data, .y, .rep, .gen, .env, higher_better = TRUE)

Arguments

.data

a data frame (or data.table) with one row per plot.

.y

response: a column of .data given by name (.y = Yield or .y = "Yield") or a numeric vector of length nrow(.data).

.rep

replicate: not used (kept for compatibility); may be omitted.

.gen

genotype: a column of .data or a vector, as for .y.

.env

environment: a column of .data or a vector, as for .y.

higher_better

TRUE (default) when larger values of the trait are better.

Details

With M_j = \max_i \bar{y}_{ij} the best mean of environment j (the smallest when higher_better = FALSE),

P_i = \frac{\sum_j(\bar{y}_{ij} - M_j)^2}{2E} = \underbrace{\frac{E(\bar{y}_{i\cdot} - \bar{M})^2}{2E}}_{ \mathrm{genetic}} + \underbrace{\frac{\sum_j(\bar{y}_{ij} - \bar{y}_{i\cdot} - M_j + \bar{M})^2}{2E}}_{ \mathrm{interaction}},

with \bar{M} the mean of the M_j. Genotypes with the smallest P_i are the most desirable; a large interaction part shows that a genotype is close to the best in some environments only.

Value

An object of class c("stab_superiority", "stab_result", "list"):

Superiority

data.table sorted by Pi: Gen, Mean, Pi, Pi.Gen (genetic part), Pi.GE (interaction part), rPi (rank, 1 = best).

Methods: print(), summary(), plot(), stab_interpret().

Author(s)

Muhammad Yaseen (myaseen208@gmail.com), Kent M. Eskridge (keskridge1@unl.edu)

References

Lin, C. S. and Binns, M. R. (1988). A superiority measure of cultivar performance for cultivar x location data. Canadian Journal of Plant Science, 68(1), 193–198.

See Also

stab_reliability, stab_eskridge, stab_interpret

Other stability analyses: add_anova(), ammi(), ammi_biplot(), er_anova(), ge_effects(), ge_means(), gge_biplot(), indiv_anova(), stab_asv(), stab_dist(), stab_eskridge(), stab_fox(), stab_huehn(), stab_kang(), stab_masv(), stab_measures(), stab_par(), stab_reg(), stab_reliability()

Examples

data(ge_data)
fit <-
  stab_superiority(
      .data         = ge_data
    , .y            = Yield
    , .rep          = Rep
    , .gen          = Gen
    , .env          = Env
    , higher_better = TRUE
    )
head(fit$Superiority)
plot(x = fit)

ggplot2 theme of stability

Description

The theme used by every plot() method of stability (identical in all packages of the author): theme_classic with a serif font, black axis lines, ticks pointing inwards and no grid, close to the look of TikZ/pgfplots figures in LaTeX documents. The plot() methods also use scales::pretty_breaks(n = 10) on every continuous axis. Save figures with stab_save.

Usage

stab_theme(
  base_size = 11,
  base_family = "serif",
  ticks_inward = TRUE,
  legend_position = "bottom"
)

Arguments

base_size

base font size in points (default 11).

base_family

font family (default "serif"; for example "Latin Modern Roman" when installed, to match LaTeX documents).

ticks_inward

logical; ticks point into the panel, as in pgfplots (default TRUE).

legend_position

position of the legend (default "bottom").

Value

A ggplot2 theme.

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)

See Also

Other stability utilities: stab_notation(), stab_reference(), stab_save()

Examples

library(ggplot2)
p <-
  ggplot(data = data.frame(x = 1:20, y = cumsum(sin(1:20))), mapping = aes(x = x, y = y)) +
  geom_line()
p +
  stab_theme(
      base_size       = 11
    , base_family     = "serif"
    , ticks_inward    = TRUE
    , legend_position = "bottom"
    )
p +
  stab_theme(
      base_size       = 12
    , base_family     = "serif"
    , ticks_inward    = FALSE
    , legend_position = "right"
    ) +
  scale_x_continuous(breaks = scales::pretty_breaks(n = 10))