Analysis of variance for a Latin square design with row and column blocking, SEm, SEd, CD, CV, the efficiency of the Latin square relative to a CRD and to an RCBD, and post-hoc letter groupings.
Usage
anova_latin(
data,
response,
treatment,
row,
column,
posthoc = "lsd",
alpha = 0.05,
verbose = TRUE,
control = NULL
)Arguments
- data
Data frame containing the data.
- response
Name of the response variable.
- treatment
Name of the treatment column.
- row
Name of the row column.
- column
Name of the column column.
- posthoc
Post-hoc method(s); see
perform_posthoc.- alpha
Significance level. Default 0.05.
- verbose
Logical. If TRUE (default), prints the report.
- control
Control level for Dunnett's test.
Value
An object of class aridagri_anova with the components
of anova_crd and relative_efficiency (a named
vector, percent).
Details
Relative efficiencies (Cochran and Cox, 1957; Gomez and Gomez, 1984) use the row (\(E_r\)), column (\(E_c\)) and error (\(E_e\)) mean squares: versus a CRD, \([E_r + E_c + (t-1)E_e] / [(t+1)E_e]\); versus an RCBD with rows as blocks, \([E_c + (t-1)E_e] / (t E_e)\); versus an RCBD with columns as blocks, \([E_r + (t-1)E_e] / (t E_e)\), each multiplied by the precision adjustment factor when the error degrees of freedom are below 20.
Examples
data <- data.frame(
row = rep(1:5, each = 5),
col = rep(1:5, 5),
treatment = c("A","B","C","D","E", "B","C","D","E","A",
"C","D","E","A","B", "D","E","A","B","C",
"E","A","B","C","D"),
yield = c(1180, 1265, 1342, 1410, 1238, 1270, 1335, 1402, 1251, 1176,
1340, 1415, 1245, 1190, 1258, 1405, 1232, 1178, 1262, 1339,
1236, 1183, 1271, 1348, 1398)
)
anova_latin(data, response = "yield", treatment = "treatment",
row = "row", column = "col")
#>
#> ======================================================================
#> LATIN SQUARE DESIGN
#> ======================================================================
#> Response : yield
#> Treatment : treatment
#> Rows : row
#> Columns : col
#> Treatments : 5
#>
#> Analysis of variance
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> Row 4 104.96 26.24 0.894 0.4970 NS
#> Column 4 278.96 69.74 2.377 0.1102 NS
#> Treatment 4 154266.56 38566.64 1314.473 0.0000 ***
#> Error 12 352.08 29.34
#> Total 24 155002.56
#> Signif. codes: *** p < 0.001, ** p < 0.01, * p < 0.05, NS not significant
#>
#> Grand mean = 1286.760 CV (%) = 0.421 SEm = 2.422 SEd = 3.426 CD (5%) = 7.464
#> Relative efficiency (%): vs CRD 115.0; vs RCBD (rows as blocks) 123.5; vs RCBD (columns as blocks) 94.8
#>
#> Treatment means (Fisher's LSD, alpha = 0.05)
#> Treatment Mean SD N SE Group
#> D 1406.00 6.671 5 2.422 a
#> C 1340.80 4.764 5 2.422 b
#> B 1265.20 5.450 5 2.422 c
#> E 1240.40 7.570 5 2.422 d
#> A 1181.40 5.459 5 2.422 e
