--- title: "Korean Boundary Experiment" author: "Reinhold Kliegl & Ming Yan" date: "2019-06-19 (last revision: `r format(Sys.time())`" output: html_document: number_sections: yes toc: yes toc_depth: 3 toc_float: yes editor_options: chunk_output_type: console --- # Abstract {-} Yan, Wang, Song, Pan, & Kliegl (2019). Parafoveal Processing of Semantics and Phonology in Reading of Korean Sentences. The present study sets out to address two fundamental questions in the reading of continuous texts: Whether semantic and phonological information from upcoming words can be accessed during natural reading. In the present study we investigated parafoveal processing during the reading of Korean sentences, manipulating semantic and phonological information from parafoveal preview words. In addition to the first evidence for a semantic preview effect in Korean, we found that Korean readers have stronger and more long-lasting phonological than semantic activation from parafoveal words in second-pass reading. The present study provides an example that human mind can flexibly adjust processing priority to different types of information based on the linguistic environment. For TRT preview benefits decrease from identical (largest) over phonological (medium) to semantic (small). In addition to the _a priori_ preview-benefit contrasts (i.e., unrelated - other conditions), we analyzed the data with two sets of _post_hoc_ contrasts. First, we tested preview-costs by subtracting identical from the other conditions. Second, we compared the "neighboring" conditions (i.e., unr - pho, pho - sem, sem - idt). (Some of the contrasts appear several times.) With _a posteriori_ preview-cost contrasts (i.e., other conditions - identical) we find an increase of semantic preview cost with increasing preview time (i.e., interaction between preview time and the difference between semantic - identical preview) for all three measures (FFD, GD, TRT). There is no significant difference between phonological and semantic preview for any of three measures. # Setup ```{r include=FALSE} require("MASS") require("gtools") require("lme4") require("RePsychLing") require("remef") require("sjPlot") require("tidyverse") ``` # Preprocessing ## Reading data and recoding variables ```{r include=FALSE} load("data_v2x1.rda") target$lfd <- log(target$ffd) target$lgd <- log(target$gd) target$ltrt <- log(target$trt) target$Subj <- factor(target$id) target$Item <- factor(target$sn) target$Preview <- factor(target$cond, levels=4:1, labels=rev(c("IDT", "SEM", "PHO", "UNR"))) # default condition contrast contrasts(target$Preview) <- (-1)*contr.sdif(4) # inverted to subtract fast from slow conditions (mostly) target <- as_tibble(target) ``` ## Selection Data selection is based on Ming Yan's data.frame _data_v2x.rda_ and R script _target_v3x.R_ (2018-11-01). Selection occurs in two steps. 1. We select all fixations on the target word _n_ that could be used if we ignore covariates from the preboundary word _n0_ (`target1`). This involves the usual constraints on minima and maxima of durations, regressions, and display-change. 2. We select the subset of `target1` fixations that were preceded by one fixation on word _n0_ (i.e., `target$n_fix_n0 == 1`). ### Preliminary checks and statistics ```{r include=FALSE} # duration constraints MINFFD = 60 MAXFFD = 600 MAXGD = 1000 # "tracker error" trials length(unique(target$Subj))*length(unique(target$Item)) - nrow(unique(target[,c("Subj", "Item")])) nrow(unique(target[,c("Subj", "Item")]))/(length(unique(target$Subj))*length(unique(target$Item))) # too long fd or gd targetx = target[target$ffd > 0,] nrow(targetx) - length(which(target$ffd > MINFFD & target$ffd < MAXFFD & target$gd < MAXGD)) # percentage of filtered observations due to fixation duration 1 - length(which(target$ffd > MINFFD & target$ffd < MAXFFD & target$gd < MAXGD))/nrow(targetx) # percentage of filtered observations due to regression length(which(targetx$out_sac_len_n0 < 0))/nrow(targetx) # percentage of filtered observations due to late display change length(which(targetx$dc_sac_e<=0 | targetx$edc==1))/nrow(targetx) ``` ### Select preboundary-target word pairs ```{r include=FALSE} target1 = target[which(target$ffd > MINFFD & target$ffd < MAXFFD & target$gd < MAXGD & target$ffd_n0 > MINFFD & target$ffd_n0 < MAXFFD & target$n_fix_n0 == 1 & target$out_sac_len_n0 > 0 & target$dc_sac_e > 0 & target$edc == 0 ),] nrow(target1) nrow(target1)/nrow(targetx) ``` ### Preview time and preview space ```{r include=FALSE} target1$prev_dur <- target1$lst_fd_n0 target1$lpd <- log(target1$prev_dur) target1$lpd.c <- target1$lpd - mean(target1$lpd) target1$prev_spc <- target1$lst_fl_n0 target1$ps.c <- target1$prev_spc - mean(target1$prev_spc) ``` # Linear mixed models ## Preview-benefit contrasts We estimate three preview benefits (phonological, semantic, identical) using unrelated preview as base. ```{r} levels(target1$Preview) contrasts(target1$Preview) <- contr.treatment(4, base=1) mm1 <- model.matrix( ~ Preview, target1) target1$up <- mm1[,2] target1$us <- mm1[,3] target1$ui <- mm1[,4] ``` ## FFD ```{r cache=TRUE, message=FALSE} # max LMM lmm1_max_ffd <- lmer(lfd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c | Subj) + (1+up+us+ui+lpd.c+ps.c | Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_max_ffd)) VarCorr(lmm1_max_ffd) # zcp LMM lmm1_zcp_ffd <- lmer(lfd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_zcp_ffd)) VarCorr(lmm1_zcp_ffd) # prsm LMM lmm1_prsm_ffd <- lmer(lfd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_prsm_ffd)) # ok VarCorr(lmm1_prsm_ffd) print(summary(lmm1_prsm_ffd), corr=FALSE) anova(lmm1_prsm_ffd, lmm1_zcp_ffd, lmm1_max_ffd) ``` ## GD ```{r cache=TRUE, message=FALSE} # max LMM lmm1_max_gd <- lmer(lgd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c | Subj) + (1+up+us+ui+lpd.c+ps.c | Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_max_gd)) VarCorr(lmm1_max_gd) # zcp LMM lmm1_zcp_gd <- lmer(lgd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_zcp_gd)) VarCorr(lmm1_zcp_gd) # prsm LMM lmm1_prsm_gd <- lmer(lgd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+lpd.c+ps.c || Subj) + (1+us || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_prsm_gd)) # ok VarCorr(lmm1_prsm_gd) print(summary(lmm1_prsm_gd), corr=FALSE) anova(lmm1_prsm_gd, lmm1_zcp_gd, lmm1_max_gd) ``` ## TRT ```{r cache=TRUE, message=FALSE} # max LMM lmm1_max_trt <- lmer(ltrt ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c | Subj) + (1+up+us+ui+lpd.c+ps.c | Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_max_trt)) VarCorr(lmm1_max_trt) # zcp LMM lmm1_zcp_trt <- lmer(ltrt ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_zcp_trt)) VarCorr(lmm1_zcp_trt) # prsm LMM lmm1_prsm_trt <- lmer(ltrt ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+lpd.c+ps.c || Subj) + (1+up+us+ui || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1_prsm_trt)) # ok VarCorr(lmm1_prsm_trt) print(summary(lmm1_prsm_trt), corr=FALSE) anova(lmm1_prsm_trt, lmm1_zcp_trt, lmm1_max_trt) ``` # Summary and visualization of LMM results ## Model parameters and statistics ```{r} table1 <- tab_model(lmm1_prsm_ffd, lmm1_prsm_gd, lmm1_prsm_trt, dv.labels = c("FFD", "GD", "TRT"), emph.p=FALSE, show.ci=FALSE, show.se=TRUE, show.stat=TRUE, show.p=TRUE, string.se="SE", string.stat="t", show.dev=TRUE, show.icc=FALSE, digits=3, digits.p=3) table1 ``` ## Forest plots critical fixed effects ```{r} plot_model(lmm1_prsm_ffd, vline.color="black", type=c("est"), term=c("lpd.c", "up", "us", "ui", "up:lpd.c", "us:lpd.c", "ui:lpd.c"), order.terms = c(4, 3, 2, 1, 5:7)) + theme_bw() plot_model(lmm1_prsm_gd, vline.color="black", type=c("est"), term=c("lpd.c", "up", "us", "ui", "up:lpd.c", "us:lpd.c", "ui:lpd.c"), order.terms = c(4, 3, 2, 1, 5:7)) + theme_bw() plot_model(lmm1_prsm_trt, vline.color="black", type=c("est"), term=c("lpd.c", "up", "us", "ui", "up:lpd.c", "us:lpd.c", "ui:lpd.c"), order.terms = c(4, 3, 2, 1, 5:7)) + theme_bw() ``` ## Gaze duration interaction contrasts of preview type x preview time In the decile (or some other quantile) version, we determine (a) observed and estimated gaze duratations for deciles of log of preview duration and (b) the mean preview durations for the ten deciles. We plot the estimated decile gaze durations above their corresponding decile mean of the log preview duration. As LMMs were estimated in log-log-space, we display the results in this metric. ```{r} # lmm predictions for partial effect of preview time x preview type interactions target1$p_lgd <- keepef(lmm1_prsm_gd, fix=c(2:5, 9:11), ran=NULL) # deciles means deciles <- target1 %>% dplyr::select(Subj, Item, Preview, lpd, lpd.c, p_lgd) %>% group_by(Preview) %>% mutate(pt_dec = gtools::quantcut(lpd.c, q=10, na.rm=TRUE, labels=FALSE)) %>% group_by(pt_dec, Preview) %>% dplyr::summarise(N=n(), lpd.c_dec = mean(lpd.c), lpd_dec = mean(lpd), pd = exp(lpd_dec), p_lgd_dec = mean(p_lgd), p_gd_dec = exp(p_lgd_dec)) # generate figure - display in log-log space for correspondence with LMM fitting ggplot(target1, aes(x=exp(lpd), y=exp(p_lgd), linetype=Preview, group=Preview, color=Preview)) + geom_smooth(method = "lm", formula = y ~ x, se = FALSE, size=1, show.legend=TRUE) + geom_point(data=deciles, size=2, show.legend = TRUE, mapping=aes(x=exp(lpd_dec), y=exp(p_lgd_dec),shape=Preview, group=Preview, color=Preview)) + scale_x_continuous("Preview time [ms]", breaks=seq(from=150, to=500, by=50), trans="log") + scale_y_continuous("Target gaze duration [ms]", breaks=seq(from=150, to=500, by=50), trans="log") + scale_colour_manual("Preview", values=c("black", "blue", "red", "darkgreen")) + scale_linetype_manual("Preview", values=c("solid", "dashed", "dotted", "dotdash")) + geom_vline(xintercept=mean(target1$ffd_n0)) + coord_fixed(xlim=c(140, 450), ylim=c(240, 450)) + theme_bw(base_size=14) + theme(legend.justification=c(0,1), legend.position=c(0,1), legend.background = element_blank(), legend.title=element_text(size=12), legend.text=element_text(size=10), legend.box.background = element_rect(colour = "black"), aspect.ratio = log(450/240)/log(450/140)) ggsave("Figure2.pdf", width=24, height=12, units="cm") ``` # Post-hoc linear mixed models ## Contrasts for preview benefit We estimate preview benefits with a treatment contrast using unrelated as base. Here we estimate the same contrasts, but use the Grand Mean as reference. ```{r cache=TRUE} ginv2 <- function(x) # define a function to make the output nicer MASS::fractions(provideDimnames(MASS::ginv(x),base=dimnames(x)[2:1])) t(X1i <- rbind(up=c(unr=1, pho=-1, sem= 0, idt= 0), us=c( 1, 0, -1, 0), ui=c( 1, 0, 0, -1))) (X1 <- ginv2(X1i)) contrasts(target1$Preview) <- X1 mm1 <- model.matrix( ~ Preview, target1) target1$up <- mm1[,2] target1$us <- mm1[,3] target1$ui <- mm1[,4] # FFD lmm1a_zcp_ffd <- lmer(lfd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_zcp_ffd)) VarCorr(lmm1a_zcp_ffd) lmm1a_prsm_ffd <- lmer(lfd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+us+ui+lpd.c+ps.c || Subj) + (1+up+us + ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_prsm_ffd)) anova(lmm1a_prsm_ffd, lmm1a_zcp_ffd) #summary(lmm1a_prsm_ffd) # GD lmm1a_zcp_gd <- lmer(lgd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_zcp_gd)) VarCorr(lmm1a_zcp_gd) lmm1a_prsm_gd <- lmer(lgd ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+us+ui+lpd.c+ps.c || Subj) + (1+up+us || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_prsm_gd)) anova(lmm1a_prsm_gd, lmm1a_zcp_gd) #summary(lmm1a_prsm_gd) # TRT lmm1a_zcp_trt <- lmer(ltrt ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui+lpd.c+ps.c|| Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_zcp_trt)) VarCorr(lmm1a_zcp_trt) lmm1a_prsm_trt <- lmer(ltrt ~ 1+(up+us+ui) * lpd.c + poly(fst_lp, 2) + ps.c + (1+us+ui+lpd.c+ps.c || Subj) + (1+up+us+ui || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm1a_prsm_trt)) anova(lmm1a_prsm_trt, lmm1a_zcp_trt) #summary(lmm1a_prsm_trt) table1a <- tab_model(lmm1a_prsm_ffd, lmm1a_prsm_gd, lmm1a_prsm_trt, dv.labels = c("FFD", "GD", "TRT"), emph.p=FALSE, show.ci=FALSE, show.se=TRUE, show.stat=TRUE, show.p=TRUE, string.se="SE", string.stat="t", show.dev=TRUE, show.icc=FALSE, digits=3, digits.p=3) table1a ``` Computing the preview benefits with GM reference, does not lead to different results from those reported for the treatment contrasts with the unrelated condition as base. ## Contrasts for preview cost We are also interested in the effects of _preview cost_. From this perspective the identical condition serves as the base. Contrasts are computed by subtracting identical from the other three conditions. We do not use a treatment contrast (i.e., identical as base), but use again the GM reference. ```{r cache=TRUE} t(X2i <- rbind(ui=c(unr=1, pho=0, sem=0, idt=-1), pi=c( 0, 1, 0, -1), si=c( 0, 0, 1, -1))) (X2 <- ginv2(X2i)) contrasts(target1$Preview) <- X2 mm1 <- model.matrix( ~ Preview, target1) target1$ui <- mm1[,2] target1$pi <- mm1[,3] target1$si <- mm1[,4] # FFD lmm2_zcp_ffd <- lmer(lfd ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+pi+si+lpd.c+ps.c || Subj) + (1+ui+pi+si+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_zcp_ffd)) VarCorr(lmm2_zcp_ffd) lmm2_prsm_ffd <- lmer(lfd ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+si+lpd.c+ps.c || Subj) + (1+ui+pi+si || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_prsm_ffd)) anova(lmm2_prsm_ffd, lmm2_zcp_ffd) #summary(lmm2_prsm_ffd) # GD lmm2_zcp_gd <- lmer(lgd ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+pi+si+lpd.c+ps.c || Subj) + (1+ui+pi+si+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_zcp_gd)) VarCorr(lmm2_zcp_gd) lmm2_prsm_gd <- lmer(lgd ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+si+lpd.c+ps.c || Subj) + (1+ui+pi+si || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_prsm_gd)) anova(lmm2_prsm_gd, lmm2_zcp_gd) #summary(lmm2_prsm_gd) # TRT lmm2_zcp_trt <- lmer(ltrt ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ui+pi+si+lpd.c+ps.c || Subj) + (1+ui+pi+si+lpd.c+ps.c|| Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_zcp_trt)) VarCorr(lmm2_zcp_trt) lmm2_prsm_trt <- lmer(ltrt ~ 1+(ui+pi+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+si+lpd.c+ps.c || Subj) + (1+ui+pi+si || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm2_prsm_trt)) anova(lmm2_prsm_trt, lmm2_zcp_trt) #summary(lmm2_prsm_trt) table2 <- tab_model(lmm2_prsm_ffd, lmm2_prsm_gd, lmm2_prsm_trt, dv.labels = c("FFD", "GD", "TRT"), emph.p=FALSE, show.ci=FALSE, show.se=TRUE, show.stat=TRUE, show.p=TRUE, string.se="SE", string.stat="t", show.dev=TRUE, show.icc=FALSE, digits=3, digits.p=3) table2 ``` **Semantic preview costs** significantly increase with preview time for the three measures, FFD, GD, amd TRT. ## Sliding-difference contrasts We compute (1) unrelated - phonological, (2) phonological - semantic, and (3) semantic - identical contrasts and check the interactions with preview time. ```{r cache=TRUE} t(X3i <- rbind(up=c(unr=1, pho=-1, sem= 0, idt= 0), us=c( 0, 1, -1, 0), ui=c( 0, 0, 1, -1))) (X3 <- ginv2(X3i)) contrasts(target1$Preview) <- X3 mm1 <- model.matrix( ~ Preview, target1) target1$up <- mm1[,2] target1$ps <- mm1[,3] target1$si <- mm1[,4] # FFD lmm3_zcp_ffd <- lmer(lfd ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+ps+si+lpd.c+ps.c || Subj) + (1+up+ps+si+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_zcp_ffd)) VarCorr(lmm3_zcp_ffd) lmm3_prsm_ffd <- lmer(lfd ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+ps+si+lpd.c+ps.c || Subj) + (1+up+ps+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_prsm_ffd)) anova(lmm3_prsm_ffd, lmm3_zcp_ffd) #summary(lmm3_prsm_ffd) # GD lmm3_zcp_gd <- lmer(lgd ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+ps+si+lpd.c+ps.c || Subj) + (1+up+ps+si+lpd.c+ps.c || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_zcp_gd)) VarCorr(lmm3_zcp_gd) lmm3_prsm_gd <- lmer(lgd ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+si+lpd.c+ps.c || Subj) + (1+up+ps || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_prsm_gd)) anova(lmm3_prsm_gd, lmm3_zcp_gd) #summary(lmm3_prsm_gd) # TRT lmm3_zcp_trt <- lmer(ltrt ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+up+ps+si+lpd.c+ps.c || Subj) + (1+up+ps+si+lpd.c+ps.c|| Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_zcp_trt)) VarCorr(lmm3_zcp_trt) lmm3_prsm_trt <- lmer(ltrt ~ 1+(up+ps+si) * lpd.c + poly(fst_lp, 2) + ps.c + (1+si+lpd.c+ps.c || Subj) + (1+up+ps+si || Item), data=target1, REML=FALSE, control=lmerControl(calc.derivs = FALSE, optimizer="nloptwrap", optCtrl=list(method="LN_BOBYQA"))) summary(rePCA(lmm3_prsm_trt)) anova(lmm3_prsm_trt, lmm3_zcp_trt) #summary(lmm3_prsm_trt) table3 <- tab_model(lmm3_prsm_ffd, lmm3_prsm_gd, lmm3_prsm_trt, dv.labels = c("FFD", "GD", "TRT"), emph.p=FALSE, show.ci=FALSE, show.se=TRUE, show.stat=TRUE, show.p=TRUE, string.se="SE", string.stat="t", show.dev=TRUE, show.icc=FALSE, digits=3, digits.p=3) table3 ``` For **gaze durations** all three contrasts of neighboring conditions with preview time are significant: The difference between identical and semantic conditions increases, the difference between semantic and phonological conditions decreases, and the difference between phonological and unrelated conditions increases. As shown in the figure, the difference between ponological and semantic condition is positive for short preview times and is negative for long preview times. For **first fixations** and **total reading time** only the difference between semantic and identical conditions increases significantly with preview time. (We have seen these effects already with the preview cost contrasts.) # Appendix ```{r} save(target1, deciles, lmm1_prsm_gd, lmm1a_prsm_gd, lmm2_prsm_gd, lmm3_prsm_gd, file="YWSK19.rda") sessionInfo() ```