This file presents the analyses reported in the manuscript titled “Lexical stress representation in Greek spoken word recognition” by Andrikopoulou et al. See the file “mega script.R” for pre-processing and additional analyses.
Note: Models with more complex random structures either fail to converge or result in singular fits. We have tried all available optimizers with allFit and confirmed overparameterization in singular fits with rePCA.
read.table("alldata15.txt",stringsAsFactors = TRUE) -> data3
data3$item <- as.factor(data3$item)
data3$strpos <- as.factor(data3$strpos)
data3$targpos <- relevel(data3$targpos,ref="Pen")
data3$cond <- relevel(data3$cond,ref="Neutral")
data3$CprevRT <- scale(log(data3$prevRT)) # center to facilitate convergence
data3$Corder <- scale(data3$order) # center to facilitate convergence
data3$condC <- ifelse(data3$cond=="Match",-0.5,ifelse(data3$cond=="Mismatch",+0.5,NA))
str(data3)
## 'data.frame': 21312 obs. of 23 variables:
## $ name : Factor w/ 288 levels "á÷áøß","äåäáìÜò",..: 15 15 15 15 15 15 15 15 15 15 ...
## $ item : Factor w/ 864 levels "210147","210150",..: 313 313 313 313 313 73 313 313 313 73 ...
## $ subject : Factor w/ 74 levels "aggi","agka",..: 59 60 2 11 58 54 37 68 67 46 ...
## $ order : int 265 60 78 295 155 88 161 59 134 288 ...
## $ RT : num 512 890 1043 586 1056 ...
## $ prevRT : num 511 684 1260 633 1072 ...
## $ lex : Factor w/ 2 levels "Pseudo","Word": 1 1 1 1 1 1 1 1 1 1 ...
## $ list : Factor w/ 3 levels "L1","L2","L3": 3 3 3 3 3 1 3 3 3 1 ...
## $ cond : Factor w/ 3 levels "Neutral","Match",..: 1 1 1 1 1 2 1 1 1 2 ...
## $ strpos : Factor w/ 10 levels "0","11","12",..: 1 1 1 1 1 6 1 1 1 6 ...
## $ logprevRT: num 6.24 6.53 7.14 6.45 6.98 ...
## $ targstr : Factor w/ 3 levels "T1","T2","T3": NA NA NA NA NA 2 NA NA NA 2 ...
## $ primstr : Factor w/ 3 levels "P1","P2","P3": NA NA NA NA NA 2 NA NA NA 2 ...
## $ err : int 0 0 0 0 0 0 0 0 0 0 ...
## $ cRT : num 512 890 1043 586 1056 ...
## $ logRT : num 6.24 6.79 6.95 6.37 6.96 ...
## $ CprevRT : num [1:21312, 1] -1.19 -0.241 1.743 -0.495 1.218 ...
## ..- attr(*, "scaled:center")= num 6.6
## ..- attr(*, "scaled:scale")= num 0.308
## $ Corder : num [1:21312, 1] 1.092 -1.226 -1.022 1.431 -0.152 ...
## ..- attr(*, "scaled:center")= num 168
## ..- attr(*, "scaled:scale")= num 88.5
## $ Fin : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ Pen : logi TRUE TRUE TRUE TRUE TRUE TRUE ...
## $ Ant : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
## $ targpos : Factor w/ 3 levels "Pen","Ant","Fin": 1 1 1 1 1 1 1 1 1 1 ...
## $ condC : num NA NA NA NA NA -0.5 NA NA NA -0.5 ...
Treatment coded; reference level is Neutral.
wrt <- lmer ( logRT ~ cond + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Word" , control = lmerControl(optimizer = "bobyqa"))
summary(wrt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ cond + CprevRT + Corder + (1 + Corder | subject) + (cond |
## name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word"
##
## REML criterion at convergence: -1685.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3693 -0.6403 -0.0998 0.5239 6.0891
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.016128 0.12699
## condMatch 0.004831 0.06950 -0.10
## condMismatch 0.002668 0.05165 -0.23 0.39
## subject (Intercept) 0.029625 0.17212
## Corder 0.001942 0.04407 0.26
## Residual 0.043322 0.20814
## Number of obs: 9413, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.595e+00 2.295e-02 1.158e+02 287.391 < 2e-16 ***
## condMatch -5.904e-02 7.843e-03 1.347e+02 -7.528 6.64e-12 ***
## condMismatch 5.090e-02 6.875e-03 1.318e+02 7.404 1.40e-11 ***
## CprevRT 2.535e-02 2.690e-03 9.198e+03 9.427 < 2e-16 ***
## Corder -9.220e-03 5.583e-03 7.261e+01 -1.651 0.103
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndMtc cndMsm CprvRT
## condMatch -0.114
## condMismtch -0.154 0.441
## CprevRT -0.001 0.002 -0.004
## Corder 0.212 -0.001 -0.003 0.021
wer<-glmer(err~cond+(1|subject)+(1|name), data = data3, family = binomial, subset= lex=="Word")
summary(wer)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ cond + (1 | subject) + (1 | name)
## Data: data3
## Subset: lex == "Word"
##
## AIC BIC logLik deviance df.resid
## 6089.7 6126.1 -3039.9 6079.7 10651
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0909 -0.3345 -0.1763 -0.0989 13.0705
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 2.7369 1.6543
## subject (Intercept) 0.3752 0.6125
## Number of obs: 10656, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.99519 0.17388 -17.226 < 2e-16 ***
## condMatch -0.30004 0.08622 -3.480 0.000501 ***
## condMismatch 0.30098 0.07980 3.771 0.000162 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndMtc
## condMatch -0.220
## condMismtch -0.254 0.494
prt <- lmer ( logRT ~ cond + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Pseudo" , control = lmerControl(optimizer = "bobyqa"))
summary(prt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ cond + CprevRT + Corder + (1 + Corder | subject) + (cond |
## name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo"
##
## REML criterion at convergence: -5258
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.5709 -0.6368 -0.1108 0.5053 5.6421
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.008479 0.09208
## condMatch 0.002704 0.05200 -0.68
## condMismatch 0.001814 0.04259 -0.68 0.85
## subject (Intercept) 0.023942 0.15473
## Corder 0.001822 0.04269 0.16
## Residual 0.031782 0.17828
## Number of obs: 10292, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.625e+00 1.979e-02 1.018e+02 334.670 < 2e-16 ***
## condMatch -4.866e-02 6.124e-03 1.344e+02 -7.946 6.90e-13 ***
## condMismatch -2.818e-02 5.598e-03 1.300e+02 -5.035 1.56e-06 ***
## CprevRT 3.215e-02 2.222e-03 1.009e+04 14.468 < 2e-16 ***
## Corder -1.494e-02 5.270e-03 7.248e+01 -2.835 0.00593 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndMtc cndMsm CprvRT
## condMatch -0.264
## condMismtch -0.253 0.655
## CprevRT 0.002 -0.001 -0.013
## Corder 0.136 0.004 0.004 0.019
per<-glmer(err~cond+(1|subject)+(1|name), data = data3, family = binomial, subset= lex=="Pseudo")
summary(per)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ cond + (1 | subject) + (1 | name)
## Data: data3
## Subset: lex == "Pseudo"
##
## AIC BIC logLik deviance df.resid
## 2644.2 2680.5 -1317.1 2634.2 10651
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6182 -0.1661 -0.1183 -0.0857 13.1541
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 1.4344 1.1977
## subject (Intercept) 0.4837 0.6955
## Number of obs: 10656, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.18331 0.18180 -23.011 <2e-16 ***
## condMatch -0.15728 0.14534 -1.082 0.279
## condMismatch -0.09169 0.14265 -0.643 0.520
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndMtc
## condMatch -0.363
## condMismtch -0.366 0.479
wprt <- lmer ( logRT ~ cond*lex + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, control = lmerControl(optimizer = "bobyqa"))
print(summary(wprt),corr=F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ cond * lex + CprevRT + Corder + (1 + Corder | subject) +
## (cond | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
##
## REML criterion at convergence: -6019.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6511 -0.6421 -0.0990 0.5143 6.5115
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.012129 0.11013
## condMatch 0.003728 0.06106 -0.34
## condMismatch 0.002146 0.04633 -0.41 0.57
## subject (Intercept) 0.024802 0.15749
## Corder 0.001676 0.04094 0.23
## Residual 0.039395 0.19848
## Number of obs: 19705, groups: name, 288; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.624e+00 2.076e-02 1.160e+02 319.054 < 2e-16 ***
## condMatch -4.859e-02 7.004e-03 2.577e+02 -6.937 3.22e-11 ***
## condMismatch -2.789e-02 6.172e-03 2.482e+02 -4.520 9.60e-06 ***
## lexWord -3.048e-02 1.389e-02 2.784e+02 -2.194 0.0291 *
## CprevRT 2.788e-02 1.778e-03 1.930e+04 15.683 < 2e-16 ***
## Corder -1.272e-02 4.972e-03 7.258e+01 -2.559 0.0126 *
## condMatch:lexWord -1.039e-02 1.001e-02 2.673e+02 -1.038 0.3000
## condMismatch:lexWord 7.857e-02 8.885e-03 2.635e+02 8.843 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
wper <- glmer( err ~ cond*lex + (1|subject) + (1|name), data = data3, family = binomial, control = glmerControl(optimizer = "bobyqa"))
print(summary(wper),corr=F)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ cond * lex + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 8813.0 8876.7 -4398.5 8797.0 21304
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2558 -0.2330 -0.1414 -0.0939 13.3452
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 2.0545 1.4334
## subject (Intercept) 0.2445 0.4944
## Number of obs: 21312, groups: name, 288; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.18670 0.17211 -24.326 < 2e-16 ***
## condMatch -0.12040 0.13513 -0.891 0.3729
## condMismatch -0.05552 0.13325 -0.417 0.6769
## lexWord 1.30083 0.21039 6.183 6.29e-10 ***
## condMatch:lexWord -0.17806 0.15996 -1.113 0.2657
## condMismatch:lexWord 0.35208 0.15496 2.272 0.0231 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Treatment-coded; reference levels are penultimate-syllable-stress targets (for targpos) and Neutral (for cond).
lint <- lmer (logRT ~ targpos*cond + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset=lex=="Word", control = lmerControl(optimizer = "bobyqa"))
slint <- summary(lint)
print(slint,corr=F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ targpos * cond + CprevRT + Corder + (1 + Corder | subject) +
## (cond | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word"
##
## REML criterion at convergence: -1668.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3976 -0.6351 -0.1034 0.5215 6.0716
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.014997 0.12246
## condMatch 0.004707 0.06861 -0.07
## condMismatch 0.002596 0.05095 -0.26 0.39
## subject (Intercept) 0.029657 0.17221
## Corder 0.001941 0.04406 0.26
## Residual 0.043325 0.20815
## Number of obs: 9413, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.611e+00 2.751e-02 1.782e+02 240.318 < 2e-16 ***
## targposAnt 1.959e-02 2.669e-02 1.374e+02 0.734 0.46428
## targposFin -6.680e-02 2.662e-02 1.360e+02 -2.509 0.01327 *
## condMatch -7.979e-02 1.357e-02 1.356e+02 -5.881 3.02e-08 ***
## condMismatch 3.728e-02 1.190e-02 1.318e+02 3.134 0.00213 **
## CprevRT 2.531e-02 2.690e-03 9.200e+03 9.412 < 2e-16 ***
## Corder -9.182e-03 5.582e-03 7.261e+01 -1.645 0.10430
## targposAnt:condMatch 2.315e-02 1.920e-02 1.359e+02 1.206 0.22993
## targposFin:condMatch 3.878e-02 1.901e-02 1.313e+02 2.040 0.04331 *
## targposAnt:condMismatch 2.905e-02 1.692e-02 1.338e+02 1.716 0.08845 .
## targposFin:condMismatch 1.201e-02 1.662e-02 1.266e+02 0.723 0.47118
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
acint <- glmer (err ~ targpos*cond + (1|subject) + (1|name), data3, family = binomial, subset=lex=="Word", control = glmerControl(optimizer = "bobyqa"))
acints <- summary(acint)
print(acints,corr=F)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ targpos * cond + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Word"
##
## AIC BIC logLik deviance df.resid
## 6084.2 6164.2 -3031.1 6062.2 10645
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1383 -0.3344 -0.1762 -0.0977 14.7773
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 2.5196 1.5873
## subject (Intercept) 0.3755 0.6128
## Number of obs: 10656, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.756603 0.267739 -10.296 <2e-16 ***
## targposAnt 0.140320 0.360360 0.389 0.6970
## targposFin -0.827101 0.373110 -2.217 0.0266 *
## condMatch -0.249606 0.138694 -1.800 0.0719 .
## condMismatch 0.124218 0.132218 0.939 0.3475
## targposAnt:condMatch -0.002825 0.195546 -0.014 0.9885
## targposFin:condMatch -0.224981 0.230473 -0.976 0.3290
## targposAnt:condMismatch 0.384459 0.183245 2.098 0.0359 *
## targposFin:condMismatch 0.097453 0.210594 0.463 0.6435
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pint <- lmer (logRT ~ targpos*cond + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset=lex=="Pseudo", control = lmerControl(optimizer = "bobyqa"))
spint <- summary(pint)
print(spint,corr=F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ targpos * cond + CprevRT + Corder + (1 + Corder | subject) +
## (cond | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo"
##
## REML criterion at convergence: -5235.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.5965 -0.6375 -0.1099 0.5047 5.6421
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.008051 0.08973
## condMatch 0.002755 0.05249 -0.72
## condMismatch 0.001815 0.04261 -0.69 0.85
## subject (Intercept) 0.023942 0.15473
## Corder 0.001827 0.04274 0.16
## Residual 0.031780 0.17827
## Number of obs: 10292, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.621e+00 2.279e-02 1.541e+02 290.557 < 2e-16 ***
## targposAnt -2.369e-02 1.980e-02 1.391e+02 -1.197 0.233517
## targposFin 3.382e-02 1.979e-02 1.391e+02 1.709 0.089735 .
## condMatch -4.230e-02 1.063e-02 1.318e+02 -3.978 0.000114 ***
## condMismatch -1.634e-02 9.702e-03 1.290e+02 -1.684 0.094603 .
## CprevRT 3.209e-02 2.222e-03 1.009e+04 14.440 < 2e-16 ***
## Corder -1.499e-02 5.276e-03 7.248e+01 -2.842 0.005826 **
## targposAnt:condMatch -1.206e-02 1.507e-02 1.324e+02 -0.800 0.425181
## targposFin:condMatch -7.286e-03 1.506e-02 1.325e+02 -0.484 0.629286
## targposAnt:condMismatch -1.306e-02 1.373e-02 1.287e+02 -0.951 0.343259
## targposFin:condMismatch -2.250e-02 1.370e-02 1.286e+02 -1.642 0.103048
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
acpsint <- glmer (err ~ targpos*cond + (1|subject) + (1|name), data3, family = binomial, subset=lex=="Pseudo", control = glmerControl(optimizer = "bobyqa"))
acpsints <- summary(acpsint)
print(acpsints,corr=F)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ targpos * cond + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo"
##
## AIC BIC logLik deviance df.resid
## 2640.8 2720.8 -1309.4 2618.8 10645
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4076 -0.1664 -0.1156 -0.0841 12.3395
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 1.4449 1.2020
## subject (Intercept) 0.4881 0.6987
## Number of obs: 10656, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.2599 0.2811 -15.154 <2e-16 ***
## targposAnt -0.1419 0.3730 -0.380 0.7036
## targposFin 0.3223 0.3578 0.901 0.3678
## condMatch -0.5418 0.2772 -1.955 0.0506 .
## condMismatch 0.2171 0.2362 0.919 0.3579
## targposAnt:condMatch 0.7156 0.3739 1.914 0.0556 .
## targposFin:condMatch 0.3791 0.3605 1.052 0.2929
## targposAnt:condMismatch -0.1034 0.3447 -0.300 0.7642
## targposFin:condMismatch -0.8843 0.3515 -2.516 0.0119 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
errorbars <- function(d) {
x <- d[1]
y <- d[2]
lo <- d[3]
hi <- d[4]
arrows(x, lo, x, hi, length=0.05, angle=90, code=3)
}
dograph <- function(eff,mtxt,ytxt,ylm=NULL,tps=NULL,FUN=identity) {
effw<-data.frame(cond=rep(eff$variables$cond$levels,3),
targpos=rep(eff$variables$targpos$levels,each=3),
fit=eff$fit, lower=eff$lower, upper=eff$upper)
effw$condF<-factor(effw$cond,ordered=T,levels=c("Match","Neutral","Mismatch"))
effw$cond<-as.numeric(effw$condF)
effw$targpos<-factor(effw$targpos,ordered=T,levels=c("Ant","Pen","Fin"))
effw$fitms<-FUN(effw$fit)
effw$loms<-FUN(effw$lower)
effw$hims<-FUN(effw$upper)
effw$x <- effw$cond+0.01*(as.numeric(effw$targpos)-2)
effw <- effw[order(effw$targpos,effw$cond),]
plot(1:3,c(min(effw$loms),median(effw$fitms),max(effw$hims)),type="n",las=1,xlab="Target stress position",ylab=ytxt,xaxt="n",main=mtxt,ylim=ylm)
axis(1,at=1:3,labels=levels(effw$condF))
for (i in 1:3) {
tp <- levels(effw$targpos)[i]
points(fitms~x,effw,subset= targpos==tp)
lines(fitms~x,effw,subset= targpos==tp)
apply(effw[effw$targpos==tp,c("x","fitms","loms","hims")],1,errorbars)
text(2.9,effw$fitms[effw$targpos==tp & effw$cond==3],tp,pos=tps) # try pos=3 for pseudowords
}
}
par(mfrow=c(2,2))
par(oma=c(0,1.5,0,0))
par(mai=c(0.3,0.4,0.3,0.05))
par(mgp=c(2,0.5,0))
par(tcl=-0.35)
dograph(Effect(c("cond","targpos"),lint),FUN=exp,mtxt="Words",ytxt="",ylm=c(630,860),tps=3)
mtext("Response time (ms)",2,line=2.75)
dograph(Effect(c("cond","targpos"),pint),FUN=exp,mtxt="Pseudowords",ytxt="",ylm=c(630,860),tps=3)
dograph(Effect(c("cond","targpos"),acint),FUN=inv.logit,mtxt="Words",ytxt="",ylm=c(0,0.20),tps=3)
mtext("Error proportion",2,line=2.75)
dograph(Effect(c("cond","targpos"),acpsint),FUN=inv.logit,mtxt="Pseudowords",ytxt="",ylm=c(0,0.20),tps=3)
These are model-based estimates and associated 95% confidence intervals (back-transformed to ms and proportion).
Treatment-coded target stress position; reference is penultimate. Difference-coded condition.
lrtn <- lmer ( logRT ~ cond + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Word" & cond!="Neutral", control = lmerControl(optimizer = "bobyqa"))
summary(lrtn) #
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ cond + CprevRT + Corder + (1 + Corder | subject) + (cond |
## name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & cond != "Neutral"
##
## REML criterion at convergence: -818.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2160 -0.6366 -0.0928 0.5270 5.9071
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.019139 0.13834
## condMismatch 0.004668 0.06832 -0.43
## subject (Intercept) 0.029802 0.17263
## Corder 0.001790 0.04231 0.19
## Residual 0.044232 0.21031
## Number of obs: 6271, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.536e+00 2.345e-02 1.202e+02 278.708 < 2e-16 ***
## condMismatch 1.096e-01 7.850e-03 1.306e+02 13.966 < 2e-16 ***
## CprevRT 2.774e-02 3.416e-03 6.111e+03 8.122 5.51e-16 ***
## Corder -8.001e-03 5.642e-03 7.106e+01 -1.418 0.161
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndMsm CprvRT
## condMismtch -0.228
## CprevRT 0.000 -0.007
## Corder 0.138 -0.003 0.026
lintn <- lmer (logRT ~ targpos*condC + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Word" & cond!="Neutral", control = lmerControl(optimizer = "bobyqa"))
slintn <- summary(lintn)
print(slintn,corr=F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ targpos * condC + CprevRT + Corder + (1 + Corder | subject) +
## (cond | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & cond != "Neutral"
##
## REML criterion at convergence: -810.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2279 -0.6364 -0.0922 0.5263 5.8960
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.018619 0.13645
## condMismatch 0.004535 0.06734 -0.48
## subject (Intercept) 0.029882 0.17286
## Corder 0.001792 0.04233 0.19
## Residual 0.044234 0.21032
## Number of obs: 6271, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.589e+00 2.730e-02 1.733e+02 241.335 < 2e-16 ***
## targposAnt 4.491e-02 2.616e-02 1.386e+02 1.717 0.0882 .
## targposFin -4.132e-02 2.609e-02 1.372e+02 -1.584 0.1156
## condC 1.166e-01 1.355e-02 1.292e+02 8.604 2.24e-14 ***
## CprevRT 2.765e-02 3.415e-03 6.112e+03 8.095 6.88e-16 ***
## Corder -7.945e-03 5.644e-03 7.107e+01 -1.408 0.1636
## targposAnt:condC 5.592e-03 1.924e-02 1.310e+02 0.291 0.7718
## targposFin:condC -2.593e-02 1.895e-02 1.249e+02 -1.368 0.1737
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
wern<-glmer(err~condC+(1|subject)+(1|name), data = data3, family = binomial, subset= lex=="Word" & cond!="Neutral", control = glmerControl(optimizer = "bobyqa"))
summary(wern)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ condC + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & cond != "Neutral"
##
## AIC BIC logLik deviance df.resid
## 4096.6 4124.1 -2044.3 4088.6 7100
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3131 -0.3209 -0.1768 -0.1058 10.7586
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 2.7091 1.6459
## subject (Intercept) 0.3419 0.5847
## Number of obs: 7104, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.99092 0.16983 -17.611 < 2e-16 ***
## condC 0.60965 0.08393 7.264 3.76e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## condC -0.063
acintn <- glmer (err ~ targpos*condC + (1|subject) + (1|name), data3, family = binomial, subset= lex=="Word" & cond!="Neutral", control = glmerControl(optimizer = "bobyqa"))
acintsn <- summary(acintn)
print(acintsn,corr=F)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ targpos * condC + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & cond != "Neutral"
##
## AIC BIC logLik deviance df.resid
## 4090.2 4145.1 -2037.1 4074.2 7096
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1706 -0.3190 -0.1780 -0.1046 11.8927
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 2.4991 1.5808
## subject (Intercept) 0.3414 0.5843
## Number of obs: 7104, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.8620 0.2623 -10.910 < 2e-16 ***
## targposAnt 0.3881 0.3494 1.111 0.26674
## targposFin -0.7888 0.3607 -2.187 0.02875 *
## condC 0.3949 0.1385 2.851 0.00435 **
## targposAnt:condC 0.3681 0.1917 1.920 0.05491 .
## targposFin:condC 0.2852 0.2238 1.274 0.20269
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
prtn <- lmer ( logRT ~ condC + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Pseudo" & cond!="Neutral", control = lmerControl(optimizer = "bobyqa"))
summary(prtn) #
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ condC + CprevRT + Corder + (1 + Corder | subject) + (cond |
## name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & cond != "Neutral"
##
## REML criterion at convergence: -3426.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6115 -0.6333 -0.1119 0.4894 5.6350
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.0046512 0.06820
## condMismatch 0.0007588 0.02755 -0.03
## subject (Intercept) 0.0233046 0.15266
## Corder 0.0017856 0.04226 0.15
## Residual 0.0315907 0.17774
## Number of obs: 6868, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.586e+00 1.878e-02 8.706e+01 350.629 < 2e-16 ***
## condC 2.072e-02 4.890e-03 1.341e+02 4.237 4.18e-05 ***
## CprevRT 3.299e-02 2.698e-03 6.715e+03 12.225 < 2e-16 ***
## Corder -1.906e-02 5.374e-03 7.251e+01 -3.547 0.000688 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) condC CprvRT
## condC 0.024
## CprevRT 0.000 -0.017
## Corder 0.126 -0.002 0.028
pintn <- lmer (logRT ~ targpos*condC + CprevRT + Corder + (1+Corder|subject) + (cond|name), data3, subset= lex=="Pseudo" & cond!="Neutral", control = lmerControl(optimizer = "bobyqa"))
spintn <- summary(pintn)
print(spintn,corr=F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ targpos * condC + CprevRT + Corder + (1 + Corder | subject) +
## (cond | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & cond != "Neutral"
##
## REML criterion at convergence: -3416.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.6046 -0.6365 -0.1156 0.4863 5.6439
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## name (Intercept) 0.0040411 0.06357
## condMismatch 0.0007627 0.02762 0.04
## subject (Intercept) 0.0233005 0.15264
## Corder 0.0017891 0.04230 0.15
## Residual 0.0315896 0.17773
## Number of obs: 6868, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.592e+00 2.046e-02 1.170e+02 322.212 < 2e-16 ***
## targposAnt -3.734e-02 1.443e-02 1.366e+02 -2.588 0.010685 *
## targposFin 1.825e-02 1.440e-02 1.359e+02 1.267 0.207215
## condC 2.671e-02 8.467e-03 1.319e+02 3.155 0.001992 **
## CprevRT 3.293e-02 2.698e-03 6.716e+03 12.206 < 2e-16 ***
## Corder -1.915e-02 5.378e-03 7.252e+01 -3.561 0.000657 ***
## targposAnt:condC -1.695e-03 1.200e-02 1.315e+02 -0.141 0.887884
## targposFin:condC -1.610e-02 1.196e-02 1.319e+02 -1.345 0.180793
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pern<-glmer(err~condC+(1|subject)+(1|name), data = data3, family = binomial, subset= lex=="Pseudo" & cond!="Neutral", control = glmerControl(optimizer = "bobyqa"))
summary(pern)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ condC + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & cond != "Neutral"
##
## AIC BIC logLik deviance df.resid
## 1684.0 1711.4 -838.0 1676.0 7100
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2262 -0.1575 -0.1089 -0.0772 9.8283
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 1.9449 1.3946
## subject (Intercept) 0.3835 0.6192
## Number of obs: 7104, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.47525 0.20027 -22.346 <2e-16 ***
## condC 0.06216 0.15049 0.413 0.68
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## condC -0.003
acpsintn <- glmer (err ~ targpos*condC + (1|subject) + (1|name), data3, family = binomial, subset= lex=="Pseudo" & cond!="Neutral", control = glmerControl(optimizer = "bobyqa"))
acpsintsn <- summary(acpsintn)
print(acpsintsn,corr=F)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: err ~ targpos * condC + (1 | subject) + (1 | name)
## Data: data3
## Control: glmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & cond != "Neutral"
##
## AIC BIC logLik deviance df.resid
## 1679.8 1734.7 -831.9 1663.8 7096
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3282 -0.1572 -0.1063 -0.0749 9.9269
##
## Random effects:
## Groups Name Variance Std.Dev.
## name (Intercept) 1.9641 1.4015
## subject (Intercept) 0.3903 0.6248
## Number of obs: 7104, groups: name, 144; subject, 74
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.6443 0.3060 -15.178 < 2e-16 ***
## targposAnt 0.1751 0.3829 0.457 0.647385
## targposFin 0.2135 0.3804 0.561 0.574671
## condC 0.7777 0.2739 2.840 0.004517 **
## targposAnt:condC -0.8526 0.3719 -2.292 0.021892 *
## targposFin:condC -1.2712 0.3820 -3.328 0.000876 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Random structures reduced as needed to achieve nonsingular fit. Note: In code here, final stress=“1” ; penultimate=“2” ; antepenultimate=“3”
data3$strpos2.12 <- ifelse(data3$strpos=="22",-0.5,ifelse(data3$strpos=="12",0.5,NA))
l2.12 <- lmer ( logRT ~ strpos2.12 + CprevRT + Corder + (strpos2.12|subject) + (0+Corder|subject) + (strpos2.12||name), data3, subset= lex=="Word"&(strpos %in% c("12","22")), control = lmerControl(optimizer = "bobyqa"))
summary(l2.12)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos2.12 + CprevRT + Corder + (strpos2.12 | subject) +
## (0 + Corder | subject) + (strpos2.12 || name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & (strpos %in% c("12", "22"))
##
## REML criterion at convergence: 14
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6879 -0.6422 -0.0945 0.5191 3.5325
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.030049 0.17335
## strpos2.12 0.001289 0.03590 0.24
## subject.1 Corder 0.001440 0.03795
## name (Intercept) 0.017205 0.13117
## name.1 strpos2.12 0.006914 0.08315
## Residual 0.045409 0.21309
## Number of obs: 1522, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.581e+00 2.908e-02 1.050e+02 226.273 < 2e-16 ***
## strpos2.12 1.031e-01 2.208e-02 2.320e+01 4.671 0.000104 ***
## CprevRT 3.119e-02 7.252e-03 1.468e+03 4.300 1.82e-05 ***
## Corder -3.919e-03 7.333e-03 6.667e+01 -0.535 0.594769
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st2.12 CprvRT
## strpos2.12 0.213
## CprevRT 0.001 -0.010
## Corder -0.004 0.001 0.074
data3$strpos2.32 <- ifelse(data3$strpos=="22",-0.5,ifelse(data3$strpos=="32",0.5,NA))
l2.32 <- lmer ( logRT ~ strpos2.32 + CprevRT + Corder + (1|subject) + (0+Corder|subject) + (strpos2.32|name), data3, subset= lex=="Word"&(strpos %in% c("32","22")))
summary(l2.32)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos2.32 + CprevRT + Corder + (1 | subject) + (0 +
## Corder | subject) + (strpos2.32 | name)
## Data: data3
## Subset: lex == "Word" & (strpos %in% c("32", "22"))
##
## REML criterion at convergence: 15.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7793 -0.6188 -0.1082 0.5037 3.6158
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.0290411 0.17041
## subject.1 Corder 0.0006076 0.02465
## name (Intercept) 0.0127523 0.11293
## strpos2.32 0.0043431 0.06590 -0.33
## Residual 0.0470915 0.21701
## Number of obs: 1588, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.594e+00 2.671e-02 1.021e+02 246.908 < 2e-16 ***
## strpos2.32 1.301e-01 1.744e-02 2.125e+01 7.459 2.31e-07 ***
## CprevRT 4.844e-02 7.209e-03 1.540e+03 6.719 2.57e-11 ***
## Corder -6.238e-03 6.417e-03 7.421e+01 -0.972 0.334
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st2.32 CprvRT
## strpos2.32 0.020
## CprevRT 0.001 -0.013
## Corder -0.005 -0.001 0.107
data3$strpos1.21 <- ifelse(data3$strpos=="11",-0.5,ifelse(data3$strpos=="21",0.5,NA))
l1.21 <- lmer ( logRT ~ strpos1.21 + CprevRT + Corder + (1|subject) + (0+Corder|subject) + (strpos1.21||name), data3, subset= lex=="Word"&(strpos %in% c("21","11")), control = lmerControl(optimizer = "bobyqa"))
summary(l1.21)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos1.21 + CprevRT + Corder + (1 | subject) + (0 +
## Corder | subject) + (strpos1.21 || name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & (strpos %in% c("21", "11"))
##
## REML criterion at convergence: -345
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1134 -0.5992 -0.0789 0.4821 5.2891
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 0.021382 0.14623
## subject.1 Corder 0.001139 0.03374
## name (Intercept) 0.013170 0.11476
## name.1 strpos1.21 0.002765 0.05259
## Residual 0.037812 0.19445
## Number of obs: 1675, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.552e+00 2.469e-02 1.069e+02 265.360 < 2e-16 ***
## strpos1.21 9.951e-02 1.555e-02 2.360e+01 6.399 1.39e-06 ***
## CprevRT 5.097e-02 6.082e-03 1.630e+03 8.380 < 2e-16 ***
## Corder 6.207e-03 6.369e-03 7.011e+01 0.975 0.333
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st1.21 CprvRT
## strpos1.21 0.151
## CprevRT 0.001 0.029
## Corder -0.002 -0.017 0.062
data3$strpos1.31 <- ifelse(data3$strpos=="11",-0.5,ifelse(data3$strpos=="31",0.5,NA))
l1.31 <- lmer ( logRT ~ strpos1.31 + CprevRT + Corder + (strpos1.31|subject) + (0+Corder|subject) + (strpos1.31|name), data3, subset= lex=="Word"&(strpos %in% c("31","11")))
summary(l1.31)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos1.31 + CprevRT + Corder + (strpos1.31 | subject) +
## (0 + Corder | subject) + (strpos1.31 | name)
## Data: data3
## Subset: lex == "Word" & (strpos %in% c("31", "11"))
##
## REML criterion at convergence: -258.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.0972 -0.5869 -0.0999 0.4877 5.4072
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.0256296 0.16009
## strpos1.31 0.0008087 0.02844 0.62
## subject.1 Corder 0.0014453 0.03802
## name (Intercept) 0.0104345 0.10215
## strpos1.31 0.0054078 0.07354 -0.29
## Residual 0.0393201 0.19829
## Number of obs: 1662, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.547e+00 2.479e-02 9.892e+01 264.130 < 2e-16 ***
## strpos1.31 8.667e-02 1.806e-02 2.418e+01 4.799 6.81e-05 ***
## CprevRT 3.995e-02 6.189e-03 1.601e+03 6.455 1.43e-10 ***
## Corder 6.883e-04 6.808e-03 6.856e+01 0.101 0.92
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st1.31 CprvRT
## strpos1.31 0.129
## CprevRT -0.008 0.002
## Corder 0.000 -0.011 0.047
data3$strpos3.13 <- ifelse(data3$strpos=="33",-0.5,ifelse(data3$strpos=="13",0.5,NA))
l3.13 <- lmer ( logRT ~ strpos3.13 + CprevRT + Corder + (strpos3.13|subject) + (0+Corder|subject) + (strpos3.13||name), data3, subset= lex=="Word"&(strpos %in% c("13","33")))
summary(l3.13)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos3.13 + CprevRT + Corder + (strpos3.13 | subject) +
## (0 + Corder | subject) + (strpos3.13 || name)
## Data: data3
## Subset: lex == "Word" & (strpos %in% c("13", "33"))
##
## REML criterion at convergence: -116.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7860 -0.6077 -0.1077 0.4956 3.6783
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.0289765 0.17022
## strpos3.13 0.0008249 0.02872 0.74
## subject.1 Corder 0.0017356 0.04166
## name (Intercept) 0.0258974 0.16093
## name.1 strpos3.13 0.0001676 0.01295
## Residual 0.0417428 0.20431
## Number of obs: 1556, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.644e+00 3.124e-02 9.613e+01 212.691 < 2e-16 ***
## strpos3.13 1.341e-01 1.346e-02 1.899e+01 9.963 5.62e-09 ***
## CprevRT 3.384e-02 6.595e-03 1.502e+03 5.131 3.26e-07 ***
## Corder -1.968e-02 7.356e-03 7.635e+01 -2.675 0.00914 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st3.13 CprvRT
## strpos3.13 0.220
## CprevRT -0.012 -0.079
## Corder -0.003 0.008 0.000
data3$strpos3.23 <- ifelse(data3$strpos=="33",-0.5,ifelse(data3$strpos=="23",0.5,NA))
l3.23 <- lmer ( logRT ~ strpos3.23 + CprevRT + Corder + (strpos3.23|subject) + (0+Corder|subject) + (strpos3.23|name), data3, subset= lex=="Word"&(strpos %in% c("23","33")), control = lmerControl(optimizer = "bobyqa"))
summary(l3.23)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos3.23 + CprevRT + Corder + (strpos3.23 | subject) +
## (0 + Corder | subject) + (strpos3.23 | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Word" & (strpos %in% c("23", "33"))
##
## REML criterion at convergence: 86.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.0294 -0.6095 -0.1234 0.5243 3.7455
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.030913 0.17582
## strpos3.23 0.003608 0.06007 0.69
## subject.1 Corder 0.001862 0.04315
## name (Intercept) 0.014566 0.12069
## strpos3.23 0.008784 0.09373 -0.70
## Residual 0.047501 0.21795
## Number of obs: 1490, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.630e+00 2.792e-02 1.011e+02 237.423 < 2e-16 ***
## strpos3.23 1.097e-01 2.155e-02 3.734e+01 5.091 1.04e-05 ***
## CprevRT 3.175e-02 7.223e-03 1.425e+03 4.395 1.19e-05 ***
## Corder -1.995e-02 7.853e-03 7.229e+01 -2.540 0.0132 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st3.23 CprvRT
## strpos3.23 0.001
## CprevRT 0.010 0.010
## Corder -0.006 0.000 0.005
data3$strpos2.12 <- ifelse(data3$strpos=="22",-0.5,ifelse(data3$strpos=="12",0.5,NA))
l2.12 <- lmer ( logRT ~ strpos2.12 + CprevRT + Corder + (strpos2.12|subject) + (0+Corder|subject) + (strpos2.12||name), data3, subset= lex=="Pseudo"&(strpos %in% c("12","22")))
summary(l2.12)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos2.12 + CprevRT + Corder + (strpos2.12 | subject) +
## (0 + Corder | subject) + (strpos2.12 || name)
## Data: data3
## Subset: lex == "Pseudo" & (strpos %in% c("12", "22"))
##
## REML criterion at convergence: -744.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.8402 -0.6012 -0.0924 0.4804 5.4302
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.0198750 0.14098
## strpos2.12 0.0001071 0.01035 1.00
## subject.1 Corder 0.0015651 0.03956
## name (Intercept) 0.0048413 0.06958
## name.1 strpos2.12 0.0001413 0.01188
## Residual 0.0305244 0.17471
## Number of obs: 1715, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.589e+00 1.992e-02 1.011e+02 330.762 < 2e-16 ***
## strpos2.12 2.278e-02 1.064e-02 2.136e+01 2.140 0.04401 *
## CprevRT 4.710e-02 5.194e-03 1.666e+03 9.068 < 2e-16 ***
## Corder -1.979e-02 6.352e-03 7.302e+01 -3.116 0.00262 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st2.12 CprvRT
## strpos2.12 0.223
## CprevRT -0.004 -0.013
## Corder 0.010 -0.001 0.010
data3$strpos2.32 <- ifelse(data3$strpos=="22",-0.5,ifelse(data3$strpos=="32",0.5,NA))
l2.32 <- lmer ( logRT ~ strpos2.32 + CprevRT + Corder + (strpos2.32|subject) + (0+Corder|subject) + (1|name), data3, subset= lex=="Pseudo"&(strpos %in% c("32","22")), control = lmerControl(optimizer = "bobyqa"))
summary(l2.32)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos2.32 + CprevRT + Corder + (strpos2.32 | subject) +
## (0 + Corder | subject) + (1 | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & (strpos %in% c("32", "22"))
##
## REML criterion at convergence: -783.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.5317 -0.6136 -0.1056 0.4551 5.6406
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.021255 0.14579
## strpos2.32 0.001382 0.03718 0.48
## subject.1 Corder 0.001450 0.03808
## name (Intercept) 0.005791 0.07610
## Residual 0.029661 0.17222
## Number of obs: 1739, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.593e+00 2.080e-02 1.042e+02 316.919 < 2e-16 ***
## strpos2.32 3.111e-02 1.087e-02 9.913e+01 2.862 0.00514 **
## CprevRT 4.396e-02 5.099e-03 1.688e+03 8.620 < 2e-16 ***
## Corder -2.464e-02 6.172e-03 6.946e+01 -3.992 0.00016 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st2.32 CprvRT
## strpos2.32 0.259
## CprevRT -0.007 -0.028
## Corder 0.001 -0.032 0.043
data3$strpos1.21 <- ifelse(data3$strpos=="11",-0.5,ifelse(data3$strpos=="21",0.5,NA))
l1.21 <- lmer ( logRT ~ strpos1.21 + CprevRT + Corder + (strpos1.21|subject) + (0+Corder|subject) + (1|name), data3, subset= lex=="Pseudo"&(strpos %in% c("21","11")), control = lmerControl(optimizer = "bobyqa"))
summary(l1.21)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos1.21 + CprevRT + Corder + (strpos1.21 | subject) +
## (0 + Corder | subject) + (1 | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & (strpos %in% c("21", "11"))
##
## REML criterion at convergence: -735.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.4163 -0.5839 -0.1179 0.4760 4.7603
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.023102 0.15199
## strpos1.21 0.001493 0.03864 -0.03
## subject.1 Corder 0.001057 0.03250
## name (Intercept) 0.003852 0.06206
## Residual 0.030758 0.17538
## Number of obs: 1729, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.605e+00 2.044e-02 9.652e+01 323.132 < 2e-16 ***
## strpos1.21 -2.574e-03 1.105e-02 1.019e+02 -0.233 0.81637
## CprevRT 4.612e-02 5.314e-03 1.681e+03 8.679 < 2e-16 ***
## Corder -1.943e-02 5.811e-03 6.962e+01 -3.344 0.00133 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st1.21 CprvRT
## strpos1.21 0.091
## CprevRT 0.003 0.002
## Corder -0.006 0.008 0.069
data3$strpos1.31 <- ifelse(data3$strpos=="11",-0.5,ifelse(data3$strpos=="31",0.5,NA))
l1.31 <- lmer ( logRT ~ strpos1.31 + CprevRT + Corder + (strpos1.31||subject) + (0+Corder|subject) + (strpos1.31||name), data3, subset= lex=="Pseudo"&(strpos %in% c("31","11")), control = lmerControl(optimizer = "bobyqa"))
summary(l1.31)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos1.31 + CprevRT + Corder + (strpos1.31 || subject) +
## (0 + Corder | subject) + (strpos1.31 || name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & (strpos %in% c("31", "11"))
##
## REML criterion at convergence: -587.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.2785 -0.5831 -0.0970 0.4535 4.3198
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 0.0229176 0.15139
## subject.1 strpos1.31 0.0019300 0.04393
## subject.2 Corder 0.0017988 0.04241
## name (Intercept) 0.0041912 0.06474
## name.1 strpos1.31 0.0003497 0.01870
## Residual 0.0329026 0.18139
## Number of obs: 1695, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.616e+00 2.068e-02 9.729e+01 319.914 < 2e-16 ***
## strpos1.31 2.012e-02 1.246e-02 2.656e+01 1.615 0.11812
## CprevRT 4.707e-02 5.662e-03 1.647e+03 8.313 < 2e-16 ***
## Corder -2.118e-02 6.790e-03 7.734e+01 -3.120 0.00254 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st1.31 CprvRT
## strpos1.31 0.121
## CprevRT -0.001 -0.010
## Corder -0.006 0.007 0.052
data3$strpos3.13 <- ifelse(data3$strpos=="33",-0.5,ifelse(data3$strpos=="13",0.5,NA))
l3.13 <- lmer ( logRT ~ strpos3.13 + CprevRT + Corder + (strpos3.13||subject) + (0+Corder|subject) + (strpos3.13||name), data3, subset= lex=="Pseudo"&(strpos %in% c("13","33")), control = lmerControl(optimizer = "bobyqa"))
summary(l3.13)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos3.13 + CprevRT + Corder + (strpos3.13 || subject) +
## (0 + Corder | subject) + (strpos3.13 || name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & (strpos %in% c("13", "33"))
##
## REML criterion at convergence: -732.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2616 -0.6284 -0.1194 0.4847 5.1838
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 0.020917 0.14463
## subject.1 strpos3.13 0.000121 0.01100
## subject.2 Corder 0.001988 0.04459
## name (Intercept) 0.003170 0.05630
## name.1 strpos3.13 0.001894 0.04352
## Residual 0.030739 0.17532
## Number of obs: 1741, groups: subject, 74; name, 49
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.564e+00 1.946e-02 9.514e+01 337.395 < 2e-16 ***
## strpos3.13 4.146e-02 1.284e-02 2.648e+01 3.229 0.00331 **
## CprevRT 3.952e-02 5.520e-03 1.698e+03 7.161 1.19e-12 ***
## Corder -1.935e-02 6.741e-03 7.239e+01 -2.870 0.00538 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st3.13 CprvRT
## strpos3.13 0.132
## CprevRT 0.004 -0.002
## Corder 0.002 0.002 0.051
data3$strpos3.23 <- ifelse(data3$strpos=="33",-0.5,ifelse(data3$strpos=="23",0.5,NA))
l3.23 <- lmer ( logRT ~ strpos3.23 + CprevRT + Corder + (strpos3.23|subject) + (0+Corder|subject) + (strpos3.23|name), data3, subset= lex=="Pseudo"&(strpos %in% c("23","33")), control = lmerControl(optimizer = "bobyqa"))
summary(l3.23)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: logRT ~ strpos3.23 + CprevRT + Corder + (strpos3.23 | subject) +
## (0 + Corder | subject) + (strpos3.23 | name)
## Data: data3
## Control: lmerControl(optimizer = "bobyqa")
## Subset: lex == "Pseudo" & (strpos %in% c("23", "33"))
##
## REML criterion at convergence: -692
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6007 -0.6403 -0.1066 0.4637 4.8517
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.022535 0.15012
## strpos3.23 0.002750 0.05244 0.55
## subject.1 Corder 0.001851 0.04302
## name (Intercept) 0.001932 0.04396
## strpos3.23 0.001635 0.04043 -0.72
## Residual 0.030931 0.17587
## Number of obs: 1687, groups: subject, 74; name, 48
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 6.547e+00 1.923e-02 8.317e+01 340.504 < 2e-16 ***
## strpos3.23 8.777e-03 1.304e-02 3.446e+01 0.673 0.50548
## CprevRT 3.704e-02 5.646e-03 1.627e+03 6.560 7.2e-11 ***
## Corder -1.915e-02 6.722e-03 6.683e+01 -2.849 0.00582 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) st3.23 CprvRT
## strpos3.23 0.210
## CprevRT 0.001 -0.014
## Corder 0.001 -0.003 0.037
To quantify support for the null (i.e., no difference in stress priming among stress patterns) we compute a Bayes factor comparing two models, one with the interaction and one without.
data33 <- na.omit(data3[data3$lex=="Word" & data3$cond!="Neutral", # lmBF cannot deal with missing values
c("targpos","condC","CprevRT","Corder","subject","name","logRT")])
data33$sID <- data33$subject # fixing nul in string
lb1 <- lmBF( logRT ~ targpos*condC + CprevRT + Corder + sID + name, data33, whichRandom=c("sID","name"))
lb0 <- lmBF( logRT ~ targpos+condC + CprevRT + Corder + sID + name, data33, whichRandom=c("sID","name"))
lb1/lb0
## Bayes factor analysis
## --------------
## [1] targpos * condC + CprevRT + Corder + sID + name : 0.09654998 ±2.47%
##
## Against denominator:
## logRT ~ targpos + condC + CprevRT + Corder + sID + name
## ---
## Bayes factor type: BFlinearModel, JZS
The value 0.1 indicates moderate to strong support for the null.
sessionInfo()
## R version 3.6.2 (2019-12-12)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 18363)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2] LC_CTYPE=English_United States.1252
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C
## [5] LC_TIME=English_United States.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] BayesFactor_0.9.12-4.2 coda_0.19-3 dfoptim_2018.2-1
## [4] gtools_3.8.1 effects_4.1-4 carData_3.0-3
## [7] lmerTest_3.1-1 lattice_0.20-40 lme4_1.1-21
## [10] Matrix_1.2-18
##
## loaded via a namespace (and not attached):
## [1] tidyselect_0.2.5 xfun_0.12 purrr_0.3.3
## [4] pbapply_1.4-2 mitools_2.4 splines_3.6.2
## [7] colorspace_1.4-1 htmltools_0.4.0 yaml_2.2.1
## [10] survival_3.1-8 rlang_0.4.2 nloptr_1.2.1
## [13] pillar_1.4.3 glue_1.3.1 DBI_1.1.0
## [16] lifecycle_0.1.0 stringr_1.4.0 MatrixModels_0.4-1
## [19] munsell_0.5.0 gtable_0.3.0 mvtnorm_1.0-11
## [22] evaluate_0.14 knitr_1.28 parallel_3.6.2
## [25] Rcpp_1.0.3 scales_1.1.0 ggplot2_3.2.1
## [28] digest_0.6.25 stringi_1.4.6 dplyr_0.8.3
## [31] survey_3.36 numDeriv_2016.8-1.1 grid_3.6.2
## [34] tools_3.6.2 magrittr_1.5 lazyeval_0.2.2
## [37] tibble_2.1.3 crayon_1.3.4 pkgconfig_2.0.3
## [40] MASS_7.3-51.5 estimability_1.3 assertthat_0.2.1
## [43] minqa_1.2.4 rmarkdown_2.1 R6_2.4.1
## [46] boot_1.3-24 nnet_7.3-13 nlme_3.1-144
## [49] compiler_3.6.2