Skip to contents

The `anova_rcbd` function executes a complete, high-precision linear model analysis for agricultural trials laid out under an RCBD framework. It computes partition sums of squares, hypothesis testing statistics, significance flags, and the Coefficient of Variation (CV

Usage

anova_rcbd(data, trait, reporting_level = 2)

Arguments

data

A verified data.frame containing the columns Genotype, Replication, and the target phenotypic trait response.

trait

A single character string specifying the exact column name of the numeric trait to analyze.

reporting_level

An integer vector flag defining console trace settings: 0 for silent, 1 for basic summary tables, and 2 for comprehensive descriptive metrics. Defaults to 2.

Value

A structured named list containing 4 computational components:

anova_table

A data.frame acting as the standard ANOVA source matrix table containing Df, SS, MS, F_value, and p_value.

cv_percentage

The computed Coefficient of Variation percentage scalar (\(CV\%\)).

mean_square_error

The isolated Residual Error Mean Square (EMS), ready for genetic parameter engines.

grand_mean

The general mean arithmetic value of the evaluated trait.

Details

In plant breeding and agronomy trials, isolating block variance from the true experimental error is vital to properly evaluate lines, cultivars, or treatments. This function uses standard least-squares projection to build the classic orthogonal ANOVA matrix: $$Y_{ij} = \mu + G_i + R_j + e_{ij}$$ Where \(G_i\) represents the genotype effect, \(R_j\) is the replication block effect, and \(e_{ij}\) is the residual experimental error.

See also

Examples

   # Execute complete RCBD partition on gv_data asset for Plant Height (PH)
   rcbd_results <- anova_rcbd(data = gv_data, trait = "PH")
#> 
#> ======================================================================
#>  ANALYSIS OF VARIANCE (ANOVA) FOR RCBD - TRAIT:  PH 
#> ----------------------------------------------------------------------
#>                 Source  Df        SS      MS F_value p_value
#>  Replications (Blocks)   2   17.9302  8.9651   1.512  0.2269
#>      Genotypes (Lines)  39 2367.0970 60.6948  10.237  <0.001
#>       Error (Residual)  78  462.4765  5.9292      NA      NA
#>                  Total 119 2847.5037      NA      NA      NA
#> ----------------------------------------------------------------------
#>  Trial Grand Mean         :  93.0617 
#>  Coefficient of Var (CV%):  2.62 %
#> ======================================================================
#>