# ------------------------------------------------------------------------------ # Yan, M., Richter, E., Shu, H., & Kliegl, R. (2009). Chinese readers # extract semantic information from parafoveal words during reading. # Psychonomic Bulletin & Review, 16(3), 561-566. doi: 10.3758/PBR.16.3.561 # ------------------------------------------------------------------------------ # mingyan1981@gmail.com # ------------------------------------------------------------------------------ library(lme4) rm(list=ls()) load("Yan.Richter.Shu.Kliegl.PBR.16.2009.rda") data$cond <- factor(data$cond, levels=c( "unr", "sem", "ort", "idt", "pho")) # Fixation Duration Filter data1 = data[which(data$ffd > 60 & data$ffd < 600),] # Preview Benefit - First Fixation Duration Analysis print(lmer(ffd ~ cond + (1 | id) + (1 | sn), subset=region==5, data=data1), cor=FALSE) # - Single Fixation Duration Analysis print(lmer(ffd ~ cond + (1 | id) + (1 | sn), subset=region==5 & n_fix==1, data=data1), cor=FALSE) # - Gaze Fixation Duration Analysis print(lmer(gd ~ cond + (1 | id) + (1 | sn), subset=region==5, data=data1), cor=FALSE) # Parafoveal-on-Foveal Effect - First Fixation Duration Analysis print(lmer(ffd ~ cond + (1 | id) + (1 | sn), subset=region==4, data=data1), cor=FALSE) # - Single Fixation Duration Analysis print(lmer(ffd ~ cond + (1 | id) + (1 | sn), subset=region==4 & n_fix==1, data=data1), cor=FALSE) # - Gaze Fixation Duration Analysis print(lmer(gd ~ cond + (1 | id) + (1 | sn), subset=region==4, data=data1), cor=FALSE) # Skipping Rate of Target Word Analysis data2 = data data2$skip <- ifelse(data2$n_fix==0, 1, 0) print(glmer(skip ~ cond + (1 | id) + (1 | sn), subset=region==5, data=data2, family=binomial), cor=FALSE)