Exercise 6.3: Linear regression vs t-test on the armpit dataset

statOmics, Ghent University (https://statomics.github.io)

Author

Lieven Clement, Jeroen Gilis and Milan Malfait

1 Smelly armpit dataset

Smelly armpits are not caused by sweat, itself. The smell is caused by specific micro-organisms belonging to the group of Corynebacterium spp. that metabolise sweat. Another group of abundant bacteria are the Staphylococcus spp., these bacteria do not metabolise sweat in smelly compounds.

The CMET-group at Ghent University does research to on transplanting the armpit microbiome to save people with smelly armpits.

  • Proposed Therapy:

    1. Remove armpit-microbiome with antibiotics
    2. Influence armpit microbiome with microbial transplant, see this 2 minute talk on youtube
  • Experiment:

    • 20 students with smelly armpits are attributed to one of two treatment groups
    • placebo (only antibiotics)
    • transplant (antibiotica followed by microbial transplant).
    • The microbiome is sampled 6 weeks upon the treatment
    • The relative abundance of Staphylococcus spp. on Corynebacterium spp. + Staphylococcus spp. in the microbiome is measured via DGGE (Denaturing Gradient Gel Electrophoresis).

2 Goal

The overarching goal of this research was to assess if the relative abundance Staphylococcus spp. in the microbiome of the armpit is affected by transplanting the microbiome. To this end the researchers randomized patients to two treatment: A treatment with antibiotics only and a treatment with antibiotics and a microbial transplant.

In the tutorial on hypotheses testing we will use a formal statistical test to generalize the results from the sample to that of the population.

3 Import the dataset

Code
# Load the libraries
library(tidyverse)

Import the data

Code
ap <- read_csv("https://raw.githubusercontent.com/statOmics/PSLSData/main/armpit.csv")
Rows: 20 Columns: 2
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): trt
dbl (1): rel

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Code
glimpse(ap)
Rows: 20
Columns: 2
$ trt <chr> "placebo", "placebo", "placebo", "placebo", "placebo", "placebo", …
$ rel <dbl> 54.99208, 31.84466, 41.09948, 59.52064, 63.57341, 41.48649, 30.440…

4 Data Exploration

A crucial first step in a data analysis is to visualize and to explore the raw data.

Code
ap |>
  ggplot(aes(x = trt, y = rel, fill = trt)) +
  geom_boxplot(outlier.shape = NA) +
  geom_point(position = "jitter") +
  ylab("relative abundance (%)") +
  xlab("treatment group") +
  stat_summary(
    fun = mean, geom = "point",
    shape = 5, size = 3, color = "black",
  )

We clearly see that, on average, the subjects who had a microbial transplant have a higher relative abundance of Staphylococcus spp. But is this difference statistically significant so that we can generalized what we observe in the sample to the population?

We can test this with an unpaired, two-sample t-test, which falsifies the null hypothesis that there is on average no difference in relative abundance of Staphylococcus in the armpit microbiome between the transplant and the placebo group against the alternative hypothesis that there is a difference in average abundance of Staphyloccocus in the armpit microbiome between the transplant and placebo treatment.

But, before we can start the analysis, we must check if all assumptions to perform a t-test are met.

5 Analysis

5.1 Check the assumptions

  1. The observations are independent. This has to be guaranteed by the design.

  2. The data (rel) are normally distributed in each of the groups

  3. The variability within both groups is similar.

To check the normality assumption, we will use QQ plots.

Code
ap |>
  ggplot(aes(sample = rel)) +
  geom_qq() +
  geom_qq_line() +
  facet_grid(cols = vars(trt))

We can see that all of the data lies nicely around the quantile-quantile line (black line). As such, we may assume that our data are normally distributed.

For the third assumption, we must compare the within-group variability of both groups. We can do this visually:

Code
ap |>
  ggplot(aes(x = trt, y = rel)) +
  geom_boxplot(outlier.shape = NA) +
  geom_point(position = "jitter") +
  ylab("relative abundance (%)") +
  xlab("treatment group") +
  stat_summary(
    fun = mean, geom = "point",
    shape = 5, size = 3, color = "black",
)

Here we can see that the interquartile range is approximately equal for groups.

As all three assumptions are met we may continue with performing the unpaired two-sample t-test.

5.2 Hypothesis test

Code
output <- t.test(
  rel ~ trt,
  data = ap,
  conf.level = 0.95,
  var.equal = TRUE
)
output

    Two Sample t-test

data:  rel by trt
t = -5.0334, df = 18, p-value = 8.638e-05
alternative hypothesis: true difference in means between group placebo and group transplant is not equal to 0
95 percent confidence interval:
 -31.53191 -12.96072
sample estimates:
   mean in group placebo mean in group transplant 
                44.15496                 66.40127 

5.3 Conclusion

On average the relative abundance of Staphylococcus spp. in the microbiome of the armpit in the transplant group is extremely significantly different from that in the placebo group (\(p<<0.001\)). The relative abundance of Staphylococcus spp. is on average 22.2% larger in the transplant group than in the placebo group (95% CI [13.0,31.5]%).

6 Data Analysis with a linear model

6.1 Fit the model

We do not need to check the assumptions again because we have done this already in the data exploration when analysing the data using the t-test.

Code
mod <- ...

6.2 Inference

  1. hypothesis test
Code
...
  1. confidence interval
Code
...
  1. How do your results compare to the analysis with the t-test.

  2. Formulate your conclusion based on the output of the linear model.