% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/documentation.R
\docType{data}
\name{chapter_7_table_16}
\alias{chapter_7_table_16}
\alias{C7T16}
\alias{Chapter_7_Table_16}
\alias{c7t16}
\title{The data used in Chapter 7, Table 16}
\format{
An object of class \code{data.frame} with 22 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_16)
}
\description{
The data used in Chapter 7, Table 16
}
\details{
The following hypothetical salary data represents a nonorthogonal two-by-two factorial design. The first factor (sex) is crossed with college (degree or no degree). The primary question of interest is whether or not there is sex discrimination in terms of salary.

The data in Table 7.16 presents hypothetical data (in thousands) for 12 females and 10 males who have just been hired by the organization. The mean salary for the 12 females is $22,333, whereas the mean for the 10 males is $22,100. The data in Table 7.16 also contains information about an additional characteristic of employees, namely whether they received a college degree. It is clear from the data that a majority of the new female employees are college graduates, whereas a majority of the males are not.
}
\note{
Renumbered for the 4th edition: in the 3rd edition (AMCP 1.x) these data were Table 7.15 (\code{chapter_7_table_15} / \code{C7T15}). The data are unchanged.
}
\section{Variables}{

\describe{
\item{Sex}{gender (male vs female)}
\item{Education}{education level (degree vs no degree)}
\item{Salary}{salary (in thousands)}
}
}

\section{Synonym}{
 
C7T16
}

\examples{
# Load the data
data(chapter_7_table_16)

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

# View the structure
str(chapter_7_table_16)

# ---------------------------------------------------------------------
# Optional: a factor-coded copy for model-comparison analyses / plotting.
# Sex and Education are stored as numeric codes so the book's examples
# reproduce exactly. Build a *copy* (suffix "_factors") so the canonical
# data set is left unchanged; Salary stays numeric. The level order is
# fixed by the counts in the narrative: the data have 12 cases in Sex == 1
# and 10 in Sex == 2, matching the "12 females and 10 males", and the
# female majority are graduates, so Education == 1 is the degree group.
C7T16_factors <- chapter_7_table_16
C7T16_factors$Sex <- factor(C7T16_factors$Sex, levels = 1:2,
  labels = c("Female", "Male"))
C7T16_factors$Education <- factor(C7T16_factors$Education, levels = 1:2,
  labels = c("Degree", "No Degree"))

# This is a NONORTHOGONAL (unbalanced) two-way design, so the sums of
# squares are order-dependent; the book reports the appropriate tests.
# Build the factor copy, then follow the book's procedure (e.g.,
# car::Anova() for Type II/III) rather than the default anova(lm()).
str(C7T16_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}
