A psychologist was interested whether certain TV shows result in a more positive attitude towards life. In a study, the participants were randomly allocated to four rooms to view one of the following: The Muppet Show, Game of Thrones, ONENEWS, no show (control). After the experiment a blood sample was taken and serotonin levels (happy hormone) were measured (the more serotonin the happier!).

  a) Perform an exploratory data analysis (draw a boxplot).

  b) Run an analysis of variance (ANOVA) model using the lm function.

  c) Check the model diagostic plots for violoations of the variance homogeneity and normality assumptions.

  d) Perform a post-hoc test to determine which groups differ significantly from each other (use the emmeans package and/or the multcomp package).

  e) Create a publication-quality figure containing statistical annotation (e.g. lower case letters indicating significant differences between groups).

 

show <- gl(n = 4, k = 7, labels = c("Control", "The Muppet Show", "Game of Thrones", "ONENEWS"))
serotonin <- c(7, 7, 5, 4, 3, 4, 4, 11, 7, 8, 14, 11, 10, 5, 4, 8, 6, 11, 9, 8, 7, 4, 3, 2, 2, 3, 6, 3)
tv.att <- data.frame(serotonin, show)