% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/documentation.R
\docType{data}
\name{chapter_4_table_1}
\alias{chapter_4_table_1}
\alias{C4T1}
\alias{Chapter_4_Table_1}
\alias{c4t1}
\title{The data used in Chapter 4, Table 1}
\format{
An object of class \code{data.frame} with 20 rows and 2 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_4_table_1)
}
\description{
The data used in Chapter 4, Table 1
}
\details{
This is hypothetical data for four groups of participants, corresponding to treatments for hypertension. The context is 24 mild hypertensives that have been independently and randomly assigned to one of the four treatments. The scores are the systolic blood pressure values two-weeks after the termination of treatment.
}
\section{Variables}{

\describe{
\item{\code{bloodpr}}{systolic blood pressure (hypothetical data)}
\item{\code{cond}}{identifies group membership (1=drug therapy; 2=biofeedback; 3=diet; 4=combination)}}
}

\section{Synonym}{

C4T1
}

\examples{
# Load the data
data(chapter_4_table_1)

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

# View the structure
str(chapter_4_table_1)

# ---------------------------------------------------------------------
# Optional: a factor-coded copy for ANOVA / model-comparison analyses.
# Group membership is stored as a numeric code so the book's contrast and
# model-comparison examples reproduce exactly. For a one-way ANOVA you
# generally want it as a factor; otherwise the code enters the model as a
# single linear (1 df) term. Build a *copy* (suffix "_factors") so the
# canonical data set is left unchanged. Labels are taken from the
# "Variables" section above.
C4T1_factors <- chapter_4_table_1
C4T1_factors$cond <- factor(C4T1_factors$cond, levels = 1:4,
  labels = c("Drug Therapy", "Biofeedback", "Diet", "Combination"))

# The coding matters: numeric code (1 df) versus factor (3 df).
anova(lm(bloodpr ~ cond, data = chapter_4_table_1))
anova(lm(bloodpr ~ cond, data = C4T1_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}
