Learn R Programming

AMCP (version 2.0.0)

chapter_9_table_12: The data used in Chapter 9, Table 12

Description

The data used in Chapter 9, Table 12

Usage

data(chapter_9_table_12)

Arguments

Format

An object of class data.frame with 18 rows and 4 columns.

Variables

Block

a numeric vector between 1 and 3, equal to the block of elderly participants (6 per block)

Task

the task given

X

age

Y

error scores

Synonym

C9T12

Author

Ken Kelley kkelley@nd.edu

Details

The question of interest in the present situation assumes that there are three blocks of elderly participants, six per block. The elderly participants are sorted into the three blocks as a function of their age. The purpose of the study was to assess the effect of age on motor control, measured by the number of errors on a certain task (where there were three tasks). The goal here is to replicate the results from the top portion of Table 9.12 (At this point performing the ANOVA and the ANCOVA also included in Table 9.12 should be straightforward.

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_12)

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

# View the structure
str(chapter_9_table_12)

# ---------------------------------------------------------------------
# Optional: a factor-coded copy for model-comparison analyses / plotting.
# Block and Task are stored as numeric codes so the book's examples
# reproduce exactly. 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. The
# covariate X (age) and the outcome Y stay numeric.
C9T12_factors <- chapter_9_table_12
C9T12_factors$Block <- factor(C9T12_factors$Block)
C9T12_factors$Task  <- factor(C9T12_factors$Task)

# The book analyzes these data with ANOVA and ANCOVA (Table 9.12); build
# the factor copy, then follow the book's procedure (age, X, is the
# covariate, kept numeric).
str(C9T12_factors)

Run the code above in your browser using DataLab