I have a survey that was conducted in 3 different classes ( math, phys, bio) at the beginning and at the end of the semester ( pre and post). In the survey, there were 3 groups of questions (A, B, C) and a Likert-type scale. I converted all the answer into the numerical score
I have the following dataset with the following columns: Subject: math, physics, bio Survey: pre and post q: A, B, and C Score: values ranging 1-7
I want to test for each course for each question type whether the is a difference in score between pre and post-term survey. I conducted paired t-test but my question is do I need a Bonferroni correction here?
Here is some simulated data and the code for paired t-test:
df= data.frame( survey = rep(c("pre","post"),60), subject = rep(c("bio", "math", "phys"),40), q = rep(c("A", "B", "C"),40), score = sample(x=1:7, size = 120, replace = TRUE)) df df %>% group_by(subject, q) %>% t_test(score ~ survey, paired = TRUE, detailed = TRUE) %>% add_significance()