User Tools

Site Tools


twoway_repeated_measure_anova

10_rmanova.csv

acne <- read.csv("http://commres.net/wiki/_media/r/10_rmanova.csv")
str(acne)
acne

# install.packages("reshape")
library(reshape)

acne.re <- reshape(acne, direction="long", varying=3:6, sep="")

str(acne.re)
acne.re$group <- factor(acne.re$group)
acne.re$id <- factor(acne.re$id)
acne.re$time <- factor(acne.re$time)
str(acne.re)

attach(acne.re)
acne.re.anova <- aov(month~group*time, data=acne.re)
summary(acne.re.anova)

interaction.plot(acne.re$time, acne.re$group, acne.re$month)

twoway_repeated_measure_anova.txt · Last modified: 2022/05/10 10:28 by hkimscil