Learn R Programming

CANE (version 0.2.0)

PooledCRD: Pooled Analysis of a Series of Completely Randomised Designs

Description

Performs the classical pooled analysis of variance for a completely randomised design (CRD) repeated over several environments (locations, seasons or years). The function carries out the environment-wise analysis, tests homogeneity of the error variances, optionally applies Aitken's variance-stabilising transformation, fits the pooled model including the treatment-by-environment interaction, and separates treatment means.

Usage

PooledCRD(
  data,
  Response,
  Location,
  Treatment,
  alpha = 0.05,
  Mult_Comp_Test = 1,
  transform = c("auto", "always", "never"),
  env_effect = c("fixed", "random")
)

Value

An object of class "cane", a list with components

Design

Name of the design analysed.

Individual_ANOVA

List of environment-wise ANOVA tables.

Location_wise

Environment-wise multiple comparisons, each computed from the error mean square of that environment.

Bartlett_Test

Bartlett's test on the error mean squares. For split plot and strip plot designs, element other_strata gives the same test for the main plot or strip error strata.

Levene_Test

Median-centred Levene (Brown-Forsythe) test.

Normality_Test

Environment-wise Shapiro-Wilk tests.

Transformation

Whether Aitken's transformation was applied, why, the environment-wise error mean squares and the ratio of the largest to the smallest.

Pooled_ANOVA

Pooled ANOVA table, including the error term used as the denominator of each F-test.

Treatments_Comparison

Pooled treatment means, groups and all pairwise differences. When a transformation was applied, means are given on the transformed scale (on which the test was performed) and the arithmetic means on the original scale are reported alongside.

GEI_Note

Advice issued when any interaction of a treatment factor with environment is significant, naming the terms concerned.

Environment_Key

Mapping of environment levels to their error mean square and error degrees of freedom.

Settings

Arguments and software versions used.

Arguments

data

A data frame containing the experimental data. Rows with missing values in the variables used are dropped with a warning.

Response

Character string naming the numeric response variable.

Location

Character string naming the factor that identifies environments (locations, seasons or years).

Treatment

Character string naming the treatment factor.

alpha

Significance level used for the variance-homogeneity test and for the multiple comparison procedure. Default 0.05.

Mult_Comp_Test

Integer selecting the multiple comparison procedure: 1 = Tukey's honestly significant difference (HSD) test, 2 = Duncan's multiple range test (DMRT), 3 = Fisher's least significant difference (LSD) test. Option 3 makes no adjustment for multiplicity and is intended for a small number of pre-planned comparisons; a warning is issued if it is requested for more than three treatments.

transform

One of "auto" (default; transform only when the variances are judged heterogeneous at level alpha), "always" or "never".

env_effect

One of "fixed" (default) or "random". With "random" each treatment main effect is tested against its interaction with environment, and in split plot and strip plot designs the interaction of the two treatment factors is tested against the three-way interaction with environment. The pooled comparison of means then uses the same mean square and degrees of freedom as the F-test of the factor compared. With few environments that interaction has few degrees of freedom; if it has fewer than two, the Tukey and Duncan comparisons for that factor are not computed and a warning is issued.

Details

The model fitted within environment \(j\) is $$Y_{ijk} = \mu_j + \tau_{ij} + \epsilon_{ijk}$$ and the pooled model is $$Y_{ijk} = \mu + \beta_j + \tau_i + (\tau\beta)_{ij} + \epsilon_{ijk},$$ where \(\beta_j\) is the environment effect, \(\tau_i\) the treatment effect and \((\tau\beta)_{ij}\) their interaction. A completely randomised design has a single error stratum, so every effect is tested against the pooled error mean square when env_effect = "fixed". With env_effect = "random" the treatment main effect is tested against the treatment-by-environment interaction, which is the appropriate denominator when the environments are regarded as a random sample from a target population.

Homogeneity of error variances is tested by Bartlett's statistic computed on the environment-wise error mean squares, each carrying its own error degrees of freedom. Because Bartlett's test is sensitive to non-normality, the median-centred (Brown-Forsythe) form of Levene's test and environment-wise Shapiro-Wilk tests are reported alongside it. Levene's test is computed on the environment-wise residuals; because the residuals of environment \(j\) carry only its error degrees of freedom \(\nu_j\) (with two replications they occur in exact plus-minus pairs), its denominator degrees of freedom are \(\sum_j \nu_j\) rather than \(N - l\). The transform argument lets the user override the automatic decision.

References

Aitken, A. C. (1935). On least squares and linear combination of observations. Proceedings of the Royal Society of Edinburgh, 55, 42--48. tools:::Rd_expr_doi("10.1017/S0370164600014346")

Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. Proceedings of the Royal Society of London A, 160, 268--282. tools:::Rd_expr_doi("10.1098/rspa.1937.0109")

Cochran, W. G. and Cox, G. M. (1957). Experimental Designs, 2nd ed. John Wiley and Sons, New York.

Dean, A., Voss, D. and Draguljic, D. (2017). Design and Analysis of Experiments, 2nd ed. Springer, Cham. tools:::Rd_expr_doi("10.1007/978-3-319-52250-0")

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

See Also

PooledRBD, PooledLSD, PooledSPD, PooledStPD

Examples

Run this code
data(crd_example)
out <- PooledCRD(crd_example, Response = "Yield", Location = "Loc",
                 Treatment = "Treatment", alpha = 0.05, Mult_Comp_Test = 1)
out
out$Pooled_ANOVA

Run the code above in your browser using DataLab