# Mixed model F1- and F2-anovas over subjects and words, respectively #getwd() #setwd( ...) #install.packages("reshape") library(reshape) ############## Part 1 ####################################### rm(list=ls()) load("MaskedPriming.rda") d.rs <- melt(d, id=c("subjects", "words", "e", "f", "p"), measure=c("srt", "lrt", "rrt"), variable="RT") # ...subjects d.id <- cast(d.rs, e+subjects+f+p ~ RT, mean) table(d.id$f, d.id$p, d.id$e) table(d.id$subjects) summary(aov.srt <- aov(srt ~ e*f*p + Error(subjects/(f*p)), data=d.id)) # ... words d.st <- cast(d.rs, f+words+e+p ~ RT, mean) table(d.st$f, d.st$p, d.st$e) table(d.st$words) # ... ANOVA for Bodner & Masson (1997, Exp. 1 & Exp 2) summary(aov.srt <- aov(srt ~ f*e*p + Error(words/(e*p)), data=d.st, subset=e != "3")) # ... ANOVA for Kinoshita (2006) summary(aov.srt <- aov(srt ~ f*p + Error(words/(p)), data=d.st, subset=e == "3")) # Ms and SDs in sequence in which they are cited in the paper. library(reshape) d.l <- melt(d.id, id=c("e","subjects", "f", "p")) # main effect of visfam cast(d.l, e ~ ., function(x) c(M=round(mean(x)*1000), SD=round(sd(x)*1000)), subset=RT=="srt") # main effect of frequency cast(d.l, f ~ ., function(x) c(M=round(mean(x)*1000), SD=round(sd(x)*1000)), subset=RT=="srt") # interaction of visfam and priming cast(d.l, e ~ p, function(x) c(M=round(mean(x)*1000), SD=round(sd(x)*1000)), subset=RT=="srt") # interaction for visfam and frequency cast(d.l, e ~ f, function(x) c(M=round(mean(x)*1000), SD=round(sd(x)*1000)), subset=RT=="srt")