deviation_mean_squares calculate variance of a genotype across environments.

deviation_mean_squares(
  data,
  trait,
  genotype,
  environment,
  unit.correct = FALSE
)

Arguments

data

a dataframe containing trait, genotype and environment.

trait

colname of a column containing a numeric vector of interested trait to be analysized.

genotype

colname of a column containing a character or factor vector labeling different genotypic varieties

environment

colname of a column containing a character or factor vector labeling different environments

unit.correct

logical, default is FALSE, returning the stability index with unit equals to squared unit of trait; when TRUE, returning stability index with the unit as same as unit of trait.

Value

a data table with deviation mean squares

Details

Deviation mean squares (Eberhart and Russell, 1966) is calculatd based on regression function. Variety with low stability variance is considered as stable. Equation of deviation mean squares can be found in vignette file.

References

Eberhart SA, Russell WA (1966). “Stability parameters for comparing varieties.” Crop Science, 6(1), 36--40. ISSN 0011-183X, doi: 10.2135/cropsci1966.0011183X000600010011x .

Author

Tien Cheng Wang

Examples

data(Data)
deviation.mean.squares <- deviation_mean_squares(
 data = Data,
 trait = "Yield",
 genotype = "Genotype",
 environment = "Environment",
 unit.correct = FALSE)