anova_ind: Within-environment analysis of variance

View source: R/anova_ind.R

anova_indR Documentation

Within-environment analysis of variance

Description

[Stable]

Performs a within-environment analysis of variance in randomized complete block or alpha-lattice designs and returns values such as Mean Squares, p-values, coefficient of variation, heritability, and accuracy of selection.

Usage

anova_ind(.data, env, gen, rep, resp, block = NULL, verbose = TRUE)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes, replication/block and response variable(s).

env

The name of the column that contains the levels of the environments. The analysis of variance is computed for each level of this factor.

gen

The name of the column that contains the levels of the genotypes.

rep

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

resp

The response variable(s). To analyze multiple variables in a single procedure a vector of variables may be used. For example resp = c(var1, var2, var3).

block

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

verbose

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

Value

A list where each element is the result for one variable containing (1) individual: A tidy tbl_df with the results of the individual analysis of variance with the following column names, and (2) MSRatio: The ratio between the higher and lower residual mean square. The following columns are returned, depending on the experimental design

  • For analysis in alpha-lattice designs:

    • MEAN: The grand mean.

    • DFG, DFCR, and DFIB_R, and DFE: The degree of freedom for genotype, complete replicates, incomplete blocks within replicates, and error, respectively.

    • MSG, MSCR, MSIB_R: The mean squares for genotype, replicates, incomplete blocks within replicates, and error, respectively.

    • FCG, FCR, FCIB_R: The F-calculated for genotype, replicates and incomplete blocks within replicates, respectively.

    • PFG, PFCR, PFIB_R: The P-values for genotype, replicates and incomplete blocks within replicates, respectively.

    • CV: coefficient of variation.

    • h2: broad-sense heritability.

    • AS: accuracy of selection (square root of h2)

  • For analysis in randomized complete block design:

    • MEAN: The grand mean.

    • DFG, DFB, and DFE: The degree of freedom for genotype blocks, and error, respectively.

    • MSG, MSB, and MSE: The mean squares for genotype blocks, and error, respectively.

    • FCG and FCB: The F-calculated for genotype and blocks, respectively.

    • PFG and PFB: The P-values for genotype and blocks, respectively.

    • CV: coefficient of variation.

    • h2: broad-sense heritability.

    • AS: accuracy of selection (square root of h2)

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

References

Patterson, H.D., and E.R. Williams. 1976. A new class of resolvable incomplete block designs. Biometrika 63:83-92.

Examples


library(metan)
# ANOVA for all variables in data
ind_an <- anova_ind(data_ge,
                    env = ENV,
                    gen = GEN,
                    rep = REP,
                    resp = everything())
# mean for each environment
get_model_data(ind_an)

# P-value for genotype effect
get_model_data(ind_an, "PFG")



metan documentation built on March 7, 2023, 5:34 p.m.