Learn R Programming

datarium (version 0.2.0)

performance: Performance Data for Three-Way Mixed ANOVA

Description

Contains the performance score measures of participants at two time points. The aim of this study is to evaluate the effect of gender and stress on performance score. The three-way mixed ANOVA test can be used to investigate this question.

The data include two between-subjects factors (gender and stress) and one within-subject factor (time, repeated measures).

It is the data set used in the Datanovia tutorial “Mixed ANOVA in R: One Between- and One Within-Subjects Factor” (https://www.datanovia.com/learn/biostatistics/anova/mixed-anova-in-r).

Usage

data("performance")

Arguments

Format

A data frame with 60 rows and 5 columns (stored as a tibble).

id

participant identifier (1 to 60).

gender

the participant's gender, "male" or "female".

stress

the stress level, "low", "moderate" or "high".

t1

a simulated performance score at the first time point (an arbitrary scale with no real-world units).

t2

the performance score at the second time point (same scale as t1).

See Also

Examples

Run this code
data(performance)
head(performance)

# Three-way mixed ANOVA: gender and stress (between) x time (within)
perf_long <- reshape(performance, varying = c("t1", "t2"),
                     v.names = "score", timevar = "time", direction = "long")
summary(aov(score ~ gender * stress * factor(time) + Error(factor(id)/factor(time)),
            data = perf_long))

Run the code above in your browser using DataLab