We can see that the 95% CI’s overlap, so the groups are probably not that different. To be sure, we need to do a 2-sample test! But this is not a statistics class.
Some people will tell you that coding like this is “bad”. But ‘bad’ code that gives you answers is better than broken code! We will learn techniques for writing this with less work and less repetition in upcoming modules.
Q1: Googling a package
# install.packages("DescTools")library(DescTools)aggregate(DP_infection ~ group, data = diph, FUN = DescTools::MeanCI)
It appears that prevalence was HIGHER in the vaccine group? That is counterintuitive, but the sample size for the unvaccinated group is too small to be sure.
Congratulations for finishing the first case study!
What R functions and skills did you practice?
What other questions could you answer about the same dataset with the skills you know now?