Analysis of variance for a split-plot design in randomized complete blocks, with the main-plot factor tested against Error(a) and the sub-plot factor and interaction against Error(b). Gives CV(a), CV(b), SEm, SEd and CD for all four standard comparisons and letter groupings for main-plot means, sub-plot means and each factor within the levels of the other.
Usage
anova_spd(
data,
response,
main_plot,
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_plot
Name of the main-plot factor (A).
- sub_plot
Name of the sub-plot factor (B).
- replication
Name of the replication (block) column.
- posthoc
Method for the letters (see
perform_posthoc), or"none". Default"lsd".- alpha
Significance level for CD and letters. Default 0.05.
- verbose
Logical. If TRUE (default), prints the report.
Value
An object of class aridagri_spd with the corrected
anova_table, cv_a, cv_b, error mean squares and
df, se_main, cd_main, se_sub, cd_sub,
se_sub_same, cd_sub_same, se_main_same_sub,
cd_main_same_sub, se_cd (all comparisons),
main_means and sub_means (with letters),
interaction_means, letters (each factor within the
levels of the other) and model.
Details
Standard errors of difference (Gomez and Gomez, 1984, table 3.10): main-plot means \(\sqrt{2E_a/(rb)}\), sub-plot means \(\sqrt{2E_b/(ra)}\), sub-plot means at the same main-plot level \(\sqrt{2E_b/r}\), and main-plot means at the same or different sub-plot level \(\sqrt{2[(b-1)E_b + E_a]/(rb)}\). For the last comparison the CD uses the weighted t value \(t' = [(b-1)E_b t_b + E_a t_a] / [(b-1)E_b + E_a]\). The data must be complete (every combination once in each replication).
References
Gomez, K.A. and Gomez, A.A. (1984). Statistical Procedures for Agricultural Research, 2nd ed. John Wiley and Sons, New York.
Examples
data(clusterbean_spd)
res <- anova_spd(clusterbean_spd, response = "seed_yield",
main_plot = "irrigation", sub_plot = "nitrogen",
replication = "rep")
#>
#> ======================================================================
#> SPLIT-PLOT TYPE DESIGN
#> ======================================================================
#> Response : seed_yield
#> Design : Split Plot Design
#> Replications : 3
#> Factors : irrigation (3), nitrogen (4)
#>
#> Analysis of variance
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> rep 2 3154.39 1577.19 0.493 0.6437 NS
#> irrigation 2 1057793.56 528896.78 165.238 0.0001 ***
#> Error(a) 4 12803.28 3200.82
#> nitrogen 3 209483.56 69827.85 89.389 0.0000 ***
#> irrigation:nitrogen 6 15606.44 2601.07 3.330 0.0219 *
#> Error(b) 18 14061.00 781.17
#> Total 35 1312902.22
#> Signif. codes: *** p < 0.001, ** p < 0.01, * p < 0.05, NS not significant
#>
#> Grand mean = 1123.778
#> Error(a) [main]: df = 4, MS = 3200.8194, CV = 5.03%
#> Error(b) [sub]: df = 18, MS = 781.1667, CV = 2.49%
#>
#> SEm, SEd and CD (alpha = 0.05)
#> Comparison SEm SEd CD Error
#> irrigation means 16.332 23.097 64.127 Ea
#> nitrogen means 9.316 13.175 27.681 Eb
#> irrigation levels at the same or different nitrogen 21.495 30.398 75.719 Ea+Eb
#> nitrogen levels at the same irrigation 16.137 22.821 47.944 Eb
#> CD for comparisons mixing error terms uses the weighted t of Cochran and Cox.
#>
#> Means of irrigation (Fisher's LSD)
#> Level Mean Group
#> I1 Rainfed 891.50 c
#> I2 One irrigation 1179.83 b
#> I3 Two irrigations 1300.00 a
#>
#> Means of nitrogen (Fisher's LSD)
#> Level Mean Group
#> N0 1011.11 d
#> N10 1102.22 c
#> N20 1167.33 b
#> N20+Foliar 1214.44 a
#>
#> Interaction means: irrigation x nitrogen
#> N0 N10 N20 N20+Foliar
#> I1 Rainfed 821.67 870.33 914 960.00
#> I2 One irrigation 1063.00 1145.67 1237 1273.67
#> I3 Two irrigations 1148.67 1290.67 1351 1409.67
res$se_cd
#> Effect Comparison
#> 1 irrigation irrigation means
#> 2 nitrogen nitrogen means
#> 3 irrigation x nitrogen irrigation levels at the same or different nitrogen
#> 4 irrigation x nitrogen nitrogen levels at the same irrigation
#> SEm SEd t_value df CD Error stratum
#> 1 16.332022 23.09697 2.776445 4.00000 64.12746 Ea 1
#> 2 9.316453 13.17545 2.100922 18.00000 27.68060 Eb 2
#> 3 21.494804 30.39824 2.490912 10.72399 75.71934 Ea+Eb 1
#> 4 16.136570 22.82056 2.100922 18.00000 47.94421 Eb 2
