agriTutorial

Rodney Edmondson

2018-02-05

Introduction

Designed experiments can be complex and difficult to interpret and the use of proper statistical methodology is usually essential for efficient and reliable analysis. Piepho and Edmondson (2018) discuss the basics of the statistical analysis of five designed experiments using real examples from agricultural field trials and this package provides example software for the five examples discussed in that paper. See http://onlinelibrary.wiley.com/doi/10.1111/jac.12267/full

Examples

  1. Example 1. A split-split-plot experiment on rice yield (Gomez & Gomez 1984, p. 143) with three complete replicates of all factorial combinations of three management practices (minimum, optimum, intensive), five rates of nitrogen (N) fertilizer (0, 50, 80, 110, 140 kg/ha) and three varieties. The fertilizer treatments were applied to main plots, the management practices to split-plots and the varieties to split-split-plots.

  2. Example 2. A complete randomized blocks experiment on sugar beet yield (Petersen 1994, p. 125) with three complete replicates of five rates of N-fertiliser treatments (0, 35, 70, 105 and 140 kg N/ha).

  3. Example 3. A split-plot greenhouse experiment on rice leaf nitrogen uptake (Gomez & Gomez, 1984, p. 401) with four complete replicates of all factorial combinations of four water-stress treatments (0, 10, 20 and 40 days) and four nitrogen rate treatments (0, 90, 180 and 270 kg/ha). The water stress treatments were applied to main plots and the nitrogen rates to sub-plots.

  4. Example 4. A randomised blocks experiment on sorghum leaf area (Milliken & Johnson 1992, p. 429) with five randomized complete blocks of four sorghum varieties. The leaf area index was measured repeatedly on each individual plot in each of five consecutive weeks starting two weeks after emergence.

  5. Example 5. A complete randomized blocks experiment on turnip yield (Mead 1988, p. 323) with five seed rates (0.5, 2, 8, 20, 32 lb/acre) and four row widths (4, 8, 16, 32 inches) giving 20 planting density combinations.

Data

The data sets for the five examples are stored in data.frames in five separate data files called “rice”, “beet”, “greenrice”, “sorghum” and “turnip”, respectively, for the five examples. The data files are loaded automatically when the agriTutorial package is loaded and can be viewed, if desired, by typing the data file name.

Code

There are five example pages, one for each example, and each example page provides a brief explanation of the statistical analysis for that example and also provides example R code, as discussed in Piepho and Edmondson (2018).

The code for any particular example can be executed either by typing example(exampleN) for N=1…5, as required, or by copying and pasting the example code directly into the device console window.

Most of the examples require contributed library packages and these should install automatically when agriTutorial is installed. However, the required library packages must first be loaded by the library(package) command before they can be used and each example page contains require(“package name”) commands for loading the required packages for that page.

The example code also generates a range of graphical output including plots of the fitted models and a range of diagnostic plots showing methods for testing model assumptions. Normally, graphical output is sent directly to a suitable graphics window and is displayed using the default graphics device.

If using RStudio, graphical output is displayed in the Plots window output pane but sometimes if the output pane is too small the following error message will occur: Error in plot.new() : figure margins too large. This is not a program error and can be resolved by increasing the size of the output pane, see:

https://support.rstudio.com/hc/en-us/articles/200488548-Problem-with-Plots-or-Graphics-Device

Export

Output can be diverted to any suitable output text file by using a sink file command, if required: see help(sink). Data table output can be exported directly to a text file by using the write.table function, if required: see help(write.table). Options for exporting data in spread sheet format are provided by the xlsx package (CRAN library).

By default, all graphical output will appear in the device graphics or plot window but can be diverted to a suitable output device by using one of the following options

See: https://www.statmethods.net/interface/io.html

Further information

The agridat package https://CRAN.R-project.org/package=agridat contains data and some analysis on the split-split-plot experiment on rice yield (Gomez & Gomez 1984, p. 143) as discussed in Piepho and Edmondson, (2018). See gomez.splitsplit {agridat}.

The literature on the R language is now quite extensive and there are a number of good articles at the CRAN contributed page at https://cran.r-project.org/.

The reference book by Grolemund & Wickham (2017) contains a full section (section IV) on models in R at http://r4ds.had.co.nz/

References

Gomez, K.A., & Gomez, A.A. (1984). Statistical procedures for agricultural research, 2nd edn. New York: Wiley.

Grolemund, G. & Wickham, H. (2017). R for Data Science. O’Reilly.

Mead, R. (1988). The design of experiments. Statistical principles for practical application. Cambridge: Cambridge University Press.

Milliken, G.A., & Johnson, D.E. (1992). Analysis of messy data. Volume I: Designed experiments. Boca Raton: CRC Press.

Petersen, R.G. (1994). Agricultural field experiments. Design and analysis. New York: Marcel Dekker.

Piepho, H. P, and Edmondson. R. N. (2018). A tutorial on the statistical analysis of factorial experiments with qualitative and quantitative treatment factor levels. Journal of Agronomy and Crop Science. DOI: 10.1111/jac.12267. http://onlinelibrary.wiley.com/doi/10.1111/jac.12267/full

Wright,K. (2017). agridat: Agricultural Datasets. R package version 1.13. https://CRAN.R-project.org/package=agridat