Skip to content
Snippets Groups Projects
Commit d7b21f7e authored by Fernando Mayer's avatar Fernando Mayer
Browse files

Merge branch 'issue#11' into 'devel'

Issue#11: Datasets of the chapter 8

This branch brings
  - Datasets of the chapter 8. So, 5 data frames are included with the corresponding `data-raw/*.R` and `data/*.RData` files and documentation on the `R/legTools.R`;
  - @brunaw is included as a collaborator in the DESCRIPTION;

See merge request !13
parents 666fc529 e4ffb417
No related merge requests found
...@@ -19,13 +19,18 @@ These data are from an \eqn{2^2} factorial experiment ...@@ -19,13 +19,18 @@ These data are from an \eqn{2^2} factorial experiment
fertilization. fertilization.
\itemize{ \itemize{
\item \code{block} a factor with 4 levels. \item \code{block} a factor with 4 levels.
\item \code{mineral} low (-1) and high (+1) levels of mineral \item \code{mineral} low (-1) and high (+1) levels of mineral
fertilization. fertilization.
\item \code{cake} low (-1) and high (+1) levels of fetilization
with filter cake. \item \code{cake} low (-1) and high (+1) levels of fetilization with
\item \code{y} some response variable. The text book doesn't give filter cake.
any information.
\item \code{y} some response variable. The text book doesn't give any
information.
} }
} }
\examples{ \examples{
......
...@@ -21,11 +21,16 @@ These data are from an observational study along 3 years ...@@ -21,11 +21,16 @@ These data are from an observational study along 3 years
Novermber, December and January. Novermber, December and January.
\itemize{ \itemize{
\item \code{variety} a categorical variable with 6 levels that \item \code{variety} a categorical variable with 6 levels that
represents mango varieties studied. represents mango varieties studied.
\item \code{year} the year of harvesting. \item \code{year} the year of harvesting.
\item \code{month} the month of harvesting. \item \code{month} the month of harvesting.
\item \code{acid} mean of the acidity determined in 3 fruits. \item \code{acid} mean of the acidity determined in 3 fruits.
} }
} }
\examples{ \examples{
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{peanutYield}
\alias{peanutYield}
\title{Peanut variety competition experiments in some locations and
years}
\format{a \code{data.frame} with 36 records and 4 variables.}
\source{
Pimentel Gomes, F. (2009). Curso de Estatística Experimental
(15th ed.). Piracicaba, São Paulo: FEALQ. (page 150)
Souza, O. Ferreira de.; Abramides, Eduardo. (1952). Ensaios de
variedades de amendoim. Bragantia 12:349-358.
}
\usage{
data(peanutYield)
}
\description{
These data are from a set of experiments evaluating
varieties of peanut in terms of yield (kg/ha) for some locations
and years.
\itemize{
\item \code{variety} a categorical unordered factor with 4 levels,
peanut varieties.
\item \code{loc} a categorical unordered factor with 3 levels, the
locations (counties) of the experimental stations.
\item \code{year} a categorical factor, the crop year.
\item \code{meanYield} is the adjusted mean of yield for a variety in
each location and year.
}
}
\details{
The data in the book was not complete because doesn't report
individual plot values but the adjusted mean for a variety in
each single experiment. Neither mention which experimental design
was used in each station. The book report the Mean Square Error
estimates for each experiment. These values as provided as an
attribute of the object, \code{attr(peanut, "MSE")} and they
comes from the ANOVA table corresponding to an appropriate model
for each location. With these MSE is possible use them in a such
a way that a partial ANOVA table can be obtained to test the
effect of location, variety and its interaction.
}
\examples{
require(lattice)
data(peanutYield)
str(peanutYield)
xyplot(meanYield~variety|year, data=peanutYield,
groups=loc, type="o",
ylab=expression(Yield~(t~ha^{-1})),
xlab="Variety")
}
\keyword{datasets}
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{peanutYield2}
\alias{peanutYield2}
\title{Peanut variety competition experiments in some locations}
\format{a \code{data.frame} with 16 records and 3 variables.}
\source{
Pimentel Gomes, F. (2009). Curso de Estatística Experimental
(15th ed.). Piracicaba, São Paulo: FEALQ. (page 150)
Souza, O. Ferreira de.; Abramides, Eduardo. (1952). Ensaios de
variedades de amendoim. Bragantia 12:349-358.
}
\usage{
data(peanutYield2)
}
\description{
These data are from a set of experiments evaluating
varieties of peanut in terms of yield (kg/ha) for some locations
in different years.
\itemize{
\item \code{variety} a categorical unordered factor with 4 levels,
peanut varieties.
\item \code{loc} a categorical unordered factor with 4 levels, the
location:year of the experiment.
\item \code{meanYield} is mean of yield for a variety in each
location:year.
}
}
\details{
The data in the book was not complete because doesn't report
individual plot values but the adjusted mean for a variety in
each single experiment. Neither mention which experimental design
was used in each station. The book report the Mean Square Error
estimates for each experiment. These values as provided as an
attribute of the object, \code{attr(peanut, "MSE")} and they
comes from the ANOVA table corresponding to an appropriate model
for each location. With these MSE is possible use them in a such
a way that a partial ANOVA table can be obtained to test the
effect of location, variety and its interaction.
}
\examples{
require(lattice)
data(peanutYield2)
str(peanutYield2)
xyplot(meanYield~variety, data=peanutYield2,
groups=loc, type="o",
ylab=expression(Yield~(t~ha^{-1})),
xlab="Variety")
}
\keyword{datasets}
...@@ -22,9 +22,13 @@ These data are from an experiment done by the engineer ...@@ -22,9 +22,13 @@ These data are from an experiment done by the engineer
units for each factor level in each block. units for each factor level in each block.
\itemize{ \itemize{
\item \code{block} a categorical unordered factor with 6 levels. \item \code{block} a categorical unordered factor with 6 levels.
\item \code{plow} a categorical unordered factor with 2 levels. \item \code{plow} a categorical unordered factor with 2 levels.
\item \code{yield} corn yield (kg in 200 m\eqn{^2} of area). \item \code{yield} corn yield (kg in 200 m\eqn{^2} of area).
} }
} }
\examples{ \examples{
......
...@@ -19,10 +19,13 @@ These data are from an experiment done by the engineer ...@@ -19,10 +19,13 @@ These data are from an experiment done by the engineer
(t/ha) was recorded in each experimental unit. (t/ha) was recorded in each experimental unit.
\itemize{ \itemize{
\item \code{block} a categorical unordered factor with 4 levels. \item \code{block} a categorical unordered factor with 4 levels.
\item \code{variety} a categorical unordered factor with 8
levels. \item \code{variety} a categorical unordered factor with 8 levels.
\item \code{yield} potato yield (t/ha). \item \code{yield} potato yield (t/ha).
} }
} }
\examples{ \examples{
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{potatoYield2}
\alias{potatoYield2}
\title{Potato variety competition experiments in several locations}
\format{a \code{data.frame} with 56 records and 3 variables. There is
an attribute named \code{MSE}, a named vector containing the Mean
Squares Errors estimates for each experiment.}
\source{
Pimentel Gomes, F. (2009). Curso de Estatística Experimental
(15th ed.). Piracicaba, São Paulo: FEALQ. (page 147)
}
\usage{
data(potatoYield2)
}
\description{
These data are from a set of experiments done by the
engineer Oscar A. Garay at Balcare, Argentina. These experiments
were done in a randomized complete block design with 4 blocks and
at 7 locations on the potato production region at the Buenos
Aires province.
\itemize{
\item \code{variety} a categorical unordered factor with 8 levels,
varieties of potato.
\item \code{loc} a categorical unordered factor with 7 levels, the
locations that represent farms or experimental stations.
\item \code{sumYield} is the sum of yield for a variety in each
experiment. Then, this sum values across 4 blocks in each
experiment. To get the mean yield you should divide by 4. Yield
is t/ha.
}
}
\details{
The data in the book was not complete because doesn't report
individual plot values but, instead, the sum for a variety in
each experiment. To do a joint or global analysis, with all
locations, varieties and blocks, its necessary all individual
plot values. The book report the Mean Square Error estimates for
each experiment as an attribute of the object,
\code{attr(potatoYield2, "MSE")} and they comes from the ANOVA
table in which the model is \code{~block+variety} for each
location. The data set \link[legTools]{potatoYield} correspond
the location 3. With these MSE is possible use them in a such a
way that a partial ANOVA table can be obtained to test the effect
of location, variety and its interaction.
}
\examples{
require(lattice)
data(potatoYield2)
str(potatoYield2)
xyplot(sumYield/4~variety, data=potatoYield2,
groups=loc, type="o",
ylab=expression(Yield~(t~ha^{-1})),
xlab="Variety")
}
\keyword{datasets}
...@@ -19,10 +19,13 @@ These data are from an experiment done by The West São ...@@ -19,10 +19,13 @@ These data are from an experiment done by The West São
(kg/plot) was recorded in each experimental unit. (kg/plot) was recorded in each experimental unit.
\itemize{ \itemize{
\item \code{block} a categorical unordered factor with 4 levels. \item \code{block} a categorical unordered factor with 4 levels.
\item \code{variety} a categorical unordered factor with 7
levels. \item \code{variety} a categorical unordered factor with 7 levels.
\item \code{yield} sugarcane yield (kg/plot). \item \code{yield} sugarcane yield (kg/plot).
} }
} }
\examples{ \examples{
......
...@@ -18,14 +18,18 @@ These data are from an experiment done in a latin square ...@@ -18,14 +18,18 @@ These data are from an experiment done in a latin square
experimental unit. experimental unit.
\itemize{ \itemize{
\item \code{row} the rows of the latin square that controls in
one dimention. A categorical unordered factor with 5 levels. \item \code{row} the rows of the latin square that controls in one
\item \code{col} the columns of the latin square that controls in dimention. A categorical unordered factor with 5 levels.
one dimention perpendicular to the previus. A categorical
unordered factor with 5 levels. \item \code{col} the columns of the latin square that controls in one
\item \code{variety} a categorical unordered factor with 5 dimention perpendicular to the previus. A categorical unordered
levels. factor with 5 levels.
\item \code{variety} a categorical unordered factor with 5 levels.
\item \code{yield} sugarcane yield (kg/plot). \item \code{yield} sugarcane yield (kg/plot).
} }
} }
\examples{ \examples{
......
...@@ -18,16 +18,21 @@ These data are from an experiment done in a latin square ...@@ -18,16 +18,21 @@ These data are from an experiment done in a latin square
experimental unit. experimental unit.
\itemize{ \itemize{
\item \code{row} the rows of the latin square that controls in
one dimention. A categorical unordered factor with 6 levels. \item \code{row} the rows of the latin square that controls in one
\item \code{col} the columns of the latin square that controls in dimention. A categorical unordered factor with 6 levels.
one dimention perpendicular to the previus. A categorical
unordered factor with 6 levels. \item \code{col} the columns of the latin square that controls in one
\item \code{fertil} a categorical unordered factor with 6 dimention perpendicular to the previus. A categorical unordered
levels that is the fertilization strategy applied. These levels factor with 6 levels.
are a result of treatment cells in a three incomplete factorial
\item \code{fertil} a categorical unordered factor with 6 levels that
is the fertilization strategy applied. These levels are a result
of treatment cells in a three incomplete factorial
arrangrment. See detais for more information. arrangrment. See detais for more information.
\item \code{yield} sugarcane yield (kg/plot). \item \code{yield} sugarcane yield (kg/plot).
} }
} }
\details{ \details{
...@@ -58,7 +63,8 @@ levelplot(yield~row+col, ...@@ -58,7 +63,8 @@ levelplot(yield~row+col,
colors=brewer.pal(n=11, name="Spectral")))+ colors=brewer.pal(n=11, name="Spectral")))+
layer(with(sugarcaneYield3, layer(with(sugarcaneYield3,
panel.text(x=row, y=col, panel.text(x=row, y=col,
label=sprintf("\%s\\n\%0.2f", fertil, yield)))) label=sprintf("\%s\\n\%0.2f",
fertil, yield))))
aggregate(yield~row, data=sugarcaneYield3, FUN=mean) aggregate(yield~row, data=sugarcaneYield3, FUN=mean)
aggregate(yield~col, data=sugarcaneYield3, FUN=mean) aggregate(yield~col, data=sugarcaneYield3, FUN=mean)
......
...@@ -17,12 +17,19 @@ These data are from an \eqn{3^3} factorial experiment ...@@ -17,12 +17,19 @@ These data are from an \eqn{3^3} factorial experiment
studing the effect of NPK on the yield of sugar cane. studing the effect of NPK on the yield of sugar cane.
\itemize{ \itemize{
\item \code{block} a local control factor with 3 levels. \item \code{block} a local control factor with 3 levels.
\item \code{rept} factor with 2 levels. \item \code{rept} factor with 2 levels.
\item \code{N} integer coded nitrogen levels (0, 1, 2). \item \code{N} integer coded nitrogen levels (0, 1, 2).
\item \code{P} integer coded phosphorus levels (0, 1, 2). \item \code{P} integer coded phosphorus levels (0, 1, 2).
\item \code{K} integer coded potassium levels (0, 1, 2). \item \code{K} integer coded potassium levels (0, 1, 2).
\item \code{yield} sugar cane yield (ton/ha). \item \code{yield} sugar cane yield (ton/ha).
} }
} }
\details{ \details{
......
...@@ -19,13 +19,18 @@ These data are from an \eqn{2^2} factorial experiment ...@@ -19,13 +19,18 @@ These data are from an \eqn{2^2} factorial experiment
fertilization. fertilization.
\itemize{ \itemize{
\item \code{block} a factor with 4 levels. \item \code{block} a factor with 4 levels.
\item \code{mineral} low (-1) and high (+1) levels of mineral \item \code{mineral} low (-1) and high (+1) levels of mineral
fertilization. fertilization.
\item \code{vinasse} low (-1) and high (+1) levels of fetilization \item \code{vinasse} low (-1) and high (+1) levels of fetilization
with vinasse. with vinasse.
\item \code{y} some response variable. The text book doesn't give
any information. \item \code{y} some response variable. The text book doesn't give any
information.
} }
} }
\examples{ \examples{
......
...@@ -13,18 +13,20 @@ Pimentel Gomes, F. (2009). Curso de Estatística Experimental ...@@ -13,18 +13,20 @@ Pimentel Gomes, F. (2009). Curso de Estatística Experimental
data(wgPigs) data(wgPigs)
} }
\description{ \description{
This is an artifial dataset corresponding a experiment This is an artificial data set corresponding a
to study the effect of feeding type (factor with 4 categorical experiment to study the effect of feeding type (factor with 4
nominal levels) in pig weight gain. The experiment was a categorical nominal levels) in pig weight gain. The experiment
randomized complete design with five experimental units per was a randomized complete design with five experimental units per
treatment level. The experimental unit was a pig. The response treatment level. The experimental unit was a pig. The response
measured was weight gain from the beggining to the end of the measured was weight gain from the beginning to the end of the
experiment. experiment.
\itemize{ \itemize{
\item \code{ft} feeding type, a categorical factor with 4
levels. \item \code{ft} feeding type, a categorical factor with 4 levels.
\item \code{wg} weight gain (kg). \item \code{wg} weight gain (kg).
} }
} }
\examples{ \examples{
......
...@@ -22,15 +22,20 @@ This is an artifial dataset corresponding a experiment ...@@ -22,15 +22,20 @@ This is an artifial dataset corresponding a experiment
experiment. experiment.
\itemize{ \itemize{
\item \code{litter} a categorical factor with 4 levels that \item \code{litter} a categorical factor with 4 levels that
represents the rows of the lattin square design and control for represents the rows of the lattin square design and control for
the differences among litters. the differences among litters.
\item code{size} a categorical ordered variable that represents the \item code{size} a categorical ordered variable that represents the
columns of latin square desing and control for the weight of the columns of latin square desing and control for the weight of the
animals at the beggining of the experiment. animals at the beggining of the experiment.
\item \code{age} age of the animal (days) when castration was \item \code{age} age of the animal (days) when castration was
done. \code{controls} are the animals without castration. done. \code{controls} are the animals without castration.
\item \code{wg} weight gain (kg) after 252 days. \item \code{wg} weight gain (kg) after 252 days.
} }
} }
\examples{ \examples{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment