Skip to contents

Split-plot design where the main plots carry the factorial combination of two factors (A x B) and the sub-plots carry factor C. A, B and A x B are tested against Error(a); C and every interaction with C against Error(b).

Usage

anova_spd_ab_main(
  data,
  response,
  main_factor1,
  main_factor2,
  sub_plot,
  replication,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE
)

Arguments

data

Data frame containing the experimental data.

response

Name of the response variable.

main_factor1

First main-plot factor (A).

main_factor2

Second main-plot factor (B).

sub_plot

Sub-plot factor (C).

replication

Name of the replication column.

posthoc

Method for the letters (default "lsd").

alpha

Significance level. Default 0.05.

verbose

Logical. If TRUE (default), prints the report.

Value

An object of class aridagri_spd_ab with the corrected anova_table, cv, error mean squares and df, se_cd (SEm, SEd and CD for every main effect and interaction comparison), factor_means (with letters), letters, interaction_means and model.

Author

Lalit Kumar Rolaniya, ICAR-IIPR, Bikaner

Examples

data <- expand.grid(rep = 1:3, irrigation = c("I1", "I2"),
                    variety = c("V1", "V2", "V3"),
                    nitrogen = c("N0", "N1", "N2", "N3"))
set.seed(3)
data$yield <- rnorm(nrow(data), 1200, 80)
res <- anova_spd_ab_main(data, response = "yield",
                         main_factor1 = "irrigation",
                         main_factor2 = "variety",
                         sub_plot = "nitrogen", replication = "rep",
                         verbose = FALSE)
res$anova_table
#>                             Df     Sum Sq  Mean Sq   F value     Pr(>F)
#> rep                          2  13800.792 6900.396 4.0389901 0.05179054
#> irrigation                   1   2711.941 2711.941 1.5873729 0.23631057
#> variety                      2   4184.534 2092.267 1.2246610 0.33440402
#> irrigation:variety           2   5130.837 2565.418 1.5016095 0.26899587
#> Error(a)                    10  17084.458 1708.446        NA         NA
#> nitrogen                     3   8821.955 2940.652 0.4738817 0.70240276
#> irrigation:nitrogen          3  21406.078 7135.359 1.1498528 0.34224835
#> variety:nitrogen             6  35621.128 5936.855 0.9567154 0.46788414
#> irrigation:variety:nitrogen  6  24078.256 4013.043 0.6466960 0.69232282
#> Error(b)                    36 223396.377 6205.455        NA         NA