ANOVA, Example 1


library('BayesFactor')

############################################
#BLOCK 1

#load data
#dat=read.table('aov1.dat',head=T)
dat=read.table(url('http://pcl.missouri.edu/jeff/sites/pcl.missouri.edu.jeff/files/aov1.dat'),head=T)

means=tapply(dat$rt,list(dat$pos,dat$col),mean)
barplot(means,beside=T)

#Anova
summary(aov(rt~pos*col,data=dat))

#######################################
#BLOCK 2
bfTop = anovaBF(rt~pos*col, data = dat,whichModels="top")

bfTop

1/bfTop

#######################################
#Block 3
bfAll = anovaBF(rt~pos*col, data = dat,whichModels="all")

bfAll

#######################################
#Block 4

bf = anovaBF(rt~pos*col, data = dat,whichModels="withmain")

bf

AttachmentSize
aov1.dat1.25 KB

Research Methods 3020