single_trial_analysis {agriutilities}R Documentation

Single Trial Analysis

Description

The results of the check_design_met() function are used in single_trial_analysis() to fit single trial models. This function can fit, Completely Randomized Designs (CRD), Randomized Complete Block Designs (RCBD), Resolvable Incomplete Block Designs (res-IBD), Non-Resolvable Row-Column Designs (Row-Col) and Resolvable Row-Column Designs (res-Row-Col).

Returns an object of class smaAgri, with a list of trial summary, BLUEs, BLUPs, heritability, variance components, potential extreme observations, residuals, the models fitted and the data used. This function will generate the required output to be used in the two-stage analysis.

Usage

single_trial_analysis(
  results = NULL,
  progress = TRUE,
  engine = "asreml",
  remove_outliers = TRUE
)

Arguments

results

Object of class checkAgri resulting of executing check_design_met() function.

progress

Should the progress of the modeling be printed. If TRUE, for every trial a line is output indicating the traits fitted for the particular trial.

engine

A character string specifying the name of the mixed modeling engine to use, either lme4 or asreml. For spatial designs, SpATS is always used, for other designs asreml as a default.

remove_outliers

Should outliers be removed? TRUE by default.

Value

An object of class smaAgri, with a list of:

fitted_models

A list containing the fitted models. (Both models, the one with Genotype as Random and the one with Genotype as Fixed)

resum_fitted_model

A data.frame containing a summary of the fitted models.

outliers

A data.frame containing extreme observations. If remove_outliers is TRUE, this data.frame will contain the observations removed.

blues_blups

A data.frame containing BLUPs/BLUEs for all the genotypes in each trial.

std_residuals

A data.frame containing the standardized residuals for the model with genotype as random component.

data

A data.frame containing the data used. If remove_outliers is TRUE, data will have missing values for the outliers detected.

Examples


library(agridat)
library(agriutilities)
data(besag.met)
dat <- besag.met
results <- check_design_met(
  data = dat,
  genotype = "gen",
  trial = "county",
  traits = c("yield"),
  rep = "rep",
  block = "block",
  col = "col",
  row = "row"
)
out <- single_trial_analysis(results, progress = FALSE)
print(out)


[Package agriutilities version 1.2.0 Index]