Learn R Programming

datarium (version 0.2.0)

headache: Headache Data for Three Way ANOVA

Description

A pharmaceutical company tested three treatments for migraine headache sufferers. 72 participants were enrolled in the experiments. The aim is to examine the potential of new class of treatments in lowering the pain score associated with the migraine headache episode.

The participants include 36 males and 36 females. Males and females were further (equally) subdivided into whether they were at low or high risk of migraine headache.

This data set is suited for three way Anova test.

It is the data set used in the Datanovia tutorial “Three-Way ANOVA in R: Three Factors and Their Interaction” (https://www.datanovia.com/learn/biostatistics/anova/three-way-anova-in-r).

Usage

data("headache")

Arguments

Format

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

id

participant identifier (1 to 72).

gender

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

risk

the participant's migraine risk, "high" or "low".

treatment

the treatment received, "X", "Y" or "Z".

pain_score

a simulated migraine pain score (an arbitrary scale with no real-world units).

See Also

heartattack, the companion three-way ANOVA data set. Datanovia tutorial: Three-Way ANOVA in R: Three Factors and Their Interaction.

Examples

Run this code
data(headache)
head(headache)

# Three-way ANOVA of the pain score
summary(aov(pain_score ~ gender * risk * treatment, data = headache))

Run the code above in your browser using DataLab