Debian Codegraph @

man/potatoes.Rd

raw
1 \name{potatoes}
2 \alias{potatoes}
3 \docType{data}
4 \title{Fisher's Potato Crop Data}
5 \description{
6 Fisher's potato crop data set is of historical interest as an early
7 example of a multi-factor block design.
8 }
9 \usage{data(potatoes)}
10 \format{
11 A data frame with 64 observations on the following 5 variables.
12 \describe{
13 \item{pos}{a factor with levels \code{1:4}.}
14 \item{treat}{a factor with 16 levels \code{A} to \code{H} and
15 \code{J} to \code{Q}, i.e., \code{LETTERS[1:17][-9]}.}
16 \item{nitrogen}{a factor specifying the amount of nitrogen
17 sulfate (\eqn{NH_4}), with the four levels \code{0,1,2,4}.}
18 \item{potash}{a factor specifying the amount of potassium (K,
19 \sQuote{kalium}) sulfate, with the four levels \code{0,1,2,4}.}
20 \item{yield}{a numeric vector giving the yield of potatoes in ...}% << FIXME
21 }
22 }
23 % \details{
24 % FIXME %% more details than the __description__ above ~~
25 % } %% ----
26 \source{
27 Bennett, J. H. (1972)
28 \emph{Collected Papers of R. A. Fischer} vol.~II, 1925-31;
29 The University of Adelaide.
30 %% One of the blocks, in the book
31 %% Stahel "Statist. Datenanalyse" Beisp.Kartoffelertrag (2nd ed. 251 a, 253 h)
32 }
33 \references{
34 T.Eden and R. A. Fisher (1929)
35 Studies in Crop Variation. VI. Experiments on the Response of the
36 Potato to Potash and Nitrogen.
37 \emph{J. Agricultural Science} \bold{19}, 201--213.
38 Accessible from Bennett (1972), see above.
39 }
40 \examples{
41 data(potatoes)
42 ## See the experimental design:
43 with(potatoes, {
44 cat("4 blocks of experiments;",
45 "each does every (nitrogen,potash) combination (aka 'treat'ment) once.",
46 '', sep="\n")
47 print(ftable(table(nitrogen, potash, treat)))
48 print(ftable(tt <- table(pos,potash,nitrogen)))
49 tt[cbind(pos,potash,nitrogen)] <- as.character(treat)
50 cat("The 4 blocks pos = 1, 2, 3, 4:\n")
51 ftable(tt)
52 })
53 ## First plot:
54 with(potatoes, interaction.plot(potash,nitrogen, response=yield))
55
56 ## ANOVAs:
57 summary(aov(yield ~ nitrogen * potash + Error(pos), data = potatoes))
58 # "==>" can use simply
59 summary(aov(yield ~ nitrogen + potash + pos, data = potatoes))
60 # and
61 summary(aov(yield ~ nitrogen + potash, data = potatoes))
62 }
63 \keyword{datasets}