I've the following dataset:
Minutes <- rep(0:10, each=5)
Minutes <- factor(Minutes)
Subject <- rep(1:5,time=11)
Measurement <- rnorm(55, mean=40, sd=7)
df <- data.frame(Subject, Measurement, Minutes)
I want an ANOVA matrix with p-values (like the following) that testing "Measurement" over "Minutes" :
Minute0 Minute1 Minute2 Minute3 Minute4 ... Minute10
Minute0
Minute1
Minute2
Minute3
Minute4
...
Minute10
any ideas? GGally allowing this?
You can use the pairwise.t.test {stats} function in which you specify the response variable, and then the categorical explanatory variable containing the factor levels you want to be compared, separated by a comma
pairwise.t.test(Measurement,Minutes)