## Loading required package: sm
## Package 'sm', version 2.2-5.4: type help(sm) for summary information
3 way ANOVA
invalid location ( invalid-horiz vs invalid-vert), hemifield (temporal vs nasal), and dominant eye (right vs left)
Overall_anova<- read.table("3way_ANOVA.txt", header=TRUE)
fm <- aov(Acc ~ Hemifield * invalid_location * Domi_eye, data = Overall_anova)
summary(fm)
## Df Sum Sq Mean Sq F value Pr(>F)
## Hemifield 1 0.0015 0.00151 0.129 0.71978
## invalid_location 1 0.0867 0.08667 7.448 0.00737 **
## Domi_eye 1 0.0394 0.03936 3.382 0.06855 .
## Hemifield:invalid_location 1 0.0005 0.00052 0.045 0.83283
## Hemifield:Domi_eye 1 0.0002 0.00018 0.015 0.90202
## invalid_location:Domi_eye 1 0.0219 0.02186 1.878 0.17325
## Hemifield:invalid_location:Domi_eye 1 0.0041 0.00408 0.350 0.55510
## Residuals 112 1.3032 0.01164
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Violin Plots
Nasal hemifield Accuracy
Nasal_vio <- read.table("Nasal_Acc_vio.txt", header=TRUE)
data_cl <- function(x) {
m <- mean(x)
ymin <- m-1.96*(sd(x)/sqrt(length(x)))
ymax <- m+1.96*(sd(x)/sqrt(length(x)))
return(c(y=m,ymin=ymin,ymax=ymax))
}
p1 <- ggplot(Nasal_vio, aes(x=type, y=Acc,color=type)) +
geom_point()+
#ylim(0, 2)+
geom_violin(size = 3)+
scale_x_discrete(limits=c('valid', 'Invalid-hori', 'Invalid-verti'))+
stat_summary(fun.data = data_cl, geom = "crossbar", width = 0.2,size = 2)+
scale_fill_discrete(guide=FALSE)+
ylab("Accuracy")+
theme(axis.text.x = element_text(face="bold", color="#000000", size=20),
axis.text.y = element_text(face="bold", color="#000000", size=20),
axis.title.y = element_text(size=20),
legend.position = 'none')
p1

Temporal hemifield Accuracy

Combined data Accuracy

Combined data RT

Combined data Invalid_horizontal-Invalid_vertical
