posthoc - Post hoc tukey test for two way mixed model ANOVA -
i , of students have searched solution in numerous places no luck , literally months. keep on being referred lme command not want use. output provided not 1 colleagues or myself have used on 15 years. given using r teaching tool, not flow following t-tests, , one-way anovas intro stats students. conducting 2 way rm anova 1 factor repetition. have succeeded in getting r replicate sigmaplot gives main effects. post hoc analysis given r differs same post hoc in sigmaplot. here code used - notes (as using teach students).
#iv between: ivb1 - independent variable - between subject factor #iv within: ivw1 - independent variable - within subject factor #dv: dv - dependent variable. aov1= aov(dv ~ ivb1*ivw1 + error(subject/ivw1)+(ivb1), data=objectl) summary(aov1) # post hoc analysis ph1=tukeyhsd(aov(dv ~ ivb1*ivw1, data=objectl)) ph1
i hope can help. thank you!
i have had problem , find convenient alternative aov_ez() function afex package instead of aov(), , performed post hoc analysis using lsmeans() instead of tukeyhsd():
model <- aov_ez(data, id="subjid", dv="dv", within=c("ivw1", "ivw2"), between = "ivb1") # post hoc comp = lsmeans(model,specs = ~ ivb1: ivw1: ivw2, adjust = "tukey") contrast(comp,method="pairwise")
you find detailed tutorial here:
https://www.psychologie.uni-heidelberg.de/ae/meth/team/mertens/blog/anova_in_r_made_easy.nb.html
Comments
Post a Comment