augmentedRCBD: Analysis of Augmented Randomised Complete Block Design

Description Usage Arguments Details Value Note References See Also Examples

View source: R/augmentedRCBD.R

Description

augmentedRCBD is a function for analysis of variance of an augmented randomised block design (Federer, 1956; Federer, 1961; Searle, 1965) and the generation as well as comparison of the adjusted means of the treatments/genotypes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
augmentedRCBD(
  block,
  treatment,
  y,
  checks = NULL,
  method.comp = c("lsd", "tukey", "none"),
  alpha = 0.05,
  group = TRUE,
  console = TRUE,
  simplify = FALSE,
  truncate.means = TRUE
)

Arguments

block

Vector of blocks (as a factor).

treatment

Vector of treatments/genotypes (as a factor).

y

Numeric vector of response variable (Trait).

checks

Character vector of the checks present in treatment levels. If not specified, checks are inferred from the data on the basis of number of replications of treatments/genotypes.

method.comp

Method for comparison of treatments ("lsd" for least significant difference or "tukey" for Tukey's honest significant difference). If "none", no comparisons will be made, the ANOVA output will be given as a data frame and the adjusted means will be computed directly from treatment and block effects instead of using emmeans.

alpha

Type I error probability (Significance level) to be used for multiple comparisons.

group

If TRUE, genotypes will be grouped according to "method.comp". Default is TRUE.

console

If TRUE, output will be printed to console. Default is TRUE. Default is TRUE.

simplify

If TRUE, ANOVA output will be given as a data frame instead of a summary.aov object. Default is TRUE.

truncate.means

If TRUE, the negative adjusted means will be truncated to zero. Default is TRUE.

Details

This function borrows code from DAU.test function of agricolae package (de Mendiburu et al., 2016) as well as from Appendix VIII of Mathur et al., (2008).

Value

A list of class augmentedRCBD containing the following components:

Details

Details of the augmented design used.

Means

A data frame with the "Means", "Block", "SE", "Mix", "Max" and "Adjusted Means" for each "Treatment".

ANOVA, Treatment Adjusted

An object of class summary.aov for ANOVA table with treatments adjusted.

ANOVA, Block Adjusted

An object of class summary.aov for ANOVA table with block adjusted.

Block effects

A vector of block effects.

Treatment effects

A vector of treatment effects.

Std. Errors

A data frame of standard error of difference between various combinations along with critical difference and tukey's honest significant difference (when method.comp = "tukey") at alpha.

Overall adjusted mean

Overall adjusted mean.

CV

Coefficient of variation.

Comparisons

A data frame of pairwise comparisons of treatments. This is computed only if argument group is TRUE

Groups

A data frame with compact letter display of pairwise comparisons of treatments. Means with at least one letter common are not significantly different statistically. This is computed only if argument group is TRUE

Note

In case the large number of treatments or genotypes, it is advisable to avoid comparisons with the group = FALSE argument as it will be memory and processor intensive. Further it is advised to simplify output with simplify = TRUE in order to reduce output object size.

References

\insertRef

federer_augmented_1956augmentedRCBD

\insertRef

federer_augmented_1956-1augmentedRCBD

\insertRef

federer_augmented_1961augmentedRCBD

\insertRef

searle_computing_1965augmentedRCBD

\insertRef

mathur_data_2008augmentedRCBD

\insertRef

de_mendiburu_agricolae_2015augmentedRCBD

See Also

DAU.test, ea1, emmeans, cld.emmGrid, aug.rcb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Example data
blk <- c(rep(1,7),rep(2,6),rep(3,7))
trt <- c(1, 2, 3, 4, 7, 11, 12, 1, 2, 3, 4, 5, 9, 1, 2, 3, 4, 8, 6, 10)
y1 <- c(92, 79, 87, 81, 96, 89, 82, 79, 81, 81, 91, 79, 78, 83, 77, 78, 78,
        70, 75, 74)
y2 <- c(258, 224, 238, 278, 347, 300, 289, 260, 220, 237, 227, 281, 311, 250,
        240, 268, 287, 226, 395, 450)
data <- data.frame(blk, trt, y1, y2)
# Convert block and treatment to factors
data$blk <- as.factor(data$blk)
data$trt <- as.factor(data$trt)
# Results for variable y1 (checks inferred)
out1 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE)
# Results for variable y2 (checks inferred)
out2 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                     alpha = 0.05, group = TRUE, console = TRUE)

# Results for variable y1 (checks specified)
out1 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE,
                      checks = c("1", "2", "3", "4"))
# Results for variable y2 (checks specified)
out2 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE,
                      checks = c("1", "2", "3", "4"))

## Not run: 
# Error in case checks not replicated across all blocks
# Check 1 and 4 not replicated in all 3 blocks
trt <- c(1, 2, 3, 14, 7, 11, 12, 1, 2, 3, 4, 5, 9, 13, 2, 3, 4, 8, 6, 10)
data$trt <- as.factor(trt)
table(data$trt, data$blk)
# Results for variable y1 (checks specified)
out1 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE,
                      checks = c("1", "2", "3", "4"))

## End(Not run)

# Warning in case test treatments are replicated
out1 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE)
out1 <- augmentedRCBD(data$blk, data$trt, data$y1, method.comp = "lsd",
                      alpha = 0.05, group = TRUE, console = TRUE,
                      checks = c("2", "3"))

augmentedRCBD documentation built on June 12, 2021, 9:06 a.m.