Measures of cholesterol concentration in 72 participants treated with three different drugs. The aim is to examine the potential of new class of drugs in lowering the cholesterol concentration and consequently reducing heart attack.

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 heart attack.

This data set is suited for three way Anova test.

For a worked tutorial on this analysis, see the Datanovia lesson “Three-Way ANOVA in R: Three Factors and Their Interaction” (https://www.datanovia.com/learn/biostatistics/anova/three-way-anova-in-r).

data("heartattack")

Format

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

gender

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

risk

the participant's heart attack risk, "high" or "low".

drug

the drug received, "A", "B" or "C".

cholesterol

the blood cholesterol concentration.

id

participant identifier (1 to 72).

Source

A simulated dataset for teaching three-way ANOVA.

See also

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

Examples

data(heartattack)
head(heartattack)
#> # A tibble: 6 × 5
#>   gender risk  drug  cholesterol    id
#>   <fct>  <fct> <fct>       <dbl> <int>
#> 1 male   low   A            5.24     1
#> 2 male   low   A            5.08     2
#> 3 male   low   A            4.68     3
#> 4 male   low   A            5.36     4
#> 5 male   low   A            4.96     5
#> 6 male   low   A            4.83     6

# Three-way ANOVA of the cholesterol concentration
summary(aov(cholesterol ~ gender * risk * drug, data = heartattack))
#>                  Df Sum Sq Mean Sq F value   Pr(>F)    
#> gender            1  1.367   1.367  16.196 0.000163 ***
#> risk              1  7.825   7.825  92.699  8.8e-14 ***
#> drug              2  1.235   0.618   7.318 0.001433 ** 
#> gender:risk       1  0.012   0.012   0.141 0.708487    
#> gender:drug       2  0.564   0.282   3.338 0.042200 *  
#> risk:drug         2  0.120   0.060   0.713 0.494221    
#> gender:risk:drug  2  1.250   0.625   7.406 0.001334 ** 
#> Residuals        60  5.065   0.084                     
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1