sreg: The Sites Regression (SREG, or GGE) model

Description Usage Arguments Examples

View source: R/gei_analysis_functions.R

Description

Fit a sites-regression model (SREG, or GGE) to analyze genotype- environment interactions in plant breeding experiments.

Usage

1
sreg(formula, data, gen.col = "gen", env.col = "env", n.terms = 1)

Arguments

formula

A formula specifying the model.

data

A data frame in which the variables specified in the formula will be found. If missing, the variables are searched for in the standard way.

gen.col

The name of the column in data containing the genotype factor.

env.col

The name of the column in data containing the environment factor.

n.terms

The number of multiplicative terms to include in the model. Defaults to 1 (i.e. SREG_1).

Examples

1
2
3
4
5
6
7
# Use the gauch.soy dataset
data("gauch.soy")

# Filter
gauch_soy1 <- droplevels(subset(gauch.soy, env %in% c("A77", "A80", "A83")))

sreg_fit <- sreg(formula = yield ~ gen + env + gen:env, data = gauch_soy1)

neyhartj/pbr documentation built on Jan. 7, 2020, 9:24 a.m.