(Research Methods for Human Inquiry) actual set 2
sample with solutions fall 2026 University of
Melbourne
RMHI/ARMP Problem Set 2 Solutions
Your name and ID goes here [Word Count: XX]
This document has indicative solutions and discussion of what we were looking for, but is
not an exhaustive compendium of all possible ways of answering the question. Credit was
given for correct answers that followed the constraints of the question but did it another
way. It is best to combine this with the comments left by your marker in order to make full
use of the feedback.
Q1
Q1a
,# create descriptive statistics
dssum <- ds %>%
group_by(person) %>%
summarise(mean = mean(length),
sd = sd(length),
n = n(),
stderr = sd/sqrt(n)) %>%
ungroup()
# plot descriptive statistics
dssum %>%
ggplot(mapping=aes(x=person,y=mean,fill=person)) +
geom_jitter(data=ds,mapping=aes(x=person,y=length,colour=person),
alpha=0.7,show.legend=FALSE) +
geom_col(colour="black",position="dodge",
show.legend=FALSE,alpha=0.5) +
geom_errorbar(mapping=aes(ymin = mean-stderr,
ymax=mean+stderr),width=0.2) +
theme_bw() +
scale_fill_brewer(palette="Set1") +
scale_colour_brewer(palette="Set1") +
labs(title = "Seconds observing by person taking shift",
x="Name of person",
y="Number of seconds")
, Q1b
# get the model
q1 <- aov(length ~ person, data=ds)
# levene test for homogeneity of variance
leveneTest(q1)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 0.4662 0.6297
## 57
# shapiro test for normality
shapiro.test(x=q1$residuals)
##
## Shapiro-Wilk normality test
##
## data: q1$residuals
## W = 0.96825, p-value = 0.1198