% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/documentation.R
\docType{data}
\name{chapter_7_table_9}
\alias{chapter_7_table_9}
\alias{C7T9}
\alias{Chapter_7_Table_9}
\alias{c7t9}
\title{The data used in Chapter 7, Table 9}
\format{
An object of class \code{data.frame} with 6 rows and 3 columns.
}
\source{
\url{https://designingexperiments.com/data/}

Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). \emph{Designing experiments and
analyzing data: {A} model comparison perspective}. (4th ed.). New York, NY: Routledge.
}
\usage{
data(chapter_7_table_9)
}
\description{
The data used in Chapter 7, Table 9
}
\details{
Table 7.9 gives one additional observation for each of the six cells of the 2 (biofeedback: present or absent) by 3 (drug: X, Y, or Z) blood pressure design whose first five observations per cell appear in Table 7.5 (\code{chapter_7_table_5}). The additional observations are listed in the same cell order as Table 7.5: biofeedback paired with drug X, Y, and Z, followed by drugs X, Y, and Z administered alone. Stacking these six values onto Table 7.5 yields six observations per cell, and the cell means and marginal means of the combined data are those reported in Table 7.10 (reproduced in the examples below).
}
\note{
This data set's content changed for the 4th edition. In AMCP 1.x (3rd edition) it held a 36-row combined data set; it now holds the six \emph{additional} observations reported in the 4th edition's Table 7.9 (see Details).
}
\section{Variables}{

\describe{
\item{Score}{blood pressure}
\item{Feedback}{biofeedback condition (1 = present, 2 = absent, that is, drug administered alone)}
\item{Drug}{drug administered (1 = drug X, 2 = drug Y, 3 = drug Z)}}
}

\section{Synonym}{

C7T9
}

\examples{
# Load the data
data(chapter_7_table_9)

# Or, alternatively load the data as
data(C7T9)

# View the structure
str(chapter_7_table_9)

# ---------------------------------------------------------------------
# Table 7.9 supplies one additional observation for each of the six cells
# of the 2 (Feedback) x 3 (Drug) design in Table 7.5 (chapter_7_table_5).
# Stacking it onto Table 7.5 gives six observations per cell; the cell and
# marginal means of the combined data are those reported in Table 7.10.
data(chapter_7_table_5)
combined <- rbind(chapter_7_table_5, chapter_7_table_9)

# Cell means: a 2 (Feedback) x 3 (Drug) table -- Table 7.10
#   Feedback 1 = biofeedback present, 2 = absent; Drug 1 = X, 2 = Y, 3 = Z
tapply(combined$Score,
       list(Feedback = combined$Feedback, Drug = combined$Drug), mean)

# Marginal means and grand mean (also given in Table 7.10)
tapply(combined$Score, combined$Feedback, mean)  # 187 (present), 199 (absent)
tapply(combined$Score, combined$Drug, mean)      # 178 (X), 202 (Y), 199 (Z)
mean(combined$Score)                             # 193 (grand mean)

}
\references{
Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). \emph{Designing experiments and analyzing data:
{A} model comparison perspective} (4th ed.). New York, NY: Routledge.
}
\author{
Ken Kelley \email{kkelley@nd.edu}
}
\keyword{datasets}
