Combined (pooled) analysis of a split-plot experiment repeated in several environments (years, seasons or locations). Environments are fixed and replications random within environments: the environment effect is tested against replications within environments, main-plot sources against the pooled Error(a) and sub-plot sources against the pooled Error(b). SEm, SEd and CD are given for every comparison.
Usage
anova_spd_pooled(
data,
response,
main_plot,
sub_plot,
environment,
replication,
verbose = TRUE,
posthoc = "lsd",
alpha = 0.05
)Arguments
- data
Data frame containing the combined data.
- response
Name of the response variable.
- main_plot
Name of the main-plot factor.
- sub_plot
Name of the sub-plot factor.
- environment
Name of the environment column.
- replication
Name of the replication column (nested within environment; labels may repeat across environments).
- verbose
Logical. If TRUE (default), prints the report.
- posthoc
Method for the letters (default
"lsd").- alpha
Significance level. Default 0.05.
Value
An object of class aridagri_spd_pooled with
anova_table, cv (by stratum), se_cd,
factor_means (with letters), main_means,
sub_means, env_means and model.
Examples
data <- expand.grid(year = c("Y1", "Y2", "Y3"), rep = 1:3,
irrigation = c("I1", "I2", "I3"),
variety = c("V1", "V2", "V3", "V4"))
set.seed(7)
data$yield <- rnorm(nrow(data), 1200, 90)
res <- anova_spd_pooled(data, response = "yield", main_plot = "irrigation",
sub_plot = "variety", environment = "year",
replication = "rep", verbose = FALSE)
res$anova_table
#> Df Sum Sq Mean Sq F value Pr(>F)
#> year 2 14107.52 7053.760 1.1928660 0.36629486
#> rep(year) 6 35479.73 5913.288 NA NA
#> irrigation 2 48665.86 24332.928 1.7708970 0.21187543
#> year:irrigation 4 77399.88 19349.970 1.4082483 0.28975422
#> Error(a) 12 164885.44 13740.454 NA NA
#> variety 3 34384.31 11461.437 2.4535572 0.07308269
#> year:variety 6 53415.16 8902.526 1.9057695 0.09658273
#> irrigation:variety 6 65374.24 10895.706 2.3324508 0.04480598
#> year:irrigation:variety 12 45418.20 3784.850 0.8102253 0.63875530
#> Error(b) 54 252253.18 4671.355 NA NA
