metan (version 1.2.1)

performs_ammi: Additive Main effects and Multiplicative Interaction

Description

Compute the Additive Main effects and Multiplicative interaction. This function also serves as a helper function for other procedures performed in the metan package such as waas and wsmp

Usage

performs_ammi(.data, env, gen, rep, resp, 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

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).

verbose

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

Value

  • ANOVA The analysis of variance for the AMMI model.

  • PCA The principal component analysis

  • MeansGxE The means of genotypes in the environments

  • model scores for genotypes and environments in all the possible axes.

Examples

Run this code
# NOT RUN {
library(metan)
ammi_model = performs_ammi(data_ge, ENV, GEN, REP,
                           resp = c(GY, HM))

# GY x PC1 (variable GY)
plot_scores(ammi_model,
            col.env = 'olivedrab',
            col.gen = 'orange2',
            x.lab = 'My own x label')

# PC1 x PC2 (variable HM)
plot_scores(ammi_model,
            type = 2)

# PC1 x PC2 (variable HM)
# Draw a convex hull polygon
plot_scores(ammi_model,
            type = 2,
            polygon = TRUE)

# }

Run the code above in your browser using DataCamp Workspace