gafem {metan}R Documentation

Genotype analysis by fixed-effect models

Description

[Stable]

One-way analysis of variance of genotypes conducted in both randomized complete block and alpha-lattice designs.

Usage

gafem(
  .data,
  gen,
  rep,
  resp,
  block = NULL,
  by = NULL,
  prob = 0.05,
  verbose = TRUE
)

Arguments

.data

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

gen

The name of the column that contains the levels of the genotypes, that will be treated as random effect.

rep

The name of the column that contains the levels of the replications (assumed to be fixed).

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). Select helpers are also allowed.

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. Use the function gamem() to analyze a one-way trial with mixed-effect models.

by

One variable (factor) to compute the function by. It is a shortcut to dplyr::group_by().This is especially useful, for example, when the researcher want to fit a fixed-effect model for each environment. In this case, an object of class gafem_grouped is returned. mgidi() can then be used to compute the mgidi index within each environment.

prob

The error probability. Defaults to 0.05.

verbose

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

Details

gafem analyses data from a one-way genotype testing experiment. By default, a randomized complete block design is used according to the following model: \[Y_{ij} = m + g_i + r_j + e_{ij}\] where \(Y_{ij}\) is the response variable of the ith genotype in the jth block; m is the grand mean (fixed); \(g_i\) is the effect of the ith genotype; \(r_j\) is the effect of the jth replicate; and \(e_{ij}\) is the random error.

When block is informed, then a resolvable alpha design is implemented, according to the following model:

\[Y_{ijk} = m + g_i + r_j + b_{jk} + e_{ijk}\]

where where \(y_{ijk}\) is the response variable of the ith genotype in the kth block of the jth replicate; m is the intercept, \(t_i\) is the effect for the ith genotype \(r_j\) is the effect of the jth replicate, \(b_{jk}\) is the effect of the kth incomplete block of the jth replicate, and \(e_{ijk}\) is the plot error effect corresponding to \(y_{ijk}\). All effects, except the random error are assumed to be fixed.

Value

A list where each element is the result for one variable containing the following objects:

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.

See Also

get_model_data() gamem()

Examples


library(metan)
# RCBD
rcbd <- gafem(data_g,
             gen = GEN,
             rep = REP,
             resp = c(PH, ED, EL, CL, CW))

# Fitted values
get_model_data(rcbd)

# ALPHA-LATTICE DESIGN
alpha <- gafem(data_alpha,
              gen = GEN,
              rep = REP,
              block = BLOCK,
              resp = YIELD)

# Fitted values
get_model_data(alpha)




[Package metan version 1.18.0 Index]