Learn R Programming

AMCP (version 2.0.0)

chapter_9_table_7: The data used in Chapter 9, Table 7

Description

The data used in Chapter 9, Table 7

Usage

data(chapter_9_table_7)

Arguments

Format

An object of class data.frame with 30 rows and 3 columns.

Variables

Condition

the treatment condition (SSRI, Placebo, Wait List Control)

Pre

the measure of depression before the experiment

Post

the measure of depression after the experiment

Synonym

C9T7

Author

Ken Kelley kkelley@nd.edu

Details

The data shown in Table 9.7 represents a hypothetical three-group study assessing different interventions for depression. 30 depressive individuals have been randomly assigned to one of three conditions: (1) selective serotonin reuptake inhibitor (SSRI) antidepressant medication, (2) placebo, or (3) wait list control. The Beck Depression Inventory (BDI) has been administered to each individual prior to the study, and then later is administered a second time at the end of the study. The data represents a three group pre-post design, where the 30 depressives were randomly assigned to one of three conditions. The primary question of interest is: "do individuals in some groups change more on their measures of depression than do individuals in other groups?"

References

Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). Designing experiments and analyzing data: A model comparison perspective (4th ed.). New York, NY: Routledge.

Examples

Run this code
# Load the data
data(chapter_9_table_7)

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

# View the structure
str(chapter_9_table_7)

# ---------------------------------------------------------------------
# Optional: a factor-coded copy for ANCOVA / model-comparison analyses.
# Condition is stored as a numeric code so the book's contrast and
# model-comparison examples reproduce exactly. For ANCOVA you want it as a
# factor; otherwise the code enters the model as a single linear (1 df)
# term. The covariate (Pre) stays numeric. Build a *copy* (suffix
# "_factors") so the canonical data set is left unchanged. Labels are
# taken from the "Variables" section above.
C9T7_factors <- chapter_9_table_7
C9T7_factors$Condition <- factor(C9T7_factors$Condition, levels = 1:3,
  labels = c("SSRI", "Placebo", "Wait List Control"))

# ANCOVA: enter the covariate (Pre) first, then the (factor) Condition;
# the adjusted test of Condition appears in the Condition row.
anova(lm(Post ~ Pre + Condition, data = C9T7_factors))

Run the code above in your browser using DataLab