powered by
Researchers want to evaluate the effect of a new "treatment" and "exercise" on the stress score reduction after adjusting for "age".
Two-way ANCOVA can be performed in order to determine whether there is interaction between exercise and treatment on the stress score.
It is the data set used in the Datanovia tutorial “ANCOVA in R: Compare Group Means Adjusted for a Covariate” (https://www.datanovia.com/learn/biostatistics/anova/ancova-in-r).
data("stress")
A data frame with 60 rows and 5 columns (stored as a tibble).
participant identifier (1 to 60).
the stress score; a simulated measure on an arbitrary scale with no real-world units.
whether the participant received the treatment, "yes" or "no".
the exercise level, "low", "moderate" or "high".
the participant's age, in years.
Datanovia tutorial: ANCOVA in R: Compare Group Means Adjusted for a Covariate.
data(stress) head(stress) # Two-way ANCOVA of the stress score, adjusting for age summary(aov(score ~ age + treatment * exercise, data = stress))
Run the code above in your browser using DataLab