Skip to content
Snippets Groups Projects
Commit 605a12bb authored by Walmes Zeviani's avatar Walmes Zeviani
Browse files

Add dataset of a 2^2 RBD experiment, Pimentel pg 120.

parent aa9a860d
Branches
No related tags found
No related merge requests found
...@@ -579,8 +579,9 @@ NULL ...@@ -579,8 +579,9 @@ NULL
#' @title Fertilization with vinasse and mineral #' @title Fertilization with vinasse and mineral
#' #'
#' @description These data are from an \eqn{2^2} factorial experiment #' @description These data are from an \eqn{2^2} factorial experiment
#' studing the effect of fertilizaton with vinasse (organic font) #' studing the effect of fertilizaton with vinasse (a residual from
#' and complete mineral fertilization. #' industrial processing of sugar cane) and complete mineral
#' fertilization.
#' #'
#' \itemize{ #' \itemize{
#' \item \code{block} a factor with 4 levels. #' \item \code{block} a factor with 4 levels.
...@@ -630,3 +631,67 @@ NULL ...@@ -630,3 +631,67 @@ NULL
#' summary(m1) #' summary(m1)
#' #'
NULL NULL
#' @name filterCake
#'
#' @title Fertilization with filter cake and mineral
#'
#' @description These data are from an \eqn{2^2} factorial experiment
#' studing the effect of fertilizaton with filter cake (a residual
#' from industrial processing of sugar cane) and traditional mineral
#' fertilization.
#'
#' \itemize{
#' \item \code{block} a factor with 4 levels.
#' \item \code{mineral} low (-1) and high (+1) levels of mineral
#' fertilization.
#' \item \code{cake} low (-1) and high (+1) levels of fetilization
#' with filter cake.
#' \item \code{y} some response variable. The text book doesn't give
#' any information.
#' }
#'
#' @docType data
#'
#' @keywords datasets
#'
#' @usage data(filterCake)
#'
#' @format a \code{data.frame} with 16 records and 4 variables.
#'
#' @source Frederico, P. (2009). Curso de Estatística Experimental (15th
#' ed.). Piracicaba, São Paulo: FEALQ. (page 120)
#'
#' @examples
#'
#' library(lattice)
#' library(latticeExtra)
#'
#' data(filterCake)
#' str(filterCake)
#'
#' xyplot(y~cake, groups=mineral,
#' auto.key=list(title="Mineral", columns=2),
#' data=filterCake, type=c("p", "a"),
#' ylab="y",
#' xlab="Filter cake level")
#'
#' m0 <- lm(y~block+(cake+mineral)^2, data=filterCake)
#' par(mfrow=c(2,2)); plot(m0); layout(1)
#' anova(m0)
#'
#' summary(m0)
#'
#' filterCake$Mineral <- factor(filterCake$mineral,
#' labels=c("absent", "present"))
#'
#' m1 <- aov(y~block+Mineral/cake, data=filterCake)
#' anova(m1)
#'
#' ## Split SS to see effect of cake in each level of mineral.
#' summary(m1, split=list("Mineral:cake"=list("absent"=1, "present"=2)))
#'
#' summary.lm(m1)
#'
#'
NULL
##----------------------------------------------------------------------
## Data generation.
filterCake <- expand.grid(block=gl(4, 1), mineral=c(-1, 1),
cake=c(-1, 1), KEEP.OUT.ATTRS=FALSE)
filterCake$y <- c(18.0, 8.6, 9.4, 11.4, 20.6, 21.0, 18.6, 20.6, 19.6,
15.0, 14.6, 15.8, 19.2, 19.6, 18.4, 20.2)
str(filterCake)
save(filterCake, file="../data/filterCake.RData")
##----------------------------------------------------------------------
## Examples.
library(lattice)
library(latticeExtra)
data(filterCake)
str(filterCake)
xyplot(y~cake, groups=mineral,
auto.key=list(title="Mineral", columns=2),
data=filterCake, type=c("p", "a"),
ylab="y",
xlab="Filter cake level")
m0 <- lm(y~block+(cake+mineral)^2, data=filterCake)
par(mfrow=c(2,2)); plot(m0); layout(1)
anova(m0)
summary(m0)
filterCake$Mineral <- factor(filterCake$mineral,
labels=c("absent", "present"))
m1 <- aov(y~block+Mineral/cake, data=filterCake)
anova(m1)
## Split SS to see effect of cake in each level of mineral.
summary(m1, split=list("Mineral:cake"=list("absent"=1, "present"=2)))
summary.lm(m1)
rm(list=ls())
load("../data/filterCake.RData")
ls()
str(filterCake)
File added
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{filterCake}
\alias{filterCake}
\title{Fertilization with filter cake and mineral}
\format{a \code{data.frame} with 16 records and 4 variables.}
\source{
Frederico, P. (2009). Curso de Estatística Experimental (15th
ed.). Piracicaba, São Paulo: FEALQ. (page 120)
}
\usage{
data(filterCake)
}
\description{
These data are from an \eqn{2^2} factorial experiment
studing the effect of fertilizaton with filter cake (a residual
from industrial processing of sugar cane) and traditional mineral
fertilization.
\itemize{
\item \code{block} a factor with 4 levels.
\item \code{mineral} low (-1) and high (+1) levels of mineral
fertilization.
\item \code{cake} low (-1) and high (+1) levels of fetilization
with filter cake.
\item \code{y} some response variable. The text book doesn't give
any information.
}
}
\examples{
library(lattice)
library(latticeExtra)
data(filterCake)
str(filterCake)
xyplot(y~cake, groups=mineral,
auto.key=list(title="Mineral", columns=2),
data=filterCake, type=c("p", "a"),
ylab="y",
xlab="Filter cake level")
m0 <- lm(y~block+(cake+mineral)^2, data=filterCake)
par(mfrow=c(2,2)); plot(m0); layout(1)
anova(m0)
summary(m0)
filterCake$Mineral <- factor(filterCake$mineral,
labels=c("absent", "present"))
m1 <- aov(y~block+Mineral/cake, data=filterCake)
anova(m1)
## Split SS to see effect of cake in each level of mineral.
summary(m1, split=list("Mineral:cake"=list("absent"=1, "present"=2)))
summary.lm(m1)
}
\keyword{datasets}
...@@ -14,8 +14,9 @@ data(vinasseFert) ...@@ -14,8 +14,9 @@ data(vinasseFert)
} }
\description{ \description{
These data are from an \eqn{2^2} factorial experiment These data are from an \eqn{2^2} factorial experiment
studing the effect of fertilizaton with vinasse (organic font) studing the effect of fertilizaton with vinasse (a residual from
and complete mineral fertilization. industrial processing of sugar cane) and complete mineral
fertilization.
\itemize{ \itemize{
\item \code{block} a factor with 4 levels. \item \code{block} a factor with 4 levels.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment