% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/documentation.R
\docType{data}
\name{chapter_7_table_5}
\alias{chapter_7_table_5}
\alias{C7T5}
\alias{Chapter_7_Table_5}
\alias{c7t5}
\title{The data used in Chapter 7, Table 5}
\format{
An object of class \code{data.frame} with 30 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_5)
}
\description{
The data used in Chapter 7, Table 5
}
\details{
This table represents hypothetical data from a study investigating the effects of biofeedback and drug therapy on hypertension. We (arbitrarily) refer to the presence or absence of biofeedback as factor A and to the type of drug as factor B.

The following data is a generalization of the blood pressure data given in Table 7.1 (as there are now three, rather than two, levels of the drug factor). In addition to assessing the likelihood of there being a biofeedback or a drug main effect, the interaction is explicitly taken into consideration.
}
\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}{

C7T5
}

\examples{
# Load the data
data(chapter_7_table_5)

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

# View the structure
str(chapter_7_table_5)

# ---------------------------------------------------------------------
# Optional: a factor-coded copy for factorial ANOVA / model comparison.
# Feedback and Drug are stored as numeric codes so the book's contrast and
# model-comparison examples reproduce exactly. For a factorial ANOVA you
# want them as factors; otherwise a code enters the model as a single
# linear (1 df) term. The "Variables" section does not give level labels,
# so the numeric codes are kept as the factor levels. Build a *copy*
# (suffix "_factors") so the canonical data set is left unchanged.
C7T5_factors <- chapter_7_table_5
C7T5_factors$Feedback <- factor(C7T5_factors$Feedback)
C7T5_factors$Drug     <- factor(C7T5_factors$Drug)

# This design is balanced, so the factorial ANOVA is order-invariant.
anova(lm(Score ~ Feedback * Drug, data = C7T5_factors))

}
\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}
