deviation_mean_squares
calculate variance of a genotype across environments.
deviation_mean_squares(
data,
trait,
genotype,
environment,
unit.correct = FALSE
)
a dataframe containing trait, genotype and environment.
colname of a column containing a numeric vector of interested trait to be analysized.
colname of a column containing a character or factor vector labeling different genotypic varieties
colname of a column containing a character or factor vector labeling different environments
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.
a data table with deviation mean squares
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.
Eberhart SA, Russell WA (1966). “Stability parameters for comparing varieties.” Crop Science, 6(1), 36--40. ISSN 0011-183X, doi: 10.2135/cropsci1966.0011183X000600010011x .
data(Data)
deviation.mean.squares <- deviation_mean_squares(
data = Data,
trait = "Yield",
genotype = "Genotype",
environment = "Environment",
unit.correct = FALSE)