Skip to contents

Analysis of variance for a randomized complete block design with standard errors, critical difference, CV, relative efficiency over a CRD, post-hoc letter groupings and assumption checks. Missing plots are handled by least squares: treatments are tested after blocks, means are least-squares (adjusted) means and every pair is compared with its own standard error.

Usage

anova_rbd(
  data,
  response,
  treatment,
  block,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE,
  control = NULL
)

Arguments

data

Data frame containing the experimental data.

response

Name of the response variable (character).

treatment

Name of the treatment column.

block

Name of the block (replication) column.

posthoc

Post-hoc test(s): "lsd", "duncan", "tukey", "snk", "scheffe", "bonferroni", "dunnett", a vector of these, "all" or "none". The first method supplies the letters in the means table.

alpha

Significance level for the CD and the post-hoc tests (default 0.05).

verbose

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

control

Control level for Dunnett's test (default: first level).

Value

An object of class aridagri_anova. In addition to the components described in anova_crd it contains relative_efficiency (percent, adjusted), relative_efficiency_unadjusted and missing_plots.

Details

Relative efficiency of the RCBD over a CRD follows Gomez and Gomez (1984): $$RE = \frac{(r - 1) E_b + r (t - 1) E_e}{(r t - 1) E_e}$$ where \(E_b\) and \(E_e\) are the block and error mean squares, multiplied by the precision adjustment factor \(k = \frac{[(r-1)(t-1)+1][t(r-1)+3]}{[(r-1)(t-1)+3][t(r-1)+1]}\) when the error degrees of freedom are below 20. Values above 100% mean that blocking reduced the error.

References

Gomez, K.A. and Gomez, A.A. (1984). Statistical Procedures for Agricultural Research, 2nd ed. John Wiley and Sons, New York.

Author

Lalit Kumar Rolaniya, ICAR-IIPR, Bikaner

Examples

data(mothbean_rbd)
res <- anova_rbd(mothbean_rbd, response = "seed_yield",
                 treatment = "treatment", block = "block",
                 posthoc = "duncan")
#> 
#> ======================================================================
#>  RANDOMIZED COMPLETE BLOCK DESIGN (RCBD)
#> ======================================================================
#>  Response     : seed_yield
#>  Treatment    : treatment
#>  Treatments   : 8
#>  Blocks       : 4
#>  Observations : 32
#> 
#>  Analysis of variance
#>     Source Df    Sum Sq  Mean Sq F value Pr(>F)    
#>  Block      3  19781.59  6593.86   6.773 0.0023  **
#>  Treatment  7  84544.22 12077.75  12.405 0.0000 ***
#>  Error     21  20445.66   973.60                   
#>  Total     31 124771.47                            
#>  Signif. codes: *** p < 0.001, ** p < 0.01, * p < 0.05, NS not significant
#> 
#>  Grand mean = 627.781   CV (%) = 4.970   SEm = 15.601   SEd = 22.064   CD (5%) = 45.884
#>  Relative efficiency of RCBD over CRD = 155.9%
#> 
#>  Treatment means (Duncan's MRT, alpha = 0.05)
#>             Treatment   Mean     SD N     SE Group
#>  T5 RDF+Rhizobium+PSB 705.00 25.781 4 15.601     a
#>        T6 75% RDF+FYM 662.75 67.609 4 15.601    ab
#>      T3 RDF+Rhizobium 650.75 34.248 4 15.601    bc
#>            T8 RDF+Zn5 639.75 53.238 4 15.601    bc
#>            T4 RDF+PSB 632.25 26.887 4 15.601    bc
#>            T7 RDF+S20 610.75 26.247 4 15.601     c
#>                T2 RDF 604.75 49.815 4 15.601     c
#>            T1 Control 516.25 16.520 4 15.601     d
#>  Means sharing a letter do not differ significantly.
res$treatment_means
#>              Treatment   Mean       SD N      SE Group
#> 1 T5 RDF+Rhizobium+PSB 705.00 25.78113 4 15.6013     a
#> 2       T6 75% RDF+FYM 662.75 67.60855 4 15.6013    ab
#> 3     T3 RDF+Rhizobium 650.75 34.24787 4 15.6013    bc
#> 4           T8 RDF+Zn5 639.75 53.23767 4 15.6013    bc
#> 5           T4 RDF+PSB 632.25 26.88711 4 15.6013    bc
#> 6           T7 RDF+S20 610.75 26.24722 4 15.6013     c
#> 7               T2 RDF 604.75 49.81549 4 15.6013     c
#> 8           T1 Control 516.25 16.52019 4 15.6013     d
res$relative_efficiency
#> [1] 155.8643