Analysis walkthrough for “Tuning in to non-adjacencies: Exposure to learnable patterns supports discovering otherwise difficult structures” (Zettersten, Potter & Saffran).

For details on the rationale for individual analyses, see the corresponding paper.

Experiment 1

Test Accuracy

Accuracy Plot

#Familiar X Test
p1 <- ggplot(subset(test_type_exp,testType=="familiarX"&exp=="exp1"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="familiarX"&exp=="exp1"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=16)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#4DAF4A","#E41A1C"))+
  scale_color_manual(values=c("#4DAF4A","#E41A1C"))+
  theme(legend.position="none")+
  ylab("Accuracy - Familiar X Test")+
  xlab("Condition")

#Novel X
p2 <- ggplot(subset(test_type_exp,testType=="novelX"&exp=="exp1"),aes(condition,accuracy,fill=condition,color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="novelX"&exp=="exp1"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=16)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#4DAF4A","#E41A1C"))+
  scale_color_manual(values=c("#4DAF4A","#E41A1C"))+
  theme(legend.position="none")+
  ylab("Accuracy - Novel X Test")+
  xlab("Condition")
plot_grid(p1,p2, labels=c("A","B"),label_size=18)

Overall Accuracy Table

overall_exp %>%
  filter(exp=="exp1") %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp1 Learnable Pre-Exposure 32 0.6197917 0.5503856 0.6891977 0.8180681 0.33183941 1.3042967 -0.1721116 -0.2965946 -0.0476286
exp1 Non-Learnable Pre-Exposure 35 0.5293651 0.4935915 0.5651386 0.2026126 -0.04537869 0.4506038 -0.3028788 -0.4757694 -0.1299883

Accuracy Table By Test Type

test_type_exp %>%
  filter(exp=="exp1") %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition testType N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp1 Learnable Pre-Exposure familiarX 32 0.6197917 0.5505723 0.6890110 0.7511226 0.32051674 1.1817285 -0.24820588 -0.4281889 -0.06822284
exp1 Learnable Pre-Exposure novelX 32 0.6197917 0.5436288 0.6959545 0.7517021 0.28191789 1.2214863 -0.08924026 -0.2107732 0.03229271
exp1 Non-Learnable Pre-Exposure familiarX 35 0.5269841 0.4794718 0.5744965 0.1608595 -0.12636554 0.4480845 -0.47197810 -0.6295813 -0.31437490
exp1 Non-Learnable Pre-Exposure novelX 35 0.5317460 0.4921224 0.5713697 0.1901106 -0.04401717 0.4242384 -0.11014830 -0.3209422 0.10064563

Correlation

Correlation between Familiar X and Novel X Trials: Learnable Pre-Exposure
##Correlations between Familiar X and Novel X
c <- corr.test(subset(subj_accuracy_wide, condition=="Learnable Pre-Exposure" & exp=="exp1")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Learnable Pre-Exposure" & 
##     exp == "exp1")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.82
## familiarX   0.82      1.00
## Sample Size 
## [1] 32
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                 novelX    familiarX
## novelX    0.000000e+00 7.454645e-09
## familiarX 7.454645e-09 0.000000e+00
Correlation between Familiar X and Novel X Trials: Non-Learnable Pre-Exposure
c <- corr.test(subset(subj_accuracy_wide, condition=="Non-Learnable Pre-Exposure" & exp=="exp1")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Non-Learnable Pre-Exposure" & 
##     exp == "exp1")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.34
## familiarX   0.34      1.00
## Sample Size 
## [1] 35
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX      0.00      0.04
## familiarX   0.04      0.00
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##               novelX  familiarX
## novelX    0.00000000 0.04366703
## familiarX 0.04366703 0.00000000

Compute correlation without outlier participant with perfect Familiar X and Novel X accuracy

#check outlier in Non-Learnable Pre-Exposure Condition
outlierTest(lm(novelX~familiarX,subset(subj_accuracy_wide,exp=="exp1"&condition=="Non-Learnable Pre-Exposure")))
##    rstudent unadjusted p-value Bonferroni p
## 34 5.040898         1.7644e-05   0.00061755
#correlation without outlier
c <- corr.test(subset(subj_accuracy_wide, condition=="Non-Learnable Pre-Exposure" & exp=="exp1"&participantCode!="apg_exp1_p7")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Non-Learnable Pre-Exposure" & 
##     exp == "exp1" & participantCode != "apg_exp1_p7")[, c("novelX", 
##     "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00     -0.14
## familiarX  -0.14      1.00
## Sample Size 
## [1] 34
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX      0.00      0.44
## familiarX   0.44      0.00
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##              novelX familiarX
## novelX    0.0000000 0.4434494
## familiarX 0.4434494 0.0000000
Interaction between Test Type and Condition
m <- lm(novelX~familiarX*condition, subset(subj_accuracy_wide,exp=="exp1"))
summary(m)
## 
## Call:
## lm(formula = novelX ~ familiarX * condition, data = subset(subj_accuracy_wide, 
##     exp == "exp1"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.26809 -0.06266 -0.01132  0.04742  0.33776 
## 
## Coefficients:
##                                               Estimate Std. Error t value
## (Intercept)                                    0.05859    0.07023   0.834
## familiarX                                      0.90546    0.10839   8.354
## conditionNon-Learnable Pre-Exposure            0.32240    0.10511   3.067
## familiarX:conditionNon-Learnable Pre-Exposure -0.61940    0.17996  -3.442
##                                               Pr(>|t|)    
## (Intercept)                                    0.40727    
## familiarX                                      8.6e-12 ***
## conditionNon-Learnable Pre-Exposure            0.00318 ** 
## familiarX:conditionNon-Learnable Pre-Exposure  0.00103 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1159 on 63 degrees of freedom
## Multiple R-squared:  0.5697, Adjusted R-squared:  0.5492 
## F-statistic:  27.8 on 3 and 63 DF,  p-value: 1.425e-11

Correlation Plot

ggplot(subset(subj_accuracy_wide,exp=="exp1"),aes(familiarX,novelX, color=condition,linetype=condition,shape=condition))+
  geom_jitter(width=0.02,height=0.02,size=3)+
  geom_smooth(method=lm,se =F,size=1.5)+
  scale_color_manual(name="Condition",values=c("#4DAF4A","#E41A1C"))+
  scale_linetype_discrete(name="Condition")+
  scale_shape_discrete(name="Condition")+
  ylab("Accuracy - Novel X")+
  xlab("Accuracy - Familiar X")+
  theme_classic(base_size=18)+
  theme(legend.position=c(0.3,0.9))

Logistic Mixed-Effects Model

Overall

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

##all data
#recode condition
d$conditionC <- ifelse(d$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(d$condition=="Non-Learnable Pre-Exposure",-0.5,NA))
m <- glmer(isRight~conditionC+(1|participantCode)+(0+conditionC|stimulus),data=subset(d,exp=="exp1"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (0 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3187.2   3210.4  -1589.6   3179.2     2408 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8145 -1.0146  0.3718  0.9347  1.3215 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.45292  0.6730  
##  stimulus        conditionC  0.03135  0.1771  
## Number of obs: 2412, groups:  participantCode, 67; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36233    0.09396   3.856 0.000115 ***
## conditionC   0.45319    0.18959   2.390 0.016831 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.070
confint(m, method="Wald")[3:4,]
##                  2.5 %    97.5 %
## (Intercept) 0.17817515 0.5464922
## conditionC  0.08160272 0.8247797
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp1"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3191.2   3225.9  -1589.6   3179.2     2406 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8161 -1.0141  0.3721  0.9345  1.3206 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. Corr
##  participantCode (Intercept) 4.530e-01 0.673034     
##  stimulus        (Intercept) 5.008e-06 0.002238     
##                  conditionC  3.157e-02 0.177674 1.00
## Number of obs: 2412, groups:  participantCode, 67; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36236    0.09397   3.856 0.000115 ***
## conditionC   0.45326    0.18963   2.390 0.016836 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.071 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                  2.5 %    97.5 %
## (Intercept) 0.17818361 0.5465339
## conditionC  0.08159645 0.8249155

Familiar X Trials

Condition Effect
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

# excluding the random effect with an estimated covariance of zero (identical results)
m <- glmer(isRight~conditionC+(1|participantCode)+(0+conditionC|stimulus),data=subset(d,exp=="exp1"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (0 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1621.4   1641.8   -806.7   1613.4     1202 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8397 -1.0270  0.5291  0.8899  1.2857 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.30588  0.5531  
##  stimulus        conditionC  0.03155  0.1776  
## Number of obs: 1206, groups:  participantCode, 67; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.32844    0.09148   3.590  0.00033 ***
## conditionC   0.42159    0.18715   2.253  0.02428 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.069
confint(m, method="Wald")[3:4,]
##                  2.5 %    97.5 %
## (Intercept) 0.14914321 0.5077313
## conditionC  0.05478651 0.7884028
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

#maximal model
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp1"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa")) #convergence warning
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1625.4   1656.0   -806.7   1613.4     1200 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8397 -1.0270  0.5291  0.8899  1.2857 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr
##  participantCode (Intercept) 0.30588  0.5531       
##  stimulus        (Intercept) 0.00000  0.0000       
##                  conditionC  0.03155  0.1776    NaN
## Number of obs: 1206, groups:  participantCode, 67; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.32844    0.09148   3.590  0.00033 ***
## conditionC   0.42159    0.18715   2.253  0.02428 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.069 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                  2.5 %    97.5 %
## (Intercept) 0.14914303 0.5077312
## conditionC  0.05478489 0.7884044
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp1"&testType=="familiarX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp1" & testType == "familiarX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    740.7    749.5   -368.4    736.7      574 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1056 -1.0740  0.3629  0.8553  1.1999 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.6889   0.83    
## Number of obs: 576, groups:  participantCode, 32
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.5848     0.1761   3.321 0.000897 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.2396826 0.9299226
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp1"&testType=="familiarX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: 
## subset(d, exp == "exp1" & testType == "familiarX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    742.7    755.8   -368.4    736.7      573 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1056 -1.0740  0.3629  0.8553  1.1999 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.6889   0.83    
##  stimulus        (Intercept) 0.0000   0.00    
## Number of obs: 576, groups:  participantCode, 32; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.5848     0.1761   3.321 0.000897 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                2.5 %    97.5 %
## .sig01            NA        NA
## .sig02            NA        NA
## (Intercept) 0.239681 0.9299249
Testing against chance: Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp1"&testType=="familiarX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp1" & testType == "familiarX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    873.8    882.7   -434.9    869.8      628 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2102 -1.0412  0.7315  0.9604  1.0828 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.08204  0.2864  
## Number of obs: 630, groups:  participantCode, 35
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept)  0.11052    0.09406   1.175     0.24
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## (Intercept) -0.07383629 0.2948815
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp1"&testType=="familiarX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: 
## subset(d, exp == "exp1" & testType == "familiarX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    875.8    889.1   -434.9    869.8      627 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2102 -1.0412  0.7315  0.9604  1.0828 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.08204  0.2864  
##  stimulus        (Intercept) 0.00000  0.0000  
## Number of obs: 630, groups:  participantCode, 35; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept)  0.11052    0.09406   1.175     0.24
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## .sig02               NA        NA
## (Intercept) -0.07383649 0.2948815

Novel X Trials

Condition Effect
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~conditionC+(1|participantCode)+(0+conditionC|stimulus),data=subset(d,exp=="exp1"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (0 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1618.4   1638.8   -805.2   1610.4     1202 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0476 -1.0466  0.4978  0.8995  1.2835 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.33311  0.5772  
##  stimulus        conditionC  0.02415  0.1554  
## Number of obs: 1206, groups:  participantCode, 67; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.34347    0.09399   3.654 0.000258 ***
## conditionC   0.41292    0.19094   2.163 0.030574 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.076
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## .sig02              NA        NA
## (Intercept) 0.15925784 0.5276890
## conditionC  0.03868726 0.7871542
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp1"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp1" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1622.4   1652.9   -805.2   1610.4     1200 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0476 -1.0466  0.4978  0.8995  1.2835 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr
##  participantCode (Intercept) 0.33311  0.5772       
##  stimulus        (Intercept) 0.00000  0.0000       
##                  conditionC  0.02415  0.1554    NaN
## Number of obs: 1206, groups:  participantCode, 67; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.34347    0.09399   3.654 0.000258 ***
## conditionC   0.41292    0.19094   2.163 0.030574 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.076 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %   97.5 %
## (Intercept) 0.1592572 0.527690
## conditionC  0.0386855 0.787156
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp1"&testType=="novelX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp1" & testType == "novelX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    727.2    740.2   -360.6    721.2      573 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6207 -0.9700  0.3824  0.8683  1.3699 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.98658  0.99327 
##  stimulus        (Intercept) 0.00439  0.06626 
## Number of obs: 576, groups:  participantCode, 32; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)   0.6291     0.2038   3.086  0.00203 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## .sig02             NA       NA
## (Intercept) 0.2295743 1.028565
Testing against chance: Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glm(isRight~1,data=subset(d,exp=="exp1"&testType=="novelX"&conditionC==-0.5),family=binomial)
summary(m)
## 
## Call:
## glm(formula = isRight ~ 1, family = binomial, data = subset(d, 
##     exp == "exp1" & testType == "novelX" & conditionC == -0.5))
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -1.232  -1.232   1.124   1.124   1.124  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept)  0.12716    0.07984   1.593    0.111
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 870.82  on 629  degrees of freedom
## Residual deviance: 870.82  on 629  degrees of freedom
## AIC: 872.82
## 
## Number of Fisher Scoring iterations: 3
confint(m, method="Wald")
## Waiting for profiling to be done...
##       2.5 %      97.5 % 
## -0.02915486  0.28398462
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp1"&testType=="novelX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp1" & testType == "novelX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    876.8    890.2   -435.4    870.8      627 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.0656 -1.0656  0.9384  0.9384  0.9384 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0        0       
##  stimulus        (Intercept) 0        0       
## Number of obs: 630, groups:  participantCode, 35; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept)  0.12716    0.07984   1.593    0.111
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[3,]
##       2.5 %      97.5 % 
## -0.02933406  0.28364441

Interaction between test type and condition

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#recode test type
d$testTypeC <- ifelse(d$testType=="novelX",0.5,
                    ifelse(d$testType=="familiarX",-0.5,NA))
##all data
m <- glmer(isRight~conditionC*testTypeC+(1|participantCode)+(0+conditionC|stimulus),data=subset(d,exp=="exp1"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC * testTypeC + (1 | participantCode) + (0 +  
##     conditionC | stimulus)
##    Data: subset(d, exp == "exp1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3191.2   3225.9  -1589.6   3179.2     2406 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8151 -1.0158  0.3718  0.9372  1.3230 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.45292  0.6730  
##  stimulus        conditionC  0.03123  0.1767  
## Number of obs: 2412, groups:  participantCode, 67; stimulus, 36
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.36233    0.09396   3.856 0.000115 ***
## conditionC            0.45319    0.18958   2.390 0.016827 *  
## testTypeC             0.01004    0.08636   0.116 0.907448    
## conditionC:testTypeC -0.02008    0.18248  -0.110 0.912371    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC  0.070               
## testTypeC   0.000  0.000        
## cndtnC:tsTC 0.000  0.000  0.098
confint(m, method="Wald")[3:6,]
##                            2.5 %    97.5 %
## (Intercept)           0.17817542 0.5464902
## conditionC            0.08161444 0.8247583
## testTypeC            -0.15922356 0.1793038
## conditionC:testTypeC -0.37774439 0.3375804
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
m <- glmer(isRight~conditionC*testTypeC+(1+testTypeC|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp1"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC * testTypeC + (1 + testTypeC | participantCode) +  
##     (1 + conditionC | stimulus)
##    Data: subset(d, exp == "exp1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3199.2   3257.0  -1589.6   3179.2     2402 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8439 -1.0144  0.3759  0.9368  1.3191 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. Corr
##  participantCode (Intercept) 0.4529594 0.67302      
##                  testTypeC   0.0003477 0.01865  1.00
##  stimulus        (Intercept) 0.0000000 0.00000      
##                  conditionC  0.0312275 0.17671   NaN
## Number of obs: 2412, groups:  participantCode, 67; stimulus, 36
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.36238    0.09396   3.857 0.000115 ***
## conditionC            0.45328    0.18959   2.391 0.016810 *  
## testTypeC             0.01336    0.08894   0.150 0.880571    
## conditionC:testTypeC -0.01559    0.18477  -0.084 0.932777    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC  0.070               
## testTypeC   0.025  0.003        
## cndtnC:tsTC 0.002  0.024  0.130 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[7:10,]
##                            2.5 %    97.5 %
## (Intercept)           0.17821292 0.5465478
## conditionC            0.08168851 0.8248784
## testTypeC            -0.16095354 0.1876788
## conditionC:testTypeC -0.37772619 0.3465552

Signal Detection Model

Sensitivity

Overall
#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_overall$condition=="Non-Learnable Pre-Exposure",-0.5,NA))
##all data
m <- lm(dprime~conditionC,data=subset(subj_overall,exp=="exp1"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_overall, 
##     exp == "exp1"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5828 -0.6476 -0.2026  0.2241  3.6264 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.5103     0.1306   3.908 0.000224 ***
## conditionC    0.6155     0.2611   2.357 0.021460 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.068 on 65 degrees of freedom
## Multiple R-squared:  0.07872,    Adjusted R-squared:  0.06455 
## F-statistic: 5.554 on 1 and 65 DF,  p-value: 0.02146
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp1"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp1" & 
##     conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5828 -0.9621 -0.6038  0.6306  3.0109 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   0.8181     0.2384   3.431  0.00172 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.349 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp1"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp1" & 
##     conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1070 -0.2739 -0.2026  0.1443  3.6264 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)   0.2026     0.1220    1.66    0.106
## 
## Residual standard error: 0.7219 on 34 degrees of freedom
Familiar X Trials
Condition Effect
#recode condition
subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-0.5,NA))

m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp1" & testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.6555 -0.7511 -0.1609  0.4542  3.0256 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.4560     0.1251   3.646 0.000531 ***
## conditionC    0.5903     0.2501   2.360 0.021305 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.023 on 65 degrees of freedom
## Multiple R-squared:  0.0789, Adjusted R-squared:  0.06473 
## F-statistic: 5.568 on 1 and 65 DF,  p-value: 0.02131
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp1" & testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.6555 -0.7511 -0.4171  0.4855  2.4353 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   0.7511     0.2111   3.558  0.00123 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.194 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp1" & testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5212 -0.4461 -0.1609  0.3379  3.0256 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)   0.1609     0.1413   1.138    0.263
## 
## Residual standard error: 0.8361 on 34 degrees of freedom
Novel X Trials
Condition Effect
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp1"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp1" & testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9471 -0.7517 -0.1901  0.3231  2.9963 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.4709     0.1255   3.753 0.000375 ***
## conditionC    0.5616     0.2509   2.238 0.028663 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.026 on 65 degrees of freedom
## Multiple R-squared:  0.07154,    Adjusted R-squared:  0.05725 
## F-statistic: 5.008 on 1 and 65 DF,  p-value: 0.02866
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp1"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp1" & testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9471 -1.0311 -0.7517  0.9832  2.4347 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   0.7517     0.2303   3.263  0.00268 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.303 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp1"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp1" & testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.38555 -0.32982  0.08931  0.16317  2.99633 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)   0.1901     0.1152    1.65    0.108
## 
## Residual standard error: 0.6816 on 34 degrees of freedom
Interaction between Novel X and Familiar X trials
#recode test type
subj_testType$testTypeC <- ifelse(subj_testType$testType=="novelX",0.5,
                    ifelse(subj_testType$testType=="familiarX",-0.5,NA))
m <- lm(dprime~conditionC*testTypeC,data=subset(subj_testType,exp=="exp1"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC * testTypeC, data = subset(subj_testType, 
##     exp == "exp1"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9471 -0.7511 -0.1609  0.3803  3.0256 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           0.46345    0.08858   5.232 6.54e-07 ***
## conditionC            0.57593    0.17716   3.251  0.00147 ** 
## testTypeC             0.01492    0.17716   0.084  0.93304    
## conditionC:testTypeC -0.02867    0.35433  -0.081  0.93563    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.024 on 130 degrees of freedom
## Multiple R-squared:  0.07527,    Adjusted R-squared:  0.05393 
## F-statistic: 3.527 on 3 and 130 DF,  p-value: 0.01685

Response Bias

Overall
#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_overall$condition=="Non-Learnable Pre-Exposure",-0.5,NA))
##all data
m <- lm(c~conditionC,data=subset(subj_overall,exp=="exp1"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_overall, exp == 
##     "exp1"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61163 -0.18436  0.01147  0.30288  1.26614 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.23750    0.05322  -4.463 3.29e-05 ***
## conditionC   0.13077    0.10643   1.229    0.224    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4352 on 65 degrees of freedom
## Multiple R-squared:  0.0227, Adjusted R-squared:  0.007662 
## F-statistic:  1.51 on 1 and 65 DF,  p-value: 0.2236
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp1"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp1" & 
##     conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.52696 -0.19691 -0.04105  0.18958  1.26614 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.17211    0.06104   -2.82   0.0083 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3453 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp1"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp1" & 
##     conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61163 -0.09478  0.02066  0.30288  0.73361 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.30288    0.08507   -3.56  0.00112 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5033 on 34 degrees of freedom
Familiar X Trials
Condition Effect
#recode condition
subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-0.5,NA))

m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp1" & testType == "familiarX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.15872 -0.29250  0.04125  0.24821  1.65514 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.36009    0.05852  -6.154 5.26e-08 ***
## conditionC   0.22377    0.11703   1.912   0.0603 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4785 on 65 degrees of freedom
## Multiple R-squared:  0.05325,    Adjusted R-squared:  0.03868 
## F-statistic: 3.656 on 1 and 65 DF,  p-value: 0.06028
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp1" & 
##     testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.15872 -0.30657 -0.03701  0.24821  1.65514 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.24821    0.08825  -2.813  0.00845 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4992 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp1"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp1" & 
##     testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.12124 -0.20924  0.04125  0.25951  0.90271 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.47198    0.07755  -6.086 6.66e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4588 on 34 degrees of freedom
Novel X Trials
Condition Effect
m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp1"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp1" & testType == "novelX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.48307 -0.19598 -0.03536  0.18000  1.70337 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.09969    0.06129  -1.627    0.109
## conditionC   0.02091    0.12258   0.171    0.865
## 
## Residual standard error: 0.5012 on 65 degrees of freedom
## Multiple R-squared:  0.0004474,  Adjusted R-squared:  -0.01493 
## F-statistic: 0.02909 on 1 and 65 DF,  p-value: 0.8651
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp1"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp1" & 
##     testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.67547 -0.19598 -0.05047  0.08924  0.85395 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.08924    0.05959  -1.498    0.144
## 
## Residual standard error: 0.3371 on 31 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp1"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp1" & 
##     testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4831 -0.1751  0.1101  0.2528  1.7034 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)  -0.1101     0.1037  -1.062    0.296
## 
## Residual standard error: 0.6136 on 34 degrees of freedom
Interaction between Novel X and Familiar X trials
m <- lm(c~conditionC*testTypeC,data=subset(subj_testType,exp=="exp1"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC * testTypeC, data = subset(subj_testType, 
##     exp == "exp1"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.48307 -0.19598  0.04125  0.24821  1.70337 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          -0.22989    0.04237  -5.426 2.72e-07 ***
## conditionC            0.12234    0.08474   1.444  0.15121    
## testTypeC             0.26040    0.08474   3.073  0.00258 ** 
## conditionC:testTypeC -0.20286    0.16947  -1.197  0.23348    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.49 on 130 degrees of freedom
## Multiple R-squared:  0.09289,    Adjusted R-squared:  0.07196 
## F-statistic: 4.438 on 3 and 130 DF,  p-value: 0.005277

Experiment 2

Test Accuracy

Plot

#Familiar X Test
p1 <- ggplot(subset(test_type_exp,testType=="familiarX"&exp=="exp2"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="familiarX"&exp=="exp2"),aes(y=acc), width = 0.05, height=0.02, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=12)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","No\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#E41A1C","#377EB8","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  scale_color_manual(values=c("#E41A1C","#377EB8","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  theme(legend.position="none")+
  ylab("Accuracy - Familiar X Test")+
  xlab("Condition")

#Novel X
p2 <- ggplot(subset(test_type_exp,testType=="novelX"&exp=="exp2"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="novelX"&exp=="exp2"),aes(y=acc), width = 0.05, height=0.02, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=12)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","No\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#E41A1C","#377EB8","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  scale_color_manual(values=c("#E41A1C","#377EB8","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Learnable Pre-Exposure"))+
  theme(legend.position="none")+
  ylab("Accuracy - Novel X Test")+
  xlab("Condition")
plot_grid(p1,p2, labels=c("A","B"),label_size=18)

Overall Accuracy Table

overall_exp %>%
  filter(exp=="exp2") %>%
  select(-c(se,accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp2 Learnable Pre-Exposure 83 0.5722301 0.5361125 0.6083476 0.5077750 0.25212450 0.7634256 -0.1953715 -0.2714524 -0.1192905
exp2 No Pre-Exposure 81 0.5445816 0.5165071 0.5726561 0.2917437 0.09294647 0.4905409 -0.2817981 -0.3880251 -0.1755711
exp2 Non-Learnable Pre-Exposure 79 0.5256681 0.5047038 0.5466323 0.1619213 0.03136162 0.2924810 -0.3036137 -0.3863990 -0.2208284

Accuracy Table By Test Type

test_type_exp %>%
  filter(exp=="exp2") %>%
  select(-c(se,accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition testType N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp2 Learnable Pre-Exposure familiarX 83 0.5789826 0.5386545 0.6193107 0.4870309 0.236126039 0.7379357 -0.408382341 -0.49734439 -0.3194203
exp2 Learnable Pre-Exposure novelX 83 0.5653447 0.5256768 0.6050126 0.4027506 0.159998868 0.6455023 0.003715546 -0.10535999 0.1127911
exp2 No Pre-Exposure familiarX 81 0.5480110 0.5164667 0.5795553 0.2995076 0.101032689 0.4979825 -0.645538873 -0.75491277 -0.5361650
exp2 No Pre-Exposure novelX 81 0.5411523 0.5100279 0.5722766 0.2466637 0.058929824 0.4343976 0.086566193 -0.07935325 0.2524856
exp2 Non-Learnable Pre-Exposure familiarX 79 0.5246132 0.4991932 0.5500332 0.1377382 -0.017625810 0.2931023 -0.573193547 -0.67709443 -0.4692927
exp2 Non-Learnable Pre-Exposure novelX 79 0.5267229 0.4975832 0.5558626 0.1657024 -0.001404172 0.3328089 -0.048268953 -0.16192481 0.0653869

Correlation

Correlation between Familiar X and Novel X Trials: Learnable Pre-Exposure
##Correlations between Familiar X and Novel X
c <- corr.test(subset(subj_accuracy_wide, condition=="Learnable Pre-Exposure" & exp=="exp2")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Learnable Pre-Exposure" & 
##     exp == "exp2")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.63
## familiarX   0.63      1.00
## Sample Size 
## [1] 83
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                 novelX    familiarX
## novelX    0.000000e+00 2.081808e-10
## familiarX 2.081808e-10 0.000000e+00
Correlation between Familiar X and Novel X Trials: No Pre-Exposure
c <- corr.test(subset(subj_accuracy_wide, condition=="No Pre-Exposure" & exp=="exp2")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "No Pre-Exposure" & 
##     exp == "exp2")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.61
## familiarX   0.61      1.00
## Sample Size 
## [1] 81
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                novelX   familiarX
## novelX    0.00000e+00 2.12128e-09
## familiarX 2.12128e-09 0.00000e+00
Correlation between Familiar X and Novel X Trials: Non-Learnable Pre-Exposure
c <- corr.test(subset(subj_accuracy_wide, condition=="Non-Learnable Pre-Exposure" & exp=="exp2")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Non-Learnable Pre-Exposure" & 
##     exp == "exp2")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.18
## familiarX   0.18      1.00
## Sample Size 
## [1] 79
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX      0.00      0.12
## familiarX   0.12      0.00
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##              novelX familiarX
## novelX    0.0000000 0.1179566
## familiarX 0.1179566 0.0000000
Interaction
#interaction
subj_accuracy_wide$conditionC <- ifelse(subj_accuracy_wide$condition=="Learnable Pre-Exposure",0.5,
                           ifelse(subj_accuracy_wide$condition=="Non-Learnable Pre-Exposure",-0.5,
                                  ifelse(subj_accuracy_wide$condition=="No Pre-Exposure",0,NA)))
m <- lm(novelX~familiarX*conditionC, subset(subj_accuracy_wide,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = novelX ~ familiarX * conditionC, data = subset(subj_accuracy_wide, 
##     exp == "exp2"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.45402 -0.07543  0.00254  0.07862  0.29724 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           0.27859    0.03362   8.287 8.36e-15 ***
## familiarX             0.47707    0.06007   7.941 7.81e-14 ***
## conditionC           -0.18070    0.08022  -2.253   0.0252 *  
## familiarX:conditionC  0.35041    0.14285   2.453   0.0149 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1287 on 239 degrees of freedom
## Multiple R-squared:  0.3023, Adjusted R-squared:  0.2936 
## F-statistic: 34.52 on 3 and 239 DF,  p-value: < 2.2e-16

Correlation Plot

ggplot(subset(subj_accuracy_wide,exp=="exp2"),aes(familiarX,novelX, color=condition,linetype=condition,shape=condition))+
  geom_jitter(width=0.02,height=0.02,size=3)+
  geom_smooth(method=lm,se =F,size=1.5)+
  scale_color_manual(name="Condition",values=c("#4DAF4A","#377EB8","#E41A1C"))+
  scale_linetype_manual(name="Condition",values=c(1,4,2))+
  scale_shape_manual(name="Condition",values=c(16,15,17))+
  ylab("Accuracy - Novel X")+
  xlab("Accuracy - Familiar X")+
  theme_classic(base_size=18)+
  theme(legend.position=c(0.3,0.9))

Logistic Mixed-Effects Model

Overall

Final Converging Models

The final models with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

Richter single-contrast approach.

#recode condition
d$conditionC <- ifelse(d$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(d$condition=="Non-Learnable Pre-Exposure",-0.5,
                           ifelse(d$condition=="No Pre-Exposure",0,NA)))
d$conditionOrthContrast2 <- ifelse(d$condition=="Learnable Pre-Exposure",-1/3,
                                ifelse(d$condition=="Non-Learnable Pre-Exposure",-1/3,
                                       ifelse(d$condition=="No Pre-Exposure",2/3,NA)))

#overall analysis (Richter single-contrast apporach)
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11872.8  11894.0  -5933.4  11866.8     8743 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1798 -1.0343  0.4833  0.9310  1.3423 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2357   0.4855  
## Number of obs: 8746, groups:  participantCode, 243
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.2104     0.0383   5.493 3.94e-08 ***
## conditionC    0.2165     0.0937   2.310   0.0209 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.008
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## (Intercept) 0.13533554 0.2854744
## conditionC  0.03282819 0.4001370

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11874.7  11903.0  -5933.3  11866.7     8742 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1830 -1.0320  0.4826  0.9331  1.3406 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2356   0.4854  
## Number of obs: 8746, groups:  participantCode, 243
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.21042    0.03830   5.494 3.92e-08 ***
## conditionC              0.21628    0.09372   2.308    0.021 *  
## conditionOrthContrast2 -0.02106    0.08098  -0.260    0.795    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.008       
## cndtnOrthC2 -0.002  0.008
confint(m, method="Wald")
##                              2.5 %    97.5 %
## .sig01                          NA        NA
## (Intercept)             0.13535407 0.2854761
## conditionC              0.03259514 0.3999630
## conditionOrthContrast2 -0.17978510 0.1376648
Maximal Random Effects Model

Note that these model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

Richter single-contrast approach.

#overall analysis (Richter single-contrast apporach)
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa")) #convergence warning
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11878.8  11921.2  -5933.4  11866.8     8740 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1798 -1.0343  0.4833  0.9310  1.3423 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 2.357e-01 4.855e-01     
##  stimulus        (Intercept) 7.043e-14 2.654e-07     
##                  conditionC  5.117e-12 2.262e-06 1.00
## Number of obs: 8746, groups:  participantCode, 243; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.21041    0.03830   5.493 3.95e-08 ***
## conditionC   0.21648    0.09372   2.310   0.0209 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.008
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.1353330 0.2854778
## conditionC  0.0327907 0.4001751

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m=glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode)+(1+conditionC+conditionOrthContrast2|stimulus),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa")) #convergence warning
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode) +  
##     (1 + conditionC + conditionOrthContrast2 | stimulus)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11886.5  11957.3  -5933.3  11866.5     8736 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1902 -1.0241  0.4887  0.9259  1.3662 
## 
## Random effects:
##  Groups          Name                   Variance Std.Dev. Corr       
##  participantCode (Intercept)            0.236011 0.48581             
##  stimulus        (Intercept)            0.000000 0.00000             
##                  conditionC             0.006386 0.07991    NaN      
##                  conditionOrthContrast2 0.003532 0.05943    NaN -1.00
## Number of obs: 8746, groups:  participantCode, 243; stimulus, 36
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.21054    0.03832   5.494 3.93e-08 ***
## conditionC              0.21654    0.09472   2.286   0.0222 *  
## conditionOrthContrast2 -0.02112    0.08164  -0.259   0.7959    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.008       
## cndtnOrthC2 -0.002 -0.009
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[8:10,]
##                              2.5 %    97.5 %
## (Intercept)             0.13543373 0.2856546
## conditionC              0.03090042 0.4021836
## conditionOrthContrast2 -0.18113716 0.1388980

Pairwise condition comparisons

Learnable vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & conditionC != 0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7895.9   7915.9  -3945.0   7889.9     5827 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2363 -1.0167  0.4943  0.9153  1.3574 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2563   0.5063  
## Number of obs: 5830, groups:  participantCode, 162
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.21900    0.04832   4.533 5.82e-06 ***
## conditionC   0.21853    0.09651   2.264   0.0236 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.010
confint(m, method="Wald")[2:3,]
##                  2.5 %    97.5 %
## (Intercept) 0.12430384 0.3136995
## conditionC  0.02937304 0.4076837
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. Non-Learnable
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp2" & conditionC != 0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7901.8   7941.8  -3944.9   7889.8     5824 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2458 -1.0167  0.4940  0.9184  1.3877 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr
##  participantCode (Intercept) 0.256944 0.50690      
##  stimulus        (Intercept) 0.001265 0.03556      
##                  conditionC  0.005020 0.07086  1.00
## Number of obs: 5830, groups:  participantCode, 162; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.21921    0.04872   4.499 6.83e-06 ***
## conditionC   0.21892    0.09732   2.250   0.0245 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.005 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                  2.5 %    97.5 %
## (Intercept) 0.12371158 0.3147080
## conditionC  0.02818059 0.4096622
No Pre-Exposure vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Non-Learnable vs. No Pre-Exposure
d$conditionNonLearnableNoPreExp <- ifelse(d$conditionC==0.5,1.5,
                                    ifelse(d$conditionC==0,0.5,d$conditionC))
m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode),data=subset(d,exp=="exp2"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & conditionNonLearnableNoPreExp != 1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7925.0   7945.0  -3959.5   7919.0     5757 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6833 -1.0280  0.6637  0.9472  1.1175 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1019   0.3192  
## Number of obs: 5760, groups:  participantCode, 160
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    0.14609    0.03681   3.969 7.22e-05 ***
## conditionNonLearnableNoPreExp  0.08050    0.07357   1.094    0.274    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.008
confint(m, method="Wald")[2:3,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.07394511 0.2182280
## conditionNonLearnableNoPreExp -0.06368933 0.2246826
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode)+(1+conditionNonLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionNonLearnableNoPreExp | stimulus)
##    Data: subset(d, exp == "exp2" & conditionNonLearnableNoPreExp != 1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7931.0   7971.0  -3959.5   7919.0     5754 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6832 -1.0280  0.6637  0.9472  1.1175 
## 
## Random effects:
##  Groups          Name                          Variance  Std.Dev.  Corr
##  participantCode (Intercept)                   1.019e-01 3.192e-01     
##  stimulus        (Intercept)                   0.000e+00 0.000e+00     
##                  conditionNonLearnableNoPreExp 1.884e-13 4.340e-07  NaN
## Number of obs: 5760, groups:  participantCode, 160; stimulus, 36
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    0.14609    0.03681   3.969 7.22e-05 ***
## conditionNonLearnableNoPreExp  0.08050    0.07357   1.094    0.274    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.008
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.07394446 0.2182281
## conditionNonLearnableNoPreExp -0.06369568 0.2246870
Learnable vs. No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Learnable vs. No Pre-Exposure
d$conditionLearnableNoPreExp <- ifelse(d$conditionC==-0.5,-1.5,
                                    ifelse(d$conditionC==0,-0.5,d$conditionC))
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode)+(0+conditionLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode) +  
##     (0 + conditionLearnableNoPreExp | stimulus)
##    Data: subset(d, exp == "exp2" & conditionLearnableNoPreExp != -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7912.0   7938.7  -3952.0   7904.0     5898 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5150 -1.0227  0.4116  0.9217  1.4431 
## 
## Random effects:
##  Groups          Name                       Variance Std.Dev.
##  participantCode (Intercept)                0.380740 0.61704 
##  stimulus        conditionLearnableNoPreExp 0.007125 0.08441 
## Number of obs: 5902, groups:  participantCode, 164; stimulus, 36
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 0.27389    0.05571   4.916 8.82e-07 ***
## conditionLearnableNoPreExp  0.13751    0.11189   1.229    0.219    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE -0.003
confint(m, method="Wald")[3:4,]
##                                  2.5 %    97.5 %
## (Intercept)                 0.16470200 0.3830818
## conditionLearnableNoPreExp -0.08180022 0.3568143
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. No Pre-Exposure
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode)+(1+conditionLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionLearnableNoPreExp | stimulus)
##    Data: subset(d, exp == "exp2" & conditionLearnableNoPreExp != -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   7915.6   7955.7  -3951.8   7903.6     5896 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5284 -1.0206  0.4115  0.9242  1.4803 
## 
## Random effects:
##  Groups          Name                       Variance  Std.Dev. Corr
##  participantCode (Intercept)                0.3815973 0.61774      
##  stimulus        (Intercept)                0.0008796 0.02966      
##                  conditionLearnableNoPreExp 0.0151500 0.12309  1.00
## Number of obs: 5902, groups:  participantCode, 164; stimulus, 36
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 0.27415    0.05598   4.897 9.72e-07 ***
## conditionLearnableNoPreExp  0.13800    0.11299   1.221    0.222    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE 0.014 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                  2.5 %    97.5 %
## (Intercept)                 0.16443145 0.3838737
## conditionLearnableNoPreExp -0.08345495 0.3594534
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Learnable
m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & conditionC == 0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3924.0   3942.1  -1959.0   3918.0     2983 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8814 -1.0176  0.3731  0.9146  1.5554 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.600946 0.77521 
##  stimulus        (Intercept) 0.007036 0.08388 
## Number of obs: 2986, groups:  participantCode, 83; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36246    0.09558   3.792 0.000149 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## .sig02             NA        NA
## (Intercept) 0.1751252 0.5497959
Testing against chance: No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#No Pre-Exposure
m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp2"&conditionC==0),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & conditionC == 0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3980.2   3992.1  -1988.1   3976.2     2914 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0079 -1.0357  0.4980  0.9318  1.1954 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1951   0.4417  
## Number of obs: 2916, groups:  participantCode, 81
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.19355    0.06224    3.11  0.00187 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## (Intercept) 0.07156634 0.3155389
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#No Pre-Exposure
m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&conditionC==0),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & conditionC == 0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3982.2   4000.1  -1988.1   3976.2     2913 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0079 -1.0357  0.4980  0.9318  1.1954 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1951   0.4417  
##  stimulus        (Intercept) 0.0000   0.0000  
## Number of obs: 2916, groups:  participantCode, 81; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.19355    0.06224    3.11  0.00187 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## .sig02              NA        NA
## (Intercept) 0.07156761 0.3155373
Testing against chance: Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Non-Learnable
m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp2"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & conditionC == -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3937.0   3948.9  -1966.5   3933.0     2842 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2512 -1.0420  0.8860  0.9488  1.0044 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.02864  0.1692  
## Number of obs: 2844, groups:  participantCode, 79
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.10356    0.04223   2.452   0.0142 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## (Intercept) 0.02079655 0.1863324
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#No Pre-Exposure
m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&conditionC==0),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & conditionC == 0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3982.2   4000.1  -1988.1   3976.2     2913 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0079 -1.0357  0.4980  0.9318  1.1954 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1951   0.4417  
##  stimulus        (Intercept) 0.0000   0.0000  
## Number of obs: 2916, groups:  participantCode, 81; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.19355    0.06224    3.11  0.00187 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## .sig02              NA        NA
## (Intercept) 0.07156761 0.3155373

Familiar X Trials

Condition Effect
Final Converging Model

The final model swith the maximal random effects structure that still allowed the models to converge.

Richter single-contrast approach.

#Familiar X test
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5977.9   5997.0  -2985.9   5971.9     4371 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6370 -1.0474  0.6335  0.9101  1.2752 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1683   0.4102  
## Number of obs: 4374, groups:  participantCode, 243
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.21374    0.04078   5.241 1.59e-07 ***
## conditionC   0.23421    0.09982   2.346    0.019 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.009
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## (Intercept) 0.13381332 0.2936650
## conditionC  0.03856683 0.4298617

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode),data=subset(d,exp=="exp2"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5979.8   6005.4  -2985.9   5971.8     4370 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6399 -1.0491  0.6358  0.9085  1.2729 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1682   0.4102  
## Number of obs: 4374, groups:  participantCode, 243
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.21375    0.04078   5.242 1.59e-07 ***
## conditionC              0.23405    0.09983   2.345    0.019 *  
## conditionOrthContrast2 -0.01739    0.08627  -0.202    0.840    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.009       
## cndtnOrthC2 -0.002  0.008
Maximal Random Effects Model

Note that these models do not converge (singular fit), thus the parameter estimates should be interpreted with caution.

Richter single-contrast approach.

#Familiar X test
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp2" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5983.9   6022.2  -2985.9   5971.9     4368 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6370 -1.0474  0.6335  0.9101  1.2752 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 1.683e-01 4.102e-01     
##  stimulus        (Intercept) 0.000e+00 0.000e+00     
##                  conditionC  9.816e-13 9.908e-07  NaN
## Number of obs: 4374, groups:  participantCode, 243; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.21374    0.04078   5.241 1.59e-07 ***
## conditionC   0.23421    0.09983   2.346    0.019 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.009
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## .sig02              NA        NA
## .sig03              NA        NA
## .sig04              NA        NA
## (Intercept) 0.13381304 0.2936653
## conditionC  0.03855837 0.4298705

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode)+(1+conditionC+conditionOrthContrast2|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode) +  
##     (1 + conditionC + conditionOrthContrast2 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5991.4   6055.2  -2985.7   5971.4     4364 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6593 -1.0338  0.6264  0.9200  1.2700 
## 
## Random effects:
##  Groups          Name                   Variance Std.Dev. Corr       
##  participantCode (Intercept)            0.168977 0.41107             
##  stimulus        (Intercept)            0.000000 0.00000             
##                  conditionC             0.006392 0.07995    NaN      
##                  conditionOrthContrast2 0.013478 0.11610    NaN -1.00
## Number of obs: 4374, groups:  participantCode, 243; stimulus, 18
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.21404    0.04083   5.242 1.59e-07 ***
## conditionC              0.23458    0.10171   2.306   0.0211 *  
## conditionOrthContrast2 -0.01735    0.09062  -0.191   0.8481    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.008       
## cndtnOrthC2 -0.002 -0.049
## convergence code: 0
## boundary (singular) fit: see ?isSingular
Pairwise condition comparisons: Learnable vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionC !=      0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3976.3   3994.2  -1985.1   3970.3     2913 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6929 -1.0392  0.5907  0.9135  1.3185 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1952   0.4418  
## Number of obs: 2916, groups:  participantCode, 162
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.22128    0.05171   4.280 1.87e-05 ***
## conditionC   0.23636    0.10330   2.288   0.0221 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.010
confint(m, method="Wald")[2:3,]
##                  2.5 %    97.5 %
## (Intercept) 0.11993445 0.3226191
## conditionC  0.03390341 0.4388136
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. Non-Learnable
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionC !=      0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3982.1   4018.0  -1985.0   3970.1     2910 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7313 -1.0305  0.6027  0.9196  1.3325 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr
##  participantCode (Intercept) 0.196003 0.44272      
##  stimulus        (Intercept) 0.002680 0.05177      
##                  conditionC  0.004735 0.06881  1.00
## Number of obs: 2916, groups:  participantCode, 162; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.22160    0.05319   4.166  3.1e-05 ***
## conditionC   0.23697    0.10470   2.263   0.0236 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.026 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                  2.5 %    97.5 %
## (Intercept) 0.11734423 0.3258622
## conditionC  0.03176701 0.4421646
Pairwise condition comparisons: No Pre-Exposure vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Non-Learnable vs. No Pre-Exposure
d$conditionNonLearnableNoPreExp <- ifelse(d$conditionC==0.5,1.5,
                                    ifelse(d$conditionC==0,0.5,d$conditionC))
m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionNonLearnableNoPreExp !=  
##     1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3978.9   3996.8  -1986.5   3972.9     2877 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2603 -1.0620  0.8258  0.9242  1.0339 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.04497  0.2121  
## Number of obs: 2880, groups:  participantCode, 160
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    0.14732    0.04118   3.578 0.000347 ***
## conditionNonLearnableNoPreExp  0.09535    0.08232   1.158 0.246734    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.009
confint(m, method="Wald")[2:3,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.06661052 0.2280203
## conditionNonLearnableNoPreExp -0.06599196 0.2566988
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode)+(1+conditionNonLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionNonLearnableNoPreExp | stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionNonLearnableNoPreExp !=  
##     1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3984.9   4020.7  -1986.5   3972.9     2874 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2603 -1.0620  0.8258  0.9242  1.0339 
## 
## Random effects:
##  Groups          Name                          Variance  Std.Dev.  Corr
##  participantCode (Intercept)                   4.497e-02 2.121e-01     
##  stimulus        (Intercept)                   0.000e+00 0.000e+00     
##                  conditionNonLearnableNoPreExp 8.318e-14 2.884e-07  NaN
## Number of obs: 2880, groups:  participantCode, 160; stimulus, 18
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    0.14732    0.04118   3.578 0.000347 ***
## conditionNonLearnableNoPreExp  0.09535    0.08232   1.158 0.246736    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.009
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.06661060 0.2280204
## conditionNonLearnableNoPreExp -0.06599234 0.2566987
Learnable vs. No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Learnable vs. No Pre-Exposure
d$conditionLearnableNoPreExp <- ifelse(d$conditionC==-0.5,-1.5,
                                    ifelse(d$conditionC==0,-0.5,d$conditionC))
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode)+(0+conditionLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode) +  
##     (0 + conditionLearnableNoPreExp | stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionLearnableNoPreExp !=  
##     -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3994.1   4018.1  -1993.0   3986.1     2948 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8783 -1.0341  0.5433  0.8938  1.4495 
## 
## Random effects:
##  Groups          Name                       Variance Std.Dev.
##  participantCode (Intercept)                0.29097  0.5394  
##  stimulus        conditionLearnableNoPreExp 0.02787  0.1670  
## Number of obs: 2952, groups:  participantCode, 164; stimulus, 18
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 0.27937    0.05724   4.881 1.06e-06 ***
## conditionLearnableNoPreExp  0.14039    0.12069   1.163    0.245    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE -0.002
confint(m, method="Wald")[3:4,]
##                                  2.5 %    97.5 %
## (Intercept)                 0.16719023 0.3915568
## conditionLearnableNoPreExp -0.09615829 0.3769318
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. No Pre-Exposure
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode)+(1+conditionLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionLearnableNoPreExp | stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "familiarX" & conditionLearnableNoPreExp !=  
##     -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3998.1   4034.0  -1993.0   3986.1     2946 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8783 -1.0341  0.5433  0.8938  1.4495 
## 
## Random effects:
##  Groups          Name                       Variance Std.Dev. Corr
##  participantCode (Intercept)                0.29097  0.5394       
##  stimulus        (Intercept)                0.00000  0.0000       
##                  conditionLearnableNoPreExp 0.02787  0.1670    NaN
## Number of obs: 2952, groups:  participantCode, 164; stimulus, 18
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 0.27937    0.05723   4.881 1.05e-06 ***
## conditionLearnableNoPreExp  0.14039    0.12066   1.164    0.245    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE -0.002
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                  2.5 %    97.5 %
## (Intercept)                 0.16719848 0.3915488
## conditionLearnableNoPreExp -0.09609512 0.3768695
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&condition=="Learnable Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "familiarX" & condition ==  
##     "Learnable Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1983.4   1999.3   -988.7   1977.4     1491 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1794 -1.0002  0.4687  0.8565  1.6969 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.50348  0.7096  
##  stimulus        (Intercept) 0.01017  0.1008  
## Number of obs: 1494, groups:  participantCode, 83; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36784    0.09913   3.711 0.000207 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")[3,]
##     2.5 %    97.5 % 
## 0.1735530 0.5621242
Testing against chance: No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp2"&testType=="familiarX"&condition=="No Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "familiarX" & condition ==  
##     "No Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2004.7   2015.2  -1000.3   2000.7     1456 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4595 -1.0674  0.6852  0.9015  1.0512 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1172   0.3424  
## Number of obs: 1458, groups:  participantCode, 81
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.19919    0.06564   3.035  0.00241 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")[2,]
##      2.5 %     97.5 % 
## 0.07053917 0.32783279
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&condition=="No Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "familiarX" & condition ==  
##     "No Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2006.7   2022.5  -1000.3   2000.7     1455 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4595 -1.0674  0.6852  0.9015  1.0512 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1172   0.3424  
##  stimulus        (Intercept) 0.0000   0.0000  
## Number of obs: 1458, groups:  participantCode, 81; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.19919    0.06564   3.035  0.00241 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[3,]
##      2.5 %     97.5 % 
## 0.07053982 0.32783222
Testing against chance: Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glm(isRight~1,data=subset(d,exp=="exp2"&testType=="familiarX"&condition=="Non-Learnable Pre-Exposure"),family=binomial)
summary(m)
## 
## Call:
## glm(formula = isRight ~ 1, family = binomial, data = subset(d, 
##     exp == "exp2" & testType == "familiarX" & condition == "Non-Learnable Pre-Exposure"))
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -1.220  -1.220   1.136   1.136   1.136  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.09853    0.05310   1.856   0.0635 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1967.9  on 1421  degrees of freedom
## Residual deviance: 1967.9  on 1421  degrees of freedom
## AIC: 1969.9
## 
## Number of Fisher Scoring iterations: 3
confint(m, method="Wald")
## Waiting for profiling to be done...
##        2.5 %       97.5 % 
## -0.005479146  0.202722259
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="familiarX"&condition=="Non-Learnable Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "familiarX" & condition ==  
##     "Non-Learnable Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1973.9   1989.6   -983.9   1967.9     1419 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.0505 -1.0505  0.9519  0.9519  0.9519 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0        0       
##  stimulus        (Intercept) 0        0       
## Number of obs: 1422, groups:  participantCode, 79; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.09853    0.05310   1.856   0.0635 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[3,]
##        2.5 %       97.5 % 
## -0.005544124  0.202609200

Novel X Trials

Condition Effect
Final Converging Model

The final model swith the maximal random effects structure that still allowed the models to converge.

Richter single-contrast approach.

#novel X test
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5985.5   6004.7  -2989.8   5979.5     4369 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6300 -1.0533  0.6135  0.9244  1.2478 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1799   0.4242  
## Number of obs: 4372, groups:  participantCode, 243
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.18786    0.04135   4.544 5.53e-06 ***
## conditionC   0.16734    0.10124   1.653   0.0984 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.012
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## (Intercept)  0.10682393 0.2689007
## conditionC  -0.03109545 0.3657677

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5987.5   6013.0  -2989.7   5979.5     4368 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6334 -1.0492  0.6122  0.9226  1.2451 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1798   0.4241  
## Number of obs: 4372, groups:  participantCode, 243
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.18788    0.04134   4.544 5.51e-06 ***
## conditionC              0.16709    0.10125   1.650   0.0989 .  
## conditionOrthContrast2 -0.02148    0.08750  -0.245   0.8061    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.012       
## cndtnOrthC2 -0.003  0.009
Maximal Random Effects Model

Note that these models do not converge (singular fit), thus the parameter estimates should be interpreted with caution.

Richter single-contrast approach.

#novel X test
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5991.5   6029.8  -2989.8   5979.5     4366 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6300 -1.0533  0.6135  0.9244  1.2478 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 1.799e-01 4.242e-01     
##  stimulus        (Intercept) 7.604e-48 2.758e-24     
##                  conditionC  4.796e-11 6.926e-06 1.00
## Number of obs: 4372, groups:  participantCode, 243; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.18786    0.04135   4.544 5.53e-06 ***
## conditionC   0.16734    0.10124   1.653   0.0984 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.012
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## .sig02               NA        NA
## .sig03               NA        NA
## .sig04               NA        NA
## (Intercept)  0.10682401 0.2689005
## conditionC  -0.03110048 0.3657719

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- glmer(isRight~conditionC+conditionOrthContrast2+(1|participantCode)+(1+conditionC+conditionOrthContrast2|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC + conditionOrthContrast2 + (1 | participantCode) +  
##     (1 + conditionC + conditionOrthContrast2 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   5999.4   6063.3  -2989.7   5979.4     4362 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6110 -1.0469  0.6151  0.9186  1.2489 
## 
## Random effects:
##  Groups          Name                   Variance  Std.Dev. Corr       
##  participantCode (Intercept)            1.800e-01 0.42431             
##  stimulus        (Intercept)            3.249e-05 0.00570             
##                  conditionC             4.784e-03 0.06916   1.00      
##                  conditionOrthContrast2 8.576e-04 0.02928  -1.00 -1.00
## Number of obs: 4372, groups:  participantCode, 243; stimulus, 18
## 
## Fixed effects:
##                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)             0.18795    0.04138   4.542 5.57e-06 ***
## conditionC              0.16725    0.10259   1.630    0.103    
## conditionOrthContrast2 -0.02156    0.08780  -0.246    0.806    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC
## conditionC  -0.006       
## cndtnOrthC2 -0.005 -0.003
## convergence code: 0
## boundary (singular) fit: see ?isSingular
Pairwise condition comparisons: Learnable vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & conditionC !=  
##     0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3978.1   3996.0  -1986.0   3972.1     2911 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7107 -1.0286  0.5846  0.9198  1.2856 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2208   0.4699  
## Number of obs: 2914, groups:  participantCode, 162
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.19742    0.05324   3.708 0.000209 ***
## conditionC   0.17020    0.10638   1.600 0.109609    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.014
confint(m, method="Wald")[2:3,]
##                   2.5 %    97.5 %
## (Intercept)  0.09307004 0.3017737
## conditionC  -0.03829648 0.3786892
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. Non-Learnable
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&conditionC!=0),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & conditionC !=  
##     0)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3984.1   4020.0  -1986.0   3972.1     2908 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6985 -1.0278  0.5844  0.9194  1.2875 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. Corr
##  participantCode (Intercept) 0.2209195 0.47002      
##  stimulus        (Intercept) 0.0001521 0.01233      
##                  conditionC  0.0022525 0.04746  1.00
## Number of obs: 2914, groups:  participantCode, 162; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.19747    0.05334   3.702 0.000214 ***
## conditionC   0.17028    0.10699   1.592 0.111487    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.008
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                   2.5 %    97.5 %
## (Intercept)  0.09293437 0.3020100
## conditionC  -0.03941817 0.3799848
Pairwise condition comparisons: No Pre-Exposure vs. Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Non-Learnable vs. No Pre-Exposure
d$conditionNonLearnableNoPreExp <- ifelse(d$conditionC==0.5,1.5,
                                    ifelse(d$conditionC==0,0.5,d$conditionC))
m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp2" & testType == "novelX" & conditionNonLearnableNoPreExp !=  
##     1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3977.8   3995.7  -1985.9   3971.8     2877 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.3354 -1.0475  0.8108  0.9335  1.1046 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.07499  0.2739  
## Number of obs: 2880, groups:  participantCode, 160
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                    0.13873    0.04350   3.189  0.00143 **
## conditionNonLearnableNoPreExp  0.05942    0.08696   0.683  0.49446   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.010
confint(m, method="Wald")[2:3,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.05346753 0.2239883
## conditionNonLearnableNoPreExp -0.11102859 0.2298610
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionNonLearnableNoPreExp+(1|participantCode)+(1+conditionNonLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&conditionNonLearnableNoPreExp!=1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionNonLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionNonLearnableNoPreExp | stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "novelX" & conditionNonLearnableNoPreExp !=  
##     1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3983.8   4019.6  -1985.9   3971.8     2874 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.3354 -1.0475  0.8108  0.9335  1.1046 
## 
## Random effects:
##  Groups          Name                          Variance  Std.Dev.  Corr
##  participantCode (Intercept)                   7.499e-02 2.739e-01     
##  stimulus        (Intercept)                   0.000e+00 0.000e+00     
##                  conditionNonLearnableNoPreExp 6.435e-13 8.022e-07  NaN
## Number of obs: 2880, groups:  participantCode, 160; stimulus, 18
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                    0.13873    0.04350   3.189  0.00143 **
## conditionNonLearnableNoPreExp  0.05942    0.08697   0.683  0.49447   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnNnLNPE -0.010
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                     2.5 %    97.5 %
## (Intercept)                    0.05346743 0.2239885
## conditionNonLearnableNoPreExp -0.11103239 0.2298644
Learnable vs. No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#Learnable vs. No Pre-Exposure
d$conditionLearnableNoPreExp <- ifelse(d$conditionC==-0.5,-1.5,
                                    ifelse(d$conditionC==0,-0.5,d$conditionC))
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp2" & testType == "novelX" & conditionLearnableNoPreExp !=  
##     -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4012.6   4030.6  -2003.3   4006.6     2947 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7797 -1.0416  0.5391  0.9040  1.2670 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2611   0.511   
## Number of obs: 2950, groups:  participantCode, 164
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                  0.2318     0.0554   4.184 2.86e-05 ***
## conditionLearnableNoPreExp   0.1090     0.1105   0.986    0.324    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE -0.003
confint(m, method="Wald")
##                                 2.5 %    97.5 %
## .sig01                             NA        NA
## (Intercept)                 0.1232104 0.3403638
## conditionLearnableNoPreExp -0.1076433 0.3255717
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#Learnable vs. No Pre-Exposure
m <- glmer(isRight~conditionLearnableNoPreExp+(1|participantCode)+(1+conditionLearnableNoPreExp|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&conditionLearnableNoPreExp!=-1.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionLearnableNoPreExp + (1 | participantCode) +  
##     (1 + conditionLearnableNoPreExp | stimulus)
##    Data: 
## subset(d, exp == "exp2" & testType == "novelX" & conditionLearnableNoPreExp !=  
##     -1.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4018.6   4054.5  -2003.3   4006.6     2944 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7669 -1.0416  0.5390  0.9039  1.2767 
## 
## Random effects:
##  Groups          Name                       Variance Std.Dev. Corr
##  participantCode (Intercept)                0.261329 0.51120      
##  stimulus        (Intercept)                0.000271 0.01646      
##                  conditionLearnableNoPreExp 0.002611 0.05110  1.00
## Number of obs: 2950, groups:  participantCode, 164; stimulus, 18
## 
## Fixed effects:
##                            Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 0.23186    0.05555   4.174    3e-05 ***
## conditionLearnableNoPreExp  0.10908    0.11121   0.981    0.327    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## cndtnLrnNPE 0.004 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                                 2.5 %   97.5 %
## (Intercept)                 0.1229754 0.340737
## conditionLearnableNoPreExp -0.1088836 0.327037
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&condition=="Learnable Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & condition ==  
##     "Learnable Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1999.2   2015.1   -996.6   1993.2     1489 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0315 -1.0447  0.4406  0.8819  1.4071 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.459444 0.67782 
##  stimulus        (Intercept) 0.001974 0.04443 
## Number of obs: 1492, groups:  participantCode, 83; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.30295    0.09367   3.234  0.00122 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")[3,]
##     2.5 %    97.5 % 
## 0.1193661 0.4865296
Testing against chance: No Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"&condition=="No Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & condition ==  
##     "No Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2009.4   2020.0  -1002.7   2005.4     1456 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4130 -1.0596  0.7077  0.9109  1.0877 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1042   0.3227  
## Number of obs: 1458, groups:  participantCode, 81
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.16987    0.06424   2.644  0.00818 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")[2,]
##      2.5 %     97.5 % 
## 0.04396547 0.29578076
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&condition=="No Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & condition ==  
##     "No Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2011.4   2027.3  -1002.7   2005.4     1455 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4130 -1.0596  0.7077  0.9109  1.0877 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. 
##  participantCode (Intercept) 1.042e-01 0.3227442
##  stimulus        (Intercept) 4.000e-14 0.0000002
## Number of obs: 1458, groups:  participantCode, 81; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  0.16987    0.06424   2.644  0.00818 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[3,]
##      2.5 %     97.5 % 
## 0.04396522 0.29578106
Testing against chance: Non-Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp2"&testType=="novelX"&condition=="Non-Learnable Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & condition ==  
##     "Non-Learnable Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1969.7   1980.2   -982.9   1965.7     1420 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2242 -1.0456  0.8667  0.9378  1.0552 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.04776  0.2185  
## Number of obs: 1422, groups:  participantCode, 79
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.10830    0.05883   1.841   0.0656 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## (Intercept) -0.00700433 0.2235945
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp2"&testType=="novelX"&condition=="Non-Learnable Pre-Exposure"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp2" & testType == "novelX" & condition ==  
##     "Non-Learnable Pre-Exposure")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1971.7   1987.5   -982.9   1965.7     1419 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2242 -1.0456  0.8667  0.9378  1.0552 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. 
##  participantCode (Intercept) 4.776e-02 2.185e-01
##  stimulus        (Intercept) 2.467e-14 1.571e-07
## Number of obs: 1422, groups:  participantCode, 79; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.10830    0.05883   1.841   0.0656 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[3,]
##        2.5 %       97.5 % 
## -0.007004624  0.223595045

Interaction between test type and condition

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#recode test type
d$testTypeC <- ifelse(d$testType=="novelX",0.5,
                    ifelse(d$testType=="familiarX",-0.5,NA))
##all data
m <- glmer(isRight~conditionC*testTypeC+(1|participantCode),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC * testTypeC + (1 | participantCode)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11876.0  11911.4  -5933.0  11866.0     8741 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2135 -1.0274  0.4906  0.9289  1.3629 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2358   0.4856  
## Number of obs: 8746, groups:  participantCode, 243
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.21043    0.03831   5.493 3.94e-08 ***
## conditionC            0.21653    0.09373   2.310   0.0209 *  
## testTypeC            -0.02662    0.04404  -0.604   0.5455    
## conditionC:testTypeC -0.06837    0.10798  -0.633   0.5266    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC  -0.008              
## testTypeC   -0.001 -0.001       
## cndtnC:tsTC -0.001 -0.001  0.000
confint(m, method="Wald")
##                            2.5 %    97.5 %
## .sig01                        NA        NA
## (Intercept)           0.13534795 0.2855030
## conditionC            0.03283099 0.4002266
## testTypeC            -0.11292590 0.0596914
## conditionC:testTypeC -0.28001687 0.1432687
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
m <- glmer(isRight~conditionC*testTypeC+(1+testTypeC|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp2"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC * testTypeC + (1 + testTypeC | participantCode) +  
##     (1 + conditionC | stimulus)
##    Data: subset(d, exp == "exp2")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11886.0  11956.7  -5933.0  11866.0     8736 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1980 -1.0278  0.4873  0.9287  1.3661 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 2.358e-01 4.856e-01     
##                  testTypeC   1.253e-04 1.119e-02 1.00
##  stimulus        (Intercept) 0.000e+00 0.000e+00     
##                  conditionC  1.663e-11 4.079e-06  NaN
## Number of obs: 8746, groups:  participantCode, 243; stimulus, 36
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.21041    0.03831   5.493 3.95e-08 ***
## conditionC            0.21650    0.09373   2.310   0.0209 *  
## testTypeC            -0.02562    0.04436  -0.578   0.5635    
## conditionC:testTypeC -0.06697    0.10828  -0.619   0.5362    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC  -0.008              
## testTypeC    0.013 -0.001       
## cndtnC:tsTC -0.001  0.013  0.008
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[7:10,]
##                            2.5 %     97.5 %
## (Intercept)           0.13533088 0.28548410
## conditionC            0.03278973 0.40020560
## testTypeC            -0.11257745 0.06132889
## conditionC:testTypeC -0.27918889 0.14524766

Signal Detection Analysis

Sensitivity

Overall

Richter single-contrast approach.

#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_overall$condition=="Non-Learnable Pre-Exposure",-0.5,
                           ifelse(subj_overall$condition=="No Pre-Exposure",0,NA)))
subj_overall$conditionOrthContrast2 <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",-1/3,
                                ifelse(subj_overall$condition=="Non-Learnable Pre-Exposure",-1/3,
                                       ifelse(subj_overall$condition=="No Pre-Exposure",2/3,NA)))

#overall analysis (Richter single-contrast apporach)
m <- lm(dprime~conditionC,data=subset(subj_overall,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_overall, 
##     exp == "exp2"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8479 -0.4792 -0.1865  0.1336  3.5085 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.32047    0.05898   5.433 1.35e-07 ***
## conditionC   0.34656    0.14448   2.399   0.0172 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9193 on 241 degrees of freedom
## Multiple R-squared:  0.02332,    Adjusted R-squared:  0.01926 
## F-statistic: 5.754 on 1 and 241 DF,  p-value: 0.01722

Abelson & Prentice approach.

##check same analysis with Abelson & Prentice approach
m <- lm(dprime~conditionC+conditionOrthContrast2,data=subset(subj_overall,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC + conditionOrthContrast2, data = subset(subj_overall, 
##     exp == "exp2"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8619 -0.4670 -0.2005  0.1346  3.5373 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             0.32048    0.05909   5.423 1.43e-07 ***
## conditionC              0.34585    0.14476   2.389   0.0177 *  
## conditionOrthContrast2 -0.04310    0.12534  -0.344   0.7312    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.921 on 240 degrees of freedom
## Multiple R-squared:  0.0238, Adjusted R-squared:  0.01566 
## F-statistic: 2.925 on 2 and 240 DF,  p-value: 0.05556
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8619 -0.6489 -0.3325 -0.0675  3.3212 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.5078     0.1285   3.951 0.000164 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.171 on 82 degrees of freedom
Testing against chance: No Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1532 -0.4403 -0.2917  0.1390  3.5373 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.29174    0.09989   2.921  0.00454 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8991 on 80 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7869 -0.3238 -0.1619  0.2160  2.9732 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.16192    0.06558   2.469   0.0157 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5829 on 78 degrees of freedom
Pairwise condition comparisons

Pairwise comparison between conditions.

Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(dprime~conditionC,data=subset(subj_overall,exp=="exp2"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_overall, 
##     exp == "exp2" & conditionC != 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8619 -0.5048 -0.1812  0.1203  3.3212 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.33485    0.07323   4.573 9.59e-06 ***
## conditionC   0.34585    0.14645   2.362   0.0194 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9317 on 160 degrees of freedom
## Multiple R-squared:  0.03368,    Adjusted R-squared:  0.02764 
## F-statistic: 5.577 on 1 and 160 DF,  p-value: 0.0194

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_overall$conditionNonLearnableNoPreExp <- ifelse(subj_overall$conditionC==0.5,1.5,
                                    ifelse(subj_overall$conditionC==0,0.5,subj_overall$conditionC))

m <- lm(dprime~conditionNonLearnableNoPreExp,data=subset(subj_overall,exp=="exp2"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionNonLearnableNoPreExp, data = subset(subj_overall, 
##     exp == "exp2" & conditionNonLearnableNoPreExp != 1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1532 -0.4358 -0.1619  0.1580  3.5373 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    0.22683    0.06006   3.777 0.000224 ***
## conditionNonLearnableNoPreExp  0.12982    0.12011   1.081 0.281417    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7596 on 158 degrees of freedom
## Multiple R-squared:  0.007339,   Adjusted R-squared:  0.001057 
## F-statistic: 1.168 on 1 and 158 DF,  p-value: 0.2814

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_overall$conditionLearnableNoPreExp <- ifelse(subj_overall$conditionC==-0.5,-1.5,
                                    ifelse(subj_overall$conditionC==0,-0.5,subj_overall$conditionC))
m <- lm(dprime~conditionLearnableNoPreExp,data=subset(subj_overall,exp=="exp2"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionLearnableNoPreExp, data = subset(subj_overall, 
##     exp == "exp2" & conditionLearnableNoPreExp != -1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8619 -0.5078 -0.2917  0.1302  3.5373 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 0.39976    0.08164   4.896 2.34e-06 ***
## conditionLearnableNoPreExp  0.21603    0.16329   1.323    0.188    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.045 on 162 degrees of freedom
## Multiple R-squared:  0.01069,    Adjusted R-squared:  0.004582 
## F-statistic:  1.75 on 1 and 162 DF,  p-value: 0.1877

Testing against chance: Learnable Pre-Exposure

#Learnable
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8619 -0.6489 -0.3325 -0.0675  3.3212 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.5078     0.1285   3.951 0.000164 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.171 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1532 -0.4403 -0.2917  0.1390  3.5373 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.29174    0.09989   2.921  0.00454 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8991 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(dprime~1,data=subset(subj_overall,exp=="exp2"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7869 -0.3238 -0.1619  0.2160  2.9732 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.16192    0.06558   2.469   0.0157 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5829 on 78 degrees of freedom
Familiar X Trials

Condition Effect

subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-0.5,
                           ifelse(subj_testType$condition=="No Pre-Exposure",0,NA)))
subj_testType$conditionOrthContrast2 <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",-1/3,
                                ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-1/3,
                                       ifelse(subj_testType$condition=="No Pre-Exposure",2/3,NA)))


#Familiar X test
#overall analysis (Richter single-contrast apporach)
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9241 -0.5875 -0.1333  0.3226  2.8784 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.30809    0.05993   5.141 5.66e-07 ***
## conditionC   0.34950    0.14680   2.381   0.0181 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.934 on 241 degrees of freedom
## Multiple R-squared:  0.02298,    Adjusted R-squared:  0.01893 
## F-statistic: 5.668 on 1 and 241 DF,  p-value: 0.01805
##check same analysis with Abelson & Prentice approach
m <- lm(dprime~conditionC+conditionOrthContrast2,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC + conditionOrthContrast2, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9283 -0.5789 -0.1377  0.3255  2.8869 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             0.30809    0.06005   5.130 5.97e-07 ***
## conditionC              0.34929    0.14712   2.374   0.0184 *  
## conditionOrthContrast2 -0.01288    0.12738  -0.101   0.9196    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.936 on 240 degrees of freedom
## Multiple R-squared:  0.02302,    Adjusted R-squared:  0.01488 
## F-statistic: 2.828 on 2 and 240 DF,  p-value: 0.06113

Pairwise comparisons: Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX" & conditionC != 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9283 -0.4870 -0.1377  0.3415  2.6994 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.31238    0.07502   4.164  5.1e-05 ***
## conditionC   0.34929    0.15004   2.328   0.0212 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9546 on 160 degrees of freedom
## Multiple R-squared:  0.03276,    Adjusted R-squared:  0.02672 
## F-statistic: 5.419 on 1 and 160 DF,  p-value: 0.02117

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_testType$conditionNonLearnableNoPreExp <- ifelse(subj_testType$conditionC==0.5,1.5,
                                    ifelse(subj_testType$conditionC==0,0.5,subj_testType$conditionC))

m <- lm(dprime~conditionNonLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionNonLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX" & conditionNonLearnableNoPreExp != 
##         1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3804 -0.4395 -0.1377  0.3200  2.8869 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    0.21862    0.06352   3.442  0.00074 ***
## conditionNonLearnableNoPreExp  0.16177    0.12704   1.273  0.20475    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8034 on 158 degrees of freedom
## Multiple R-squared:  0.01016,    Adjusted R-squared:  0.003894 
## F-statistic: 1.622 on 1 and 158 DF,  p-value: 0.2048

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_testType$conditionLearnableNoPreExp <- ifelse(subj_testType$conditionC==-0.5,-1.5,
                                    ifelse(subj_testType$conditionC==0,-0.5,subj_testType$conditionC))
m <- lm(dprime~conditionLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX" & conditionLearnableNoPreExp != 
##         -1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9283 -0.6335 -0.2478  0.3295  2.8869 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 0.39327    0.08064   4.877 2.55e-06 ***
## conditionLearnableNoPreExp  0.18752    0.16127   1.163    0.247    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.033 on 162 degrees of freedom
## Multiple R-squared:  0.008277,   Adjusted R-squared:  0.002155 
## F-statistic: 1.352 on 1 and 162 DF,  p-value: 0.2466

Testing against chance: Learnable Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9283 -0.7781 -0.1960  0.3415  2.6994 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.4870     0.1261   3.861 0.000224 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.149 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "familiarX" & conditionC == 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3804 -0.5905 -0.2995  0.3255  2.8869 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.29951    0.09973   3.003  0.00357 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8976 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3332 -0.4288 -0.1377  0.3182  2.6761 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.13774    0.07804   1.765   0.0815 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6936 on 78 degrees of freedom
Novel X Trials

Condition Effect

subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-0.5,
                           ifelse(subj_testType$condition=="No Pre-Exposure",0,NA)))
subj_testType$conditionOrthContrast2 <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",-1/3,
                                ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-1/3,
                                       ifelse(subj_testType$condition=="No Pre-Exposure",2/3,NA)))


#Novel X test
#overall analysis (Richter single-contrast apporach)
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1235 -0.4654 -0.1111  0.2987  2.9147 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.27170    0.05882    4.62 6.27e-06 ***
## conditionC   0.23767    0.14407    1.65      0.1    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9167 on 241 degrees of freedom
## Multiple R-squared:  0.01117,    Adjusted R-squared:  0.007063 
## F-statistic: 2.721 on 1 and 241 DF,  p-value: 0.1003
##check same analysis with Abelson & Prentice approach
m <- lm(dprime~conditionC+conditionOrthContrast2,data=subset(subj_testType,exp=="exp2"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC + conditionOrthContrast2, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1357 -0.4782 -0.1233  0.2902  2.9398 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             0.27171    0.05893   4.611 6.52e-06 ***
## conditionC              0.23705    0.14436   1.642    0.102    
## conditionOrthContrast2 -0.03756    0.12499  -0.301    0.764    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9184 on 240 degrees of freedom
## Multiple R-squared:  0.01154,    Adjusted R-squared:  0.003301 
## F-statistic: 1.401 on 2 and 240 DF,  p-value: 0.2484

Pairwise comparisons: Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX" & conditionC != 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1357 -0.4889 -0.1233  0.3761  2.7837 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.28423    0.07475   3.802 0.000204 ***
## conditionC   0.23705    0.14951   1.586 0.114827    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9512 on 160 degrees of freedom
## Multiple R-squared:  0.01547,    Adjusted R-squared:  0.009315 
## F-statistic: 2.514 on 1 and 160 DF,  p-value: 0.1148

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_testType$conditionNonLearnableNoPreExp <- ifelse(subj_testType$conditionC==0.5,1.5,
                                    ifelse(subj_testType$conditionC==0,0.5,subj_testType$conditionC))

m <- lm(dprime~conditionNonLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionNonLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX" & conditionNonLearnableNoPreExp != 
##         1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8171 -0.4567 -0.1657  0.3238  2.9398 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                    0.20618    0.06324    3.26  0.00136 **
## conditionNonLearnableNoPreExp  0.08096    0.12648    0.64  0.52302   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7998 on 158 degrees of freedom
## Multiple R-squared:  0.002587,   Adjusted R-squared:  -0.003726 
## F-statistic: 0.4098 on 1 and 158 DF,  p-value: 0.523

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_testType$conditionLearnableNoPreExp <- ifelse(subj_testType$conditionC==-0.5,-1.5,
                                    ifelse(subj_testType$conditionC==0,-0.5,subj_testType$conditionC))
m <- lm(dprime~conditionLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX" & conditionLearnableNoPreExp != 
##         -1.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1357 -0.5290 -0.1233  0.1781  2.9398 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 0.32471    0.07737   4.197 4.45e-05 ***
## conditionLearnableNoPreExp  0.15609    0.15474   1.009    0.315    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9907 on 162 degrees of freedom
## Multiple R-squared:  0.006242,   Adjusted R-squared:  0.0001073 
## F-statistic: 1.017 on 1 and 162 DF,  p-value: 0.3146

Testing against chance: Learnable Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1357 -0.6938 -0.1233  0.1950  2.7837 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   0.4028     0.1220     3.3  0.00143 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.112 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "novelX" & conditionC == 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4421 -0.2467 -0.2467  0.1259  2.9398 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.24666    0.09434   2.615   0.0107 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.849 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(dprime~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp2" & testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8171 -0.4567  0.1137  0.4047  2.6482 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.16570    0.08394   1.974   0.0519 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7461 on 78 degrees of freedom
Interaction between Novel X and Familiar X trials
#recode test type
subj_testType$testTypeC <- ifelse(subj_testType$testType=="novelX",0.5,
                    ifelse(subj_testType$testType=="familiarX",-0.5,NA))
m <- lm(dprime~conditionC*testTypeC,data=subset(subj_testType,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC * testTypeC, data = subset(subj_testType, 
##     exp == "exp2"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9241 -0.5011 -0.1333  0.3061  2.9147 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           0.28990    0.04199   6.905 1.59e-11 ***
## conditionC            0.29359    0.10284   2.855  0.00449 ** 
## testTypeC            -0.03639    0.08397  -0.433  0.66494    
## conditionC:testTypeC -0.11184    0.20568  -0.544  0.58688    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9254 on 482 degrees of freedom
## Multiple R-squared:  0.01761,    Adjusted R-squared:  0.0115 
## F-statistic: 2.881 on 3 and 482 DF,  p-value: 0.03551

Response Bias

Overall

Unlike with the sensitivty/ accuracy measures, we had no specific hypothesis (linear or otherwise) with respect to response bias. Hence, we test for an overall effect of condition (multi-df, omnibus effect) with condition dummy-coded.

subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Non-Learnable Pre-Exposure",-0.5,
                           ifelse(subj_testType$condition=="No Pre-Exposure",0,NA)))

#overall analysis (condition dummy-coded)
m <- lm(c~condition,data=subset(subj_overall,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = c ~ condition, data = subset(subj_overall, exp == 
##     "exp2"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.63271 -0.16921  0.05426  0.20904  1.02369 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)                         -0.19537    0.04429  -4.411 1.55e-05
## conditionNo Pre-Exposure            -0.08643    0.06302  -1.371   0.1715
## conditionNon-Learnable Pre-Exposure -0.10824    0.06342  -1.707   0.0892
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure               
## conditionNon-Learnable Pre-Exposure .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4035 on 240 degrees of freedom
## Multiple R-squared:  0.01352,    Adjusted R-squared:  0.005295 
## F-statistic: 1.644 on 2 and 240 DF,  p-value: 0.1954
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: c
##             Sum Sq  Df F value    Pr(>F)    
## (Intercept)  3.168   1 19.4595 1.552e-05 ***
## condition    0.535   2  1.6441    0.1954    
## Residuals   39.073 240                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There is no significant overall effect of condition on response bias c - indicating that response bias does not differ overall across conditions.

Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.02527 -0.16921  0.05426  0.19537  1.01152 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.19537    0.03824  -5.108 2.08e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3484 on 82 degrees of freedom
Testing against chance: No Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.63271 -0.20191 -0.00042  0.28180  1.02369 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.28180    0.05338  -5.279 1.09e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4804 on 80 degrees of freedom
Testing against chance: Non-Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61089 -0.14041  0.08825  0.22831  0.66820 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.30361    0.04158  -7.301 2.09e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3696 on 78 degrees of freedom
Pairwise condition comparisons

Pairwise comparison between conditions.

Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(c~conditionC,data=subset(subj_overall,exp=="exp2"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_overall, exp == 
##     "exp2" & conditionC != 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61089 -0.16718  0.05496  0.19537  1.01152 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.24949    0.02821  -8.845  1.6e-15 ***
## conditionC   0.10824    0.05641   1.919   0.0568 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3589 on 160 degrees of freedom
## Multiple R-squared:  0.02249,    Adjusted R-squared:  0.01638 
## F-statistic: 3.682 on 1 and 160 DF,  p-value: 0.0568

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_overall$conditionNonLearnableNoPreExp <- ifelse(subj_overall$conditionC==0.5,1.5,
                                    ifelse(subj_overall$conditionC==0,0.5,subj_overall$conditionC))

m <- lm(c~conditionNonLearnableNoPreExp,data=subset(subj_overall,exp=="exp2"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionNonLearnableNoPreExp, data = subset(subj_overall, 
##     exp == "exp2" & conditionNonLearnableNoPreExp != 1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.63271 -0.16055  0.01839  0.23236  1.02369 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   -0.29271    0.03394  -8.624 6.44e-15 ***
## conditionNonLearnableNoPreExp  0.02182    0.06788   0.321    0.748    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4293 on 158 degrees of freedom
## Multiple R-squared:  0.0006532,  Adjusted R-squared:  -0.005672 
## F-statistic: 0.1033 on 1 and 158 DF,  p-value: 0.7484

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_overall$conditionLearnableNoPreExp <- ifelse(subj_overall$conditionC==-0.5,-1.5,
                                    ifelse(subj_overall$conditionC==0,-0.5,subj_overall$conditionC))
m <- lm(c~conditionLearnableNoPreExp,data=subset(subj_overall,exp=="exp2"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionLearnableNoPreExp, data = subset(subj_overall, 
##     exp == "exp2" & conditionLearnableNoPreExp != -1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.63271 -0.16921  0.05426  0.20754  1.02369 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                -0.23858    0.03271  -7.294 1.26e-11 ***
## conditionLearnableNoPreExp  0.08643    0.06542   1.321    0.188    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4188 on 162 degrees of freedom
## Multiple R-squared:  0.01066,    Adjusted R-squared:  0.004553 
## F-statistic: 1.746 on 1 and 162 DF,  p-value: 0.1883

Testing against chance: Learnable Pre-Exposure

#Learnable
m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.02527 -0.16921  0.05426  0.19537  1.01152 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.19537    0.03824  -5.108 2.08e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3484 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.63271 -0.20191 -0.00042  0.28180  1.02369 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.28180    0.05338  -5.279 1.09e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4804 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(c~1,data=subset(subj_overall,exp=="exp2"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp2" & 
##     conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61089 -0.14041  0.08825  0.22831  0.66820 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.30361    0.04158  -7.301 2.09e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3696 on 78 degrees of freedom
Familiar X Trials

Condition Effect

#overall analysis (condition dummy-coded)
m <- lm(c~condition,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = c ~ condition, data = subset(subj_testType, exp == 
##     "exp2" & testType == "familiarX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.18484 -0.25249  0.09588  0.33304  1.09775 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)                         -0.40838    0.05008  -8.154 1.96e-14
## conditionNo Pre-Exposure            -0.23716    0.07127  -3.328  0.00101
## conditionNon-Learnable Pre-Exposure -0.16481    0.07172  -2.298  0.02243
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4563 on 240 degrees of freedom
## Multiple R-squared:  0.04632,    Adjusted R-squared:  0.03837 
## F-statistic: 5.828 on 2 and 240 DF,  p-value: 0.003376
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: c
##             Sum Sq  Df F value    Pr(>F)    
## (Intercept) 13.842   1 66.4859 1.964e-14 ***
## condition    2.427   2  5.8281  0.003376 ** 
## Residuals   49.968 240                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Response bias differs across conditions.

Pairwise comparisons: Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp2" & testType == "familiarX" & conditionC != 0))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1848 -0.2372  0.1232  0.2880  0.8226 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.49079    0.03425 -14.328   <2e-16 ***
## conditionC   0.16481    0.06851   2.406   0.0173 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4359 on 160 degrees of freedom
## Multiple R-squared:  0.03491,    Adjusted R-squared:  0.02888 
## F-statistic: 5.787 on 1 and 160 DF,  p-value: 0.01728

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_testType$conditionNonLearnableNoPreExp <- ifelse(subj_testType$conditionC==0.5,1.5,
                                    ifelse(subj_testType$conditionC==0,0.5,subj_testType$conditionC))

m <- lm(c~conditionNonLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionNonLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX" & conditionNonLearnableNoPreExp != 
##         1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.02003 -0.25249  0.07645  0.36032  1.09775 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   -0.60937    0.03793 -16.067   <2e-16 ***
## conditionNonLearnableNoPreExp -0.07235    0.07585  -0.954    0.342    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4797 on 158 degrees of freedom
## Multiple R-squared:  0.005724,   Adjusted R-squared:  -0.0005685 
## F-statistic: 0.9097 on 1 and 158 DF,  p-value: 0.3417

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_testType$conditionLearnableNoPreExp <- ifelse(subj_testType$conditionC==-0.5,-1.5,
                                    ifelse(subj_testType$conditionC==0,-0.5,subj_testType$conditionC))
m <- lm(c~conditionLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "familiarX" & conditionLearnableNoPreExp != 
##         -1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.18484 -0.19723  0.04782  0.36032  1.09775 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                -0.52696    0.03534 -14.909  < 2e-16 ***
## conditionLearnableNoPreExp  0.23716    0.07069   3.355 0.000989 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4526 on 162 degrees of freedom
## Multiple R-squared:  0.06497,    Adjusted R-squared:  0.05919 
## F-statistic: 11.26 on 1 and 162 DF,  p-value: 0.0009888

Testing against chance: Learnable Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.18484 -0.18934  0.09588  0.26287  0.82264 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.40838    0.04472  -9.132 3.93e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4074 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "familiarX" & conditionC == 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.94768 -0.34714  0.04782  0.36032  1.09775 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.64554    0.05496  -11.75   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4946 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.0200 -0.2525  0.1425  0.2880  0.7595 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.57319    0.05219  -10.98   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4639 on 78 degrees of freedom
Novel X Trials

Condition Effect

#overall analysis (condition dummy-coded)
m <- lm(c~condition,data=subset(subj_testType,exp=="exp2"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = c ~ condition, data = subset(subj_testType, exp == 
##     "exp2" & testType == "novelX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67979 -0.27658 -0.08657  0.19622  1.64149 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)
## (Intercept)                          0.003716   0.065549   0.057    0.955
## conditionNo Pre-Exposure             0.082851   0.093270   0.888    0.375
## conditionNon-Learnable Pre-Exposure -0.051984   0.093866  -0.554    0.580
## 
## Residual standard error: 0.5972 on 240 degrees of freedom
## Multiple R-squared:  0.00859,    Adjusted R-squared:  0.0003284 
## F-statistic:  1.04 on 2 and 240 DF,  p-value: 0.3551
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: c
##             Sum Sq  Df F value Pr(>F)
## (Intercept)  0.001   1  0.0032 0.9548
## condition    0.742   2  1.0397 0.3551
## Residuals   85.588 240

Pairwise comparisons: Learnable Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#compare conditions
#Learnable vs. Non-Learnable
m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC!=0))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp2" & testType == "novelX" & conditionC != 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.54495 -0.23695 -0.00372  0.19378  1.64149 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.02228    0.03956  -0.563    0.574
## conditionC   0.05198    0.07912   0.657    0.512
## 
## Residual standard error: 0.5034 on 160 degrees of freedom
## Multiple R-squared:  0.002691,   Adjusted R-squared:  -0.003543 
## F-statistic: 0.4316 on 1 and 160 DF,  p-value: 0.5121

No Pre-Exposure vs. Non-Learnable Pre-Exposure Condition

#Non-Learnable vs. No Pre-Exposure
subj_testType$conditionNonLearnableNoPreExp <- ifelse(subj_testType$conditionC==0.5,1.5,
                                    ifelse(subj_testType$conditionC==0,0.5,subj_testType$conditionC))

m <- lm(c~conditionNonLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionNonLearnableNoPreExp!=1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionNonLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX" & conditionNonLearnableNoPreExp != 
##         1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67979 -0.28484 -0.08657  0.19378  1.64149 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)
## (Intercept)                    0.01915    0.05076   0.377    0.707
## conditionNonLearnableNoPreExp  0.13484    0.10152   1.328    0.186
## 
## Residual standard error: 0.642 on 158 degrees of freedom
## Multiple R-squared:  0.01104,    Adjusted R-squared:  0.004782 
## F-statistic: 1.764 on 1 and 158 DF,  p-value: 0.186

Learnable Pre-Exposure vs. No Pre-Exposure Condition

#No Pre-Exposure vs. Learnable
subj_testType$conditionLearnableNoPreExp <- ifelse(subj_testType$conditionC==-0.5,-1.5,
                                    ifelse(subj_testType$conditionC==0,-0.5,subj_testType$conditionC))
m <- lm(c~conditionLearnableNoPreExp,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionLearnableNoPreExp!=-1.5))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionLearnableNoPreExp, data = subset(subj_testType, 
##     exp == "exp2" & testType == "novelX" & conditionLearnableNoPreExp != 
##         -1.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67979 -0.33011 -0.08657  0.20505  1.58950 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)
## (Intercept)                 0.04514    0.04966   0.909    0.365
## conditionLearnableNoPreExp -0.08285    0.09932  -0.834    0.405
## 
## Residual standard error: 0.6359 on 162 degrees of freedom
## Multiple R-squared:  0.004277,   Adjusted R-squared:  -0.001869 
## F-statistic: 0.6959 on 1 and 162 DF,  p-value: 0.4054

Testing against chance: Learnable Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.41065 -0.23947 -0.00372  0.22923  1.58950 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003716   0.054831   0.068    0.946
## 
## Residual standard error: 0.4995 on 82 degrees of freedom

Testing against chance: No Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==0))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "novelX" & conditionC == 0))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67979 -0.37178 -0.08657  0.19865  1.50665 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)  0.08657    0.08337   1.038    0.302
## 
## Residual standard error: 0.7504 on 80 degrees of freedom

Testing against chance: Non-Learnable Pre-Exposure

m <- lm(c~1,data=subset(subj_testType,exp=="exp2"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp2" & 
##     testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.54495 -0.23695 -0.09144  0.19088  1.64149 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.04827    0.05709  -0.846      0.4
## 
## Residual standard error: 0.5074 on 78 degrees of freedom
Interaction between Novel X and Familiar X trials
#recode test type
subj_testType$testTypeC <- ifelse(subj_testType$testType=="novelX",0.5,
                    ifelse(subj_testType$testType=="familiarX",-0.5,NA))
m <- lm(c~condition*testTypeC,data=subset(subj_testType,exp=="exp2"))
summary(m)
## 
## Call:
## lm(formula = c ~ condition * testTypeC, data = subset(subj_testType, 
##     exp == "exp2"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67979 -0.26156 -0.00372  0.28150  1.64149 
## 
## Coefficients:
##                                               Estimate Std. Error t value
## (Intercept)                                   -0.20233    0.04125  -4.905
## conditionNo Pre-Exposure                      -0.07715    0.05869  -1.315
## conditionNon-Learnable Pre-Exposure           -0.10840    0.05906  -1.835
## testTypeC                                      0.41210    0.08249   4.996
## conditionNo Pre-Exposure:testTypeC             0.32001    0.11738   2.726
## conditionNon-Learnable Pre-Exposure:testTypeC  0.11283    0.11813   0.955
##                                               Pr(>|t|)    
## (Intercept)                                   1.28e-06 ***
## conditionNo Pre-Exposure                       0.18928    
## conditionNon-Learnable Pre-Exposure            0.06709 .  
## testTypeC                                     8.23e-07 ***
## conditionNo Pre-Exposure:testTypeC             0.00664 ** 
## conditionNon-Learnable Pre-Exposure:testTypeC  0.34000    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5314 on 480 degrees of freedom
## Multiple R-squared:  0.2307, Adjusted R-squared:  0.2227 
## F-statistic: 28.79 on 5 and 480 DF,  p-value: < 2.2e-16
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: c
##                      Sum Sq  Df F value    Pr(>F)    
## (Intercept)           6.796   1 24.0638 1.278e-06 ***
## condition             1.015   2  1.7969   0.16693    
## testTypeC             7.048   1 24.9557 8.230e-07 ***
## condition:testTypeC   2.154   2  3.8127   0.02276 *  
## Residuals           135.557 480                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Experiment 3

Test Accuracy

Plot

#Familiar X test
p1 <- ggplot(subset(test_type_exp,testType=="familiarX"&exp=="exp3"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="familiarX"&exp=="exp3"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=16)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Unstructured Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Unstructured\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#4DAF4A","#54278f"))+
  scale_color_manual(values=c("#4DAF4A","#54278f"))+
  theme(legend.position="none")+
  ylab("Accuracy - Familiar X Test")+
  xlab("Condition")

#Novel X
p2 <- ggplot(subset(test_type_exp,testType=="novelX"&exp=="exp3"),aes(condition,accuracy,fill=condition,color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="novelX"&exp=="exp3"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=16)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Unstructured Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Unstructured\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#4DAF4A","#54278f"))+
  scale_color_manual(values=c("#4DAF4A","#54278f"))+
  theme(legend.position="none")+
  ylab("Accuracy - Novel X Test")+
  xlab("Condition")
plot_grid(p1,p2, labels=c("A","B"),label_size=18)

Overall Accuracy Table

overall_exp %>%
  filter(exp=="exp3") %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp3 Learnable Pre-Exposure 90 0.6157407 0.5761732 0.6553082 0.7932834 0.5051798 1.0813870 -0.1471900 -0.2255496 -0.06883044
exp3 Unstructured Pre-Exposure 89 0.5355805 0.5085204 0.5626406 0.2401722 0.0604255 0.4199189 -0.1638137 -0.2497717 -0.07785573

Accuracy Table By Test Type

test_type_exp %>%
  filter(exp=="exp3") %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
exp condition testType N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
exp3 Learnable Pre-Exposure familiarX 90 0.6197531 0.5787377 0.6607685 0.7360229 0.48172951 0.9903163 -0.3575601 -0.45300126 -0.2621189
exp3 Learnable Pre-Exposure novelX 90 0.6117284 0.5682435 0.6552133 0.6917028 0.41857251 0.9648331 0.0653921 -0.04610090 0.1768851
exp3 Unstructured Pre-Exposure familiarX 89 0.5380774 0.5053266 0.5708282 0.2373254 0.03843109 0.4362197 -0.4554699 -0.55536408 -0.3555757
exp3 Unstructured Pre-Exposure novelX 89 0.5330836 0.5043785 0.5617888 0.2000827 0.02878172 0.3713837 0.1334533 -0.01092315 0.2778297

Correlation

Correlation between Familiar X and Novel X Trials
Learnable Pre-Exposure
##Correlations between Familiar X and Novel X
c <- corr.test(subset(subj_accuracy_wide, condition=="Learnable Pre-Exposure" & exp=="exp3")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Learnable Pre-Exposure" & 
##     exp == "exp3")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.75
## familiarX   0.75      1.00
## Sample Size 
## [1] 90
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                 novelX    familiarX
## novelX    0.000000e+00 9.870517e-18
## familiarX 9.870517e-18 0.000000e+00
Unstructured Pre-Exposure
c <- corr.test(subset(subj_accuracy_wide, condition=="Unstructured Pre-Exposure" & exp=="exp3")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, condition == "Unstructured Pre-Exposure" & 
##     exp == "exp3")[, c("novelX", "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX      1.00      0.55
## familiarX   0.55      1.00
## Sample Size 
## [1] 89
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                 novelX    familiarX
## novelX    0.000000e+00 2.524806e-08
## familiarX 2.524806e-08 0.000000e+00
Interaction between Test Type and Condition
m <- lm(novelX~familiarX*condition, subset(subj_accuracy_wide,exp=="exp3"))
summary(m)
## 
## Call:
## lm(formula = novelX ~ familiarX * condition, data = subset(subj_accuracy_wide, 
##     exp == "exp3"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.33799 -0.08303  0.01198  0.07857  0.36172 
## 
## Coefficients:
##                                              Estimate Std. Error t value
## (Intercept)                                   0.11638    0.04446   2.618
## familiarX                                     0.79926    0.06844  11.679
## conditionUnstructured Pre-Exposure            0.15775    0.06582   2.397
## familiarX:conditionUnstructured Pre-Exposure -0.31801    0.11045  -2.879
##                                              Pr(>|t|)    
## (Intercept)                                   0.00963 ** 
## familiarX                                     < 2e-16 ***
## conditionUnstructured Pre-Exposure            0.01759 *  
## familiarX:conditionUnstructured Pre-Exposure  0.00448 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1264 on 175 degrees of freedom
## Multiple R-squared:  0.5132, Adjusted R-squared:  0.5049 
## F-statistic: 61.51 on 3 and 175 DF,  p-value: < 2.2e-16

Correlation Plot

ggplot(subset(subj_accuracy_wide,exp=="exp3"),aes(familiarX,novelX, color=condition,linetype=condition,shape=condition))+
  geom_jitter(width=0.02,height=0.02,size=3)+
  geom_smooth(method=lm,se =F,size=1.5)+
  scale_color_manual(name="Condition",values=c("#4DAF4A","#54278f"))+
  scale_linetype_manual(name="Condition",values=c(1,5))+
  scale_shape_manual(name="Condition",values=c(16,18))+
  ylab("Accuracy - Novel X")+
  xlab("Accuracy - Familiar X")+
  theme_classic(base_size=18)+
  theme(legend.position=c(0.3,0.9))

Logistic Mixed-Effects Model

Overall

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#recode condition
d$conditionC <- ifelse(d$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(d$condition=="Unstructured Pre-Exposure",-0.5,NA))
##all data
m <- glmer(isRight~conditionC+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp3")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   8420.2   8447.2  -4206.1   8412.2     6440 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0204 -1.0153  0.3568  0.9141  1.4900 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.600740 0.77507 
##  stimulus        (Intercept) 0.004486 0.06697 
## Number of obs: 6444, groups:  participantCode, 179; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.3848     0.0655   5.876 4.21e-09 ***
## conditionC    0.4254     0.1285   3.309 0.000935 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.019
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## .sig02             NA        NA
## (Intercept) 0.2564603 0.5131961
## conditionC  0.1734409 0.6772993
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

#maximal model
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp3"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp3")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   8423.4   8464.0  -4205.7   8411.4     6438 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0103 -1.0155  0.3546  0.9121  1.5246 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr 
##  participantCode (Intercept) 0.601095 0.77530       
##  stimulus        (Intercept) 0.006028 0.07764       
##                  conditionC  0.005060 0.07113  -1.00
## Number of obs: 6444, groups:  participantCode, 179; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.38485    0.06584   5.845 5.06e-09 ***
## conditionC   0.42487    0.12913   3.290    0.001 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.001 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.2558063 0.5138941
## conditionC  0.1717902 0.6779561

Familiar X Trials

Condition Effect
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="exp3"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: subset(d, exp == "exp3" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4271.3   4289.5  -2132.7   4265.3     3219 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1365 -1.0299  0.4681  0.9022  1.3070 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.4302   0.6559  
## Number of obs: 3222, groups:  participantCode, 179
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36486    0.06222   5.864 4.52e-09 ***
## conditionC   0.38408    0.12387   3.101  0.00193 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.018
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.2429110 0.4868076
## conditionC  0.1412912 0.6268640
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

#maximal model
m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp3"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa")) #convergence warning
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp3" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4277.3   4313.8  -2132.7   4265.3     3216 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1365 -1.0299  0.4681  0.9022  1.3070 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr 
##  participantCode (Intercept) 4.302e-01 6.559e-01      
##  stimulus        (Intercept) 2.777e-12 1.666e-06      
##                  conditionC  8.156e-12 2.856e-06 -1.00
## Number of obs: 3222, groups:  participantCode, 179; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.36486    0.06222   5.864 4.52e-09 ***
## conditionC   0.38408    0.12387   3.101  0.00193 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.018 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.2429104 0.4868084
## conditionC  0.1412901 0.6268634
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp3"&testType=="familiarX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp3" & testType == "familiarX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2064.3   2075.1  -1030.2   2060.3     1618 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4478 -0.9814  0.4085  0.7845  1.3262 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.76     0.8718  
## Number of obs: 1620, groups:  participantCode, 90
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.5939     0.1090    5.45 5.04e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.3803136 0.8074874
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"&testType=="familiarX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: 
## subset(d, exp == "exp3" & testType == "familiarX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2066.3   2082.5  -1030.2   2060.3     1617 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4478 -0.9814  0.4085  0.7845  1.3262 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.76     0.8718  
##  stimulus        (Intercept) 0.00     0.0000  
## Number of obs: 1620, groups:  participantCode, 90; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.5939     0.1090    5.45 5.04e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## .sig02             NA        NA
## (Intercept) 0.3803169 0.8074857
Testing against chance: Unstructured Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp3"&testType=="familiarX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: 
## subset(d, exp == "exp3" & testType == "familiarX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2197.9   2208.7  -1097.0   2193.9     1600 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6037 -1.0443  0.6236  0.9092  1.1787 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1937   0.4401  
## Number of obs: 1602, groups:  participantCode, 89
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.16208    0.06942   2.335   0.0195 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## (Intercept) 0.02602679 0.2981361
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"&testType=="familiarX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: 
## subset(d, exp == "exp3" & testType == "familiarX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2199.9   2216.1  -1097.0   2193.9     1599 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6037 -1.0443  0.6236  0.9092  1.1787 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.1937   0.4401  
##  stimulus        (Intercept) 0.0000   0.0000  
## Number of obs: 1602, groups:  participantCode, 89; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.16208    0.06942   2.335   0.0195 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                  2.5 %    97.5 %
## .sig01              NA        NA
## .sig02              NA        NA
## (Intercept) 0.02602678 0.2981357

Novel X Trials

Condition Effect
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~conditionC+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp3" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4288.8   4313.1  -2140.4   4280.8     3218 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1169 -1.0178  0.4405  0.9043  1.6234 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.4370   0.6610  
##  stimulus        (Intercept) 0.0136   0.1166  
## Number of obs: 3222, groups:  participantCode, 179; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.33919    0.06834   4.963 6.93e-07 ***
## conditionC   0.38311    0.12467   3.073  0.00212 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.022
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## .sig02             NA        NA
## (Intercept) 0.2052465 0.4731307
## conditionC  0.1387632 0.6274558
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp3"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: subset(d, exp == "exp3" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   4292.1   4328.5  -2140.0   4280.1     3216 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1229 -1.0235  0.4378  0.9032  1.6613 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev. Corr 
##  participantCode (Intercept) 0.43693  0.66101       
##  stimulus        (Intercept) 0.01427  0.11945       
##                  conditionC  0.00701  0.08373  -1.00
## Number of obs: 3222, groups:  participantCode, 179; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.33901    0.06862   4.941 7.78e-07 ***
## conditionC   0.38201    0.12623   3.026  0.00248 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC -0.043
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.2045242 0.4734924
## conditionC  0.1345932 0.6294225
Testing against chance: Learnable Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="exp3"&testType=="novelX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "exp3" & testType == "novelX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2046.6   2057.4  -1021.3   2042.6     1618 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6331 -0.9616  0.3150  0.8649  1.3816 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.051    1.025   
## Number of obs: 1620, groups:  participantCode, 90
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.6025     0.1246   4.834 1.34e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## (Intercept) 0.3582096 0.846745
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution (though the parameter estimates and test statistics are highly similar to the converging model).

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"&testType=="novelX"&conditionC==0.5),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp3" & testType == "novelX" & conditionC ==  
##     0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2048.6   2064.8  -1021.3   2042.6     1617 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6332 -0.9616  0.3150  0.8649  1.3816 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.051    1.025   
##  stimulus        (Intercept) 0.000    0.000   
## Number of obs: 1620, groups:  participantCode, 90; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.6025     0.1246   4.834 1.34e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## .sig02             NA        NA
## (Intercept) 0.3582252 0.8468066
Testing against chance: Unstructured Pre-Exposure
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge, as reported in the manuscript.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"&testType=="novelX"&conditionC==-0.5),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "exp3" & testType == "novelX" & conditionC ==  
##     -0.5)
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2214.6   2230.8  -1104.3   2208.6     1599 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.3338 -1.0401  0.7710  0.9299  1.1929 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.08077  0.2842  
##  stimulus        (Intercept) 0.01810  0.1346  
## Number of obs: 1602, groups:  participantCode, 89; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  0.13604    0.06698   2.031   0.0422 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                   2.5 %    97.5 %
## .sig01               NA        NA
## .sig02               NA        NA
## (Intercept) 0.004761652 0.2673123

Interaction between test type and condition

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#recode test type
d$testTypeC <- ifelse(d$testType=="novelX",0.5,
                    ifelse(d$testType=="familiarX",-0.5,NA))
##all data
m <- glmer(isRight~conditionC*testTypeC+(1|participantCode)+(1|stimulus),data=subset(d,exp=="exp3"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC * testTypeC + (1 | participantCode) + (1 |  
##     stimulus)
##    Data: subset(d, exp == "exp3")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   8423.9   8464.5  -4205.9   8411.9     6438 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0446 -1.0163  0.3558  0.9145  1.4950 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.60076  0.77509 
##  stimulus        (Intercept) 0.00426  0.06527 
## Number of obs: 6444, groups:  participantCode, 179; stimulus, 36
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.38483    0.06545   5.880 4.11e-09 ***
## conditionC            0.42539    0.12854   3.309 0.000935 ***
## testTypeC            -0.02990    0.05730  -0.522 0.601772    
## conditionC:testTypeC -0.01681    0.10602  -0.159 0.874005    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC   0.019              
## testTypeC   -0.001 -0.001       
## cndtnC:tsTC -0.001 -0.001  0.041
confint(m, method="Wald")[3:6,]
##                           2.5 %     97.5 %
## (Intercept)           0.2565559 0.51311242
## conditionC            0.1734545 0.67732689
## testTypeC            -0.1422117 0.08240574
## conditionC:testTypeC -0.2246079 0.19098383
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
m <- glmer(isRight~conditionC*testTypeC+(1+testTypeC|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="exp3"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## isRight ~ conditionC * testTypeC + (1 + testTypeC | participantCode) +  
##     (1 + conditionC | stimulus)
##    Data: subset(d, exp == "exp3")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   8431.0   8498.8  -4205.5   8411.0     6434 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0524 -1.0177  0.3537  0.9142  1.5229 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. Corr 
##  participantCode (Intercept) 6.011e-01 0.775307      
##                  testTypeC   9.903e-05 0.009951 -1.00
##  stimulus        (Intercept) 5.873e-03 0.076637      
##                  conditionC  5.111e-03 0.071495 -1.00
## Number of obs: 6444, groups:  participantCode, 179; stimulus, 36
## 
## Fixed effects:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           0.38486    0.06581   5.848 4.97e-09 ***
## conditionC            0.42483    0.12913   3.290    0.001 ** 
## testTypeC            -0.03192    0.06093  -0.524    0.600    
## conditionC:testTypeC -0.01920    0.11031  -0.174    0.862    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cndtnC tstTyC
## conditionC   0.001              
## testTypeC   -0.013  0.000       
## cndtnC:tsTC -0.001 -0.013 -0.010
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[7:10,]
##                           2.5 %     97.5 %
## (Intercept)           0.2558836 0.51384564
## conditionC            0.1717295 0.67792630
## testTypeC            -0.1513293 0.08749837
## conditionC:testTypeC -0.2354027 0.19701156

Signal Detection Model

Sensitivity

Overall
#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_overall$condition=="Unstructured Pre-Exposure",-0.5,NA))
##all data
m <- lm(dprime~conditionC,data=subset(subj_overall,exp=="exp3"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_overall, 
##     exp == "exp3"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8135 -0.6835 -0.2402  0.1862  3.5888 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.51673    0.08566   6.032 9.21e-09 ***
## conditionC   0.55311    0.17132   3.229  0.00148 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.146 on 177 degrees of freedom
## Multiple R-squared:  0.05561,    Adjusted R-squared:  0.05028 
## F-statistic: 10.42 on 1 and 177 DF,  p-value: 0.001483
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp3"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp3" & 
##     conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8135 -0.7933 -0.6345  0.1980  3.0357 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.7933     0.1450   5.471 4.07e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.376 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(dprime~1,data=subset(subj_overall,exp=="exp3"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "exp3" & 
##     conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4356 -0.3827 -0.1005  0.1818  3.5888 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.24017    0.09045   2.655   0.0094 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8533 on 88 degrees of freedom
Familiar X Trials
Condition Effect
#recode condition
subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Unstructured Pre-Exposure",-0.5,NA))

m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp3" & testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9315 -0.7360 -0.2373  0.3877  2.9491 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.48667    0.08135   5.983 1.19e-08 ***
## conditionC   0.49870    0.16269   3.065  0.00252 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.088 on 177 degrees of freedom
## Multiple R-squared:  0.05041,    Adjusted R-squared:  0.04504 
## F-statistic: 9.396 on 1 and 177 DF,  p-value: 0.002515
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp3" & testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9315 -0.7360 -0.3218  0.3867  2.4504 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.736      0.128   5.751 1.23e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.214 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp3" & testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4328 -0.5713 -0.2373  0.3877  2.9491 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)   0.2373     0.1001   2.371   0.0199 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9442 on 88 degrees of freedom
Novel X Trials
Condition Effect
m <- lm(dprime~conditionC,data=subset(subj_testType,exp=="exp3"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     exp == "exp3" & testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1854 -0.6917 -0.2001  0.3704  2.9863 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.44589    0.08133   5.483 1.43e-07 ***
## conditionC   0.49162    0.16265   3.023  0.00288 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.088 on 177 degrees of freedom
## Multiple R-squared:  0.04908,    Adjusted R-squared:  0.04371 
## F-statistic: 9.136 on 1 and 177 DF,  p-value: 0.002879
Testing against chance: Learnable Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp3"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp3" & testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.0520 -0.9798 -0.5520  0.5037  2.4947 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.6917     0.1375   5.032 2.51e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.304 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(dprime~1,data=subset(subj_testType,exp=="exp3"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "exp3" & testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1854 -0.4911 -0.2001  0.2559  2.9863 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)   0.2001     0.0862   2.321   0.0226 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8132 on 88 degrees of freedom
Interaction between Novel X and Familiar X trials
#recode test type
subj_testType$testTypeC <- ifelse(subj_testType$testType=="novelX",0.5,
                    ifelse(subj_testType$testType=="familiarX",-0.5,NA))
m <- lm(dprime~conditionC*testTypeC,data=subset(subj_testType,exp=="exp3"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC * testTypeC, data = subset(subj_testType, 
##     exp == "exp3"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1854 -0.7360 -0.2001  0.3704  2.9863 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           0.466283   0.057513   8.107 8.54e-15 ***
## conditionC            0.495159   0.115027   4.305 2.17e-05 ***
## testTypeC            -0.040781   0.115027  -0.355    0.723    
## conditionC:testTypeC -0.007077   0.230053  -0.031    0.975    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.088 on 354 degrees of freedom
## Multiple R-squared:  0.05007,    Adjusted R-squared:  0.04202 
## F-statistic: 6.219 on 3 and 354 DF,  p-value: 0.0003985

Response Bias

Overall
#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_overall$condition=="Unstructured Pre-Exposure",-0.5,NA))
##all data
m <- lm(c~conditionC,data=subset(subj_overall,exp=="exp3"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_overall, exp == 
##     "exp3"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7673 -0.1365  0.0241  0.2215  0.9152 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.15550    0.02925  -5.316 3.17e-07 ***
## conditionC   0.01662    0.05850   0.284    0.777    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3914 on 177 degrees of freedom
## Multiple R-squared:  0.0004559,  Adjusted R-squared:  -0.005191 
## F-statistic: 0.08074 on 1 and 177 DF,  p-value: 0.7766
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp3"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp3" & 
##     conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.76732 -0.13803  0.07258  0.21705  0.74491 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.14719    0.03944  -3.732 0.000334 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3741 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(c~1,data=subset(subj_overall,exp=="exp3"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_overall, exp == "exp3" & 
##     conditionC == -0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.59005 -0.13091  0.02271  0.23507  0.91524 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.16381    0.04325  -3.787 0.000278 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4081 on 88 degrees of freedom
Familiar X Trials
Condition Effect
#recode condition
subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure",0.5,
                    ifelse(subj_testType$condition=="Unstructured Pre-Exposure",-0.5,NA))

m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp3" & testType == "familiarX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.23566 -0.22471  0.07234  0.35756  0.78829 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.40651    0.03476 -11.696   <2e-16 ***
## conditionC   0.09791    0.06951   1.409    0.161    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.465 on 177 degrees of freedom
## Multiple R-squared:  0.01108,    Adjusted R-squared:  0.005498 
## F-statistic: 1.984 on 1 and 177 DF,  p-value: 0.1607
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp3" & 
##     testType == "familiarX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.23566 -0.19143  0.07234  0.35756  0.78829 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.35756    0.04803  -7.444 5.92e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4557 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp3"&testType=="familiarX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp3" & 
##     testType == "familiarX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1378 -0.2247  0.1430  0.3158  0.6834 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.45547    0.05027  -9.061 3.07e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4742 on 88 degrees of freedom
Novel X Trials
Condition Effect
m <- lm(c~conditionC,data=subset(subj_testType,exp=="exp3"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC, data = subset(subj_testType, exp == 
##     "exp3" & testType == "novelX"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.65861 -0.29336 -0.06539  0.21983  1.52783 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.09942    0.04583   2.169   0.0314 *
## conditionC  -0.06806    0.09167  -0.742   0.4588  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6132 on 177 degrees of freedom
## Multiple R-squared:  0.003105,   Adjusted R-squared:  -0.002527 
## F-statistic: 0.5513 on 1 and 177 DF,  p-value: 0.4588
Testing against chance: Learnable Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp3"&testType=="novelX"&conditionC==0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp3" & 
##     testType == "novelX" & conditionC == 0.5))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.65861 -0.23238 -0.06539  0.21983  1.52783 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)  0.06539    0.05611   1.165    0.247
## 
## Residual standard error: 0.5323 on 89 degrees of freedom
Testing against chance: Unstructured Pre-Exposure
m <- lm(c~1,data=subset(subj_testType,exp=="exp3"&testType=="novelX"&conditionC==-0.5))
summary(m)
## 
## Call:
## lm(formula = c ~ 1, data = subset(subj_testType, exp == "exp3" & 
##     testType == "novelX" & conditionC == -0.5))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5404 -0.4187 -0.1335  0.1518  1.4598 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  0.13345    0.07265   1.837   0.0696 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6854 on 88 degrees of freedom
Interaction between Novel X and Familiar X trials
m <- lm(c~conditionC*testTypeC,data=subset(subj_testType,exp=="exp3"))
summary(m)
## 
## Call:
## lm(formula = c ~ conditionC * testTypeC, data = subset(subj_testType, 
##     exp == "exp3"))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.65861 -0.27316  0.00626  0.31431  1.52783 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          -0.15355    0.02876  -5.339 1.68e-07 ***
## conditionC            0.01492    0.05752   0.259    0.795    
## testTypeC             0.50594    0.05752   8.796  < 2e-16 ***
## conditionC:testTypeC -0.16597    0.11504  -1.443    0.150    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5442 on 354 degrees of freedom
## Multiple R-squared:  0.1832, Adjusted R-squared:  0.1762 
## F-statistic: 26.46 on 3 and 354 DF,  p-value: 1.833e-15

Much larger response bias for familiar X trials compared to novel X trials.

Overall Analysis: Experiments 1 - 3

Plot all data from all conditions across Experiments 1 - 3

Plot

#Familiar X test
p1 <- ggplot(subset(test_type,testType=="familiarX"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="familiarX"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, height=0.02, size=0.8)+
  theme_classic(base_size=11)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","No\n Pre-Exposure","Unstructured\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#E41A1C","#377EB8","#54278f","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_color_manual(values=c("#E41A1C","#377EB8","#54278f","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  theme(legend.position="none")+
  ylab("Accuracy - Familiar X Test")+
  xlab("Condition")

#Novel X
p2 <- ggplot(subset(test_type,testType=="novelX"),aes(condition,accuracy,fill=condition,color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="novelX"),aes(y=acc), width = 0.05, height=0.02, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=11)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"),
                   labels=c("Non-Learnable\nPre-Exposure","No\n Pre-Exposure","Unstructured\nPre-Exposure","Learnable\nPre-Exposure"),
                   limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_fill_manual(values=c("#E41A1C","#377EB8","#54278f","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  scale_color_manual(values=c("#E41A1C","#377EB8","#54278f","#4DAF4A"),limits=c("Non-Learnable Pre-Exposure","No Pre-Exposure","Unstructured Pre-Exposure","Learnable Pre-Exposure"))+
  theme(legend.position="none")+
  ylab("Accuracy - Novel X Test")+
  xlab("Condition")
plot_grid(p1,p2, labels=c("A","B"),label_size=18)

Overall Accuracy Table

overall %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
condition N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
Learnable Pre-Exposure 205 0.5987566 0.5738617 0.6236514 0.6815562 0.50340886 0.8597035 -0.1705878 -0.2199460 -0.12122966
Learnable Pre-Exposure Only 48 0.6464120 0.5870300 0.7057941 1.0119951 0.57692063 1.4470695 -0.2476500 -0.3558765 -0.13942359
No Pre-Exposure 81 0.5445816 0.5165071 0.5726561 0.2917437 0.09294647 0.4905409 -0.2817981 -0.3880251 -0.17557112
Non-Learnable Pre-Exposure 114 0.5268031 0.5088965 0.5447098 0.1744142 0.05828405 0.2905444 -0.3033881 -0.3800089 -0.22676727
Unstructured Pre-Exposure 89 0.5355805 0.5085204 0.5626406 0.2401722 0.06042550 0.4199189 -0.1638137 -0.2497717 -0.07785573

Accuracy Table By Test Type

test_type %>%
  select(-c(se, accuracy_ci,d_prime_ci,c_bias_ci)) %>%
  formattable()
condition testType N accuracy accuracy_lower_ci accuracy_upper_ci d_prime d_prime_lower_ci d_prime_upper_ci c_bias c_bias_lower_ci c_bias_upper_ci
Learnable Pre-Exposure familiarX 205 0.6032520 0.5769629 0.6295412 0.6375685 0.474275807 0.8008612 -0.36106697 -0.42235755 -0.299776379
Learnable Pre-Exposure novelX 205 0.5942073 0.5668629 0.6215517 0.5840781 0.414323524 0.7538328 0.01628288 -0.05174899 0.084314749
Learnable Pre-Exposure Only familiarX 48 0.6412037 0.5770248 0.7053826 0.8763520 0.476210917 1.2764931 -0.37304689 -0.49147685 -0.254616937
Learnable Pre-Exposure Only novelX 48 0.6516204 0.5906462 0.7125946 0.9315712 0.553606822 1.3095356 -0.11367134 -0.22191307 -0.005429604
No Pre-Exposure familiarX 81 0.5480110 0.5164667 0.5795553 0.2995076 0.101032689 0.4979825 -0.64553887 -0.75491277 -0.536164973
No Pre-Exposure novelX 81 0.5411523 0.5100279 0.5722766 0.2466637 0.058929824 0.4343976 0.08656619 -0.07935325 0.252485632
Non-Learnable Pre-Exposure familiarX 114 0.5253411 0.5028839 0.5477983 0.1448369 0.008158158 0.2815156 -0.54211863 -0.62796874 -0.456268514
Non-Learnable Pre-Exposure novelX 114 0.5282651 0.5050216 0.5515086 0.1731961 0.038864646 0.3075276 -0.06726700 -0.16750917 0.032975169
Unstructured Pre-Exposure familiarX 89 0.5380774 0.5053266 0.5708282 0.2373254 0.038431089 0.4362197 -0.45546991 -0.55536408 -0.355575746
Unstructured Pre-Exposure novelX 89 0.5330836 0.5043785 0.5617888 0.2000827 0.028781716 0.3713837 0.13345328 -0.01092315 0.277829719

Overall - All pre-exposure conditions

All Test Trials

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- glmer(isRight~condition+(1|participantCode),data=filter(d, condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode)
##    Data: filter(d, condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  23491.8  23530.6 -11740.9  23481.8    17597 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5857 -1.0185  0.4159  0.9080  1.4127 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.3866   0.6218  
## Number of obs: 17602, groups:  participantCode, 489
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.47568    0.05065   9.392  < 2e-16
## conditionNo Pre-Exposure            -0.27030    0.09387  -2.880 0.003983
## conditionNon-Learnable Pre-Exposure -0.35704    0.08351  -4.276 1.91e-05
## conditionUnstructured Pre-Exposure  -0.31147    0.09075  -3.432 0.000599
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.537              
## cndtnN-LP-E -0.605  0.325       
## cndtnUnPr-E -0.556  0.299  0.337
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 88.203  1  < 2.2e-16 ***
## condition   24.080  3  2.403e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
#does not converge
m <- glmer(isRight~condition+(1|participantCode)+(1+condition|stimulus),data=filter(d, condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode) + (1 + condition |  
##     stimulus)
##    Data: filter(d, condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  23510.7  23627.3 -11740.3  23480.7    17587 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5927 -1.0172  0.4152  0.9123  1.4523 
## 
## Random effects:
##  Groups          Name                                Variance  Std.Dev.
##  participantCode (Intercept)                         3.871e-01 0.622135
##  stimulus        (Intercept)                         6.622e-05 0.008138
##                  conditionNo Pre-Exposure            7.993e-05 0.008940
##                  conditionNon-Learnable Pre-Exposure 3.363e-04 0.018338
##                  conditionUnstructured Pre-Exposure  9.815e-03 0.099071
##  Corr          
##                
##                
##  1.00          
##  1.00 1.00     
##  1.00 1.00 1.00
## Number of obs: 17602, groups:  participantCode, 489; stimulus, 36
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.47575    0.05070   9.383  < 2e-16
## conditionNo Pre-Exposure            -0.27033    0.09392  -2.878 0.003996
## conditionNon-Learnable Pre-Exposure -0.35708    0.08361  -4.271 1.95e-05
## conditionUnstructured Pre-Exposure  -0.31115    0.09234  -3.370 0.000752
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.537              
## cndtnN-LP-E -0.604  0.326       
## cndtnUnPr-E -0.542  0.297  0.338
## convergence code: 0
## boundary (singular) fit: see ?isSingular
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 88.040  1  < 2.2e-16 ***
## condition   23.799  3  2.752e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Familiar X

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- glmer(isRight~condition+(1|participantCode)+(1|stimulus),data=filter(d, testType=="familiarX"&condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode) + (1 | stimulus)
##    Data: 
## filter(d, testType == "familiarX" & condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11875.7  11918.2  -5931.8  11863.7     8796 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8964 -1.0379  0.5335  0.9006  1.4035 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.
##  participantCode (Intercept) 0.2762752 0.52562 
##  stimulus        (Intercept) 0.0007265 0.02695 
## Number of obs: 8802, groups:  participantCode, 489; stimulus, 18
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.45832    0.05136   8.924  < 2e-16
## conditionNo Pre-Exposure            -0.25018    0.09445  -2.649  0.00808
## conditionNon-Learnable Pre-Exposure -0.34996    0.08405  -4.164 3.13e-05
## conditionUnstructured Pre-Exposure  -0.29221    0.09141  -3.197  0.00139
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.533              
## cndtnN-LP-E -0.601  0.326       
## cndtnUnPr-E -0.551  0.299  0.337
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 79.644  1  < 2.2e-16 ***
## condition   21.940  3  6.714e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
#does not converge
m <- glmer(isRight~condition+(1|participantCode)+(1+condition|stimulus),data=filter(d, testType=="familiarX"&condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode) + (1 + condition |  
##     stimulus)
##    Data: 
## filter(d, testType == "familiarX" & condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11893.3  11999.5  -5931.6  11863.3     8787 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8953 -1.0359  0.5368  0.9006  1.4034 
## 
## Random effects:
##  Groups          Name                                Variance  Std.Dev.
##  participantCode (Intercept)                         0.2765631 0.52589 
##  stimulus        (Intercept)                         0.0002882 0.01698 
##                  conditionNo Pre-Exposure            0.0028056 0.05297 
##                  conditionNon-Learnable Pre-Exposure 0.0002372 0.01540 
##                  conditionUnstructured Pre-Exposure  0.0033356 0.05776 
##  Corr          
##                
##                
##  1.00          
##  1.00 1.00     
##  1.00 1.00 1.00
## Number of obs: 8802, groups:  participantCode, 489; stimulus, 18
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.45831    0.05113   8.963  < 2e-16
## conditionNo Pre-Exposure            -0.24999    0.09532  -2.623  0.00872
## conditionNon-Learnable Pre-Exposure -0.34994    0.08415  -4.158  3.2e-05
## conditionUnstructured Pre-Exposure  -0.29203    0.09245  -3.159  0.00159
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.521              
## cndtnN-LP-E -0.600  0.328       
## cndtnUnPr-E -0.536  0.312  0.339
## convergence code: 0
## boundary (singular) fit: see ?isSingular
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 80.344  1  < 2.2e-16 ***
## condition   21.625  3  7.807e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Novel X

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- glmer(isRight~condition+(1|participantCode),data=filter(d, testType=="novelX"&condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode)
##    Data: 
## filter(d, testType == "novelX" & condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11896.2  11931.7  -5943.1  11886.2     8795 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8833 -1.0317  0.5301  0.9116  1.4208 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.2853   0.5341  
## Number of obs: 8800, groups:  participantCode, 489
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.42193    0.05142   8.206 2.28e-16
## conditionNo Pre-Exposure            -0.24356    0.09525  -2.557 0.010558
## conditionNon-Learnable Pre-Exposure -0.30163    0.08483  -3.556 0.000377
## conditionUnstructured Pre-Exposure  -0.27919    0.09212  -3.031 0.002439
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            *  
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.538              
## cndtnN-LP-E -0.605  0.326       
## cndtnUnPr-E -0.557  0.300  0.337
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 67.341  1  2.284e-16 ***
## condition   17.616  3  0.0005278 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

##all data
#does not converge
m <- glmer(isRight~condition+(1|participantCode)+(1+condition|stimulus),data=filter(d, testType=="novelX"&condition!="Learnable Pre-Exposure Only"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ condition + (1 | participantCode) + (1 + condition |  
##     stimulus)
##    Data: 
## filter(d, testType == "novelX" & condition != "Learnable Pre-Exposure Only")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##  11914.8  12021.0  -5942.4  11884.8     8785 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8845 -1.0302  0.5306  0.9117  1.5052 
## 
## Random effects:
##  Groups          Name                                Variance  Std.Dev.
##  participantCode (Intercept)                         0.2860806 0.53487 
##  stimulus        (Intercept)                         0.0000000 0.00000 
##                  conditionNo Pre-Exposure            0.0001722 0.01312 
##                  conditionNon-Learnable Pre-Exposure 0.0002414 0.01554 
##                  conditionUnstructured Pre-Exposure  0.0219312 0.14809 
##  Corr             
##                   
##                   
##    NaN            
##    NaN -1.00      
##    NaN -1.00  1.00
## Number of obs: 8800, groups:  participantCode, 489; stimulus, 18
## 
## Fixed effects:
##                                     Estimate Std. Error z value Pr(>|z|)
## (Intercept)                          0.42204    0.05145   8.202 2.36e-16
## conditionNo Pre-Exposure            -0.24363    0.09538  -2.554 0.010639
## conditionNon-Learnable Pre-Exposure -0.30171    0.08497  -3.551 0.000384
## conditionUnstructured Pre-Exposure  -0.27862    0.09864  -2.825 0.004734
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            *  
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) cnNP-E cN-LP-
## cndtnNPr-Ex -0.538              
## cndtnN-LP-E -0.605  0.324       
## cndtnUnPr-E -0.520  0.269  0.330
## convergence code: 0
## boundary (singular) fit: see ?isSingular
Anova(m,type="III")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: isRight
##              Chisq Df Pr(>Chisq)    
## (Intercept) 67.275  1  2.362e-16 ***
## condition   17.082  3  0.0006797 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

d-prime

All Test Trials

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- lm(dprime~condition,data=filter(subj_overall, condition!="Learnable Pre-Exposure Only"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ condition, data = filter(subj_overall, 
##     condition != "Learnable Pre-Exposure Only"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.0357 -0.5418 -0.2402  0.1580  3.6546 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)                          0.68156    0.07193   9.475  < 2e-16
## conditionNo Pre-Exposure            -0.38981    0.13516  -2.884 0.004100
## conditionNon-Learnable Pre-Exposure -0.50714    0.12032  -4.215 2.98e-05
## conditionUnstructured Pre-Exposure  -0.44138    0.13073  -3.376 0.000794
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            ** 
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.03 on 485 degrees of freedom
## Multiple R-squared:  0.04654,    Adjusted R-squared:  0.04064 
## F-statistic: 7.891 on 3 and 485 DF,  p-value: 3.78e-05
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: dprime
##             Sum Sq  Df F value    Pr(>F)    
## (Intercept)  95.23   1 89.7822 < 2.2e-16 ***
## condition    25.11   3  7.8913  3.78e-05 ***
## Residuals   514.41 485                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Familiar X Test Trials

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- lm(dprime~condition,data=filter(subj_testType, testType=="familiarX"&condition!="Learnable Pre-Exposure Only"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ condition, data = filter(subj_testType, 
##     testType == "familiarX" & condition != "Learnable Pre-Exposure Only"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0789 -0.6376 -0.1448  0.3255  3.0416 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)                          0.63757    0.07028   9.072  < 2e-16
## conditionNo Pre-Exposure            -0.33806    0.13206  -2.560  0.01077
## conditionNon-Learnable Pre-Exposure -0.49273    0.11756  -4.191  3.3e-05
## conditionUnstructured Pre-Exposure  -0.40024    0.12773  -3.133  0.00183
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            *  
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.006 on 485 degrees of freedom
## Multiple R-squared:  0.04315,    Adjusted R-squared:  0.03724 
## F-statistic: 7.291 on 3 and 485 DF,  p-value: 8.625e-05
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: dprime
##             Sum Sq  Df F value    Pr(>F)    
## (Intercept)  83.33   1 82.3021 < 2.2e-16 ***
## condition    22.15   3  7.2912 8.625e-05 ***
## Residuals   491.06 485                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Novel X Test Trials

Condition dummy-coded - Learnable Pre-Exposure condition is the reference level.

m <- lm(dprime~condition,data=filter(subj_testType, testType=="novelX"&condition!="Learnable Pre-Exposure Only"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ condition, data = filter(subj_testType, 
##     testType == "novelX" & condition != "Learnable Pre-Exposure Only"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.3170 -0.5841 -0.2001  0.2827  3.0132 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)                          0.58408    0.06985   8.362 6.59e-16
## conditionNo Pre-Exposure            -0.33741    0.13125  -2.571 0.010445
## conditionNon-Learnable Pre-Exposure -0.41088    0.11684  -3.517 0.000478
## conditionUnstructured Pre-Exposure  -0.38400    0.12695  -3.025 0.002621
##                                        
## (Intercept)                         ***
## conditionNo Pre-Exposure            *  
## conditionNon-Learnable Pre-Exposure ***
## conditionUnstructured Pre-Exposure  ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1 on 485 degrees of freedom
## Multiple R-squared:  0.03498,    Adjusted R-squared:  0.02901 
## F-statistic: 5.861 on 3 and 485 DF,  p-value: 0.0006165
Anova(m, type="III")
## Anova Table (Type III tests)
## 
## Response: dprime
##             Sum Sq  Df F value    Pr(>F)    
## (Intercept)  69.94   1 69.9231 6.585e-16 ***
## condition    17.58   3  5.8606 0.0006165 ***
## Residuals   485.08 485                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

S1: Learnable Pre-Exposure Only

Test Accuracy

Plot

#Familiar X test
p1 <- ggplot(subset(test_type_exp,testType=="familiarX"&exp=="s1"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="familiarX"&exp=="s1"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=18)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Learnable Pre-Exposure Only"),
                   labels=c("Learnable\nPre-Exposure\nOnly"))+
  scale_fill_manual(values=c("#265725"))+
  scale_color_manual(values=c("#265725"))+
  theme(legend.position="none")+
  ylab("Accuracy - Familiar X test")+
  xlab("Condition")

#Novel X
p2 <- ggplot(subset(test_type_exp,testType=="novelX"&exp=="s1"),aes(condition,accuracy,fill=condition, color=condition))+
  geom_bar(position=position_dodge(.9), stat="identity", size=1.2,alpha=0.3, width=0.7)+
  geom_jitter(data=subset(subj_testType,testType=="novelX"&exp=="s1"),aes(y=acc), width = 0.05, alpha=0.6,shape=21)+
  geom_errorbar(aes(ymin=accuracy-se,ymax=accuracy+se),color="black",position=position_dodge(.9),width=0.05, size=0.8)+
  theme_classic(base_size=18)+
  geom_hline(yintercept=0.5, linetype="dotted")+
  scale_x_discrete(name="Condition",
                   breaks=c("Learnable Pre-Exposure Only"),
                   labels=c("Learnable\nPre-Exposure\nOnly"))+
  scale_fill_manual(values=c("#265725"))+
  scale_color_manual(values=c("#265725"))+
  theme(legend.position="none")+
  ylab("Accuracy - Novel X Test")+
  xlab("Condition")
plot_grid(p1,p2, labels=c("A","B"),label_size=20)

Overall Accuracy Table

overall_exp %>%
  filter(exp=="s1") %>%
  #select(-c(accuracy_ci,d_prime_ci,c_bias,c_bias_ci,c_bias_lower_ci,c_bias_upper_ci)) %>%
  formattable()
exp condition N accuracy se accuracy_ci accuracy_lower_ci accuracy_upper_ci d_prime d_prime_ci d_prime_lower_ci d_prime_upper_ci c_bias c_bias_ci c_bias_lower_ci c_bias_upper_ci
s1 Learnable Pre-Exposure Only 48 0.646412 0.02951775 0.05938206 0.58703 0.7057941 1.011995 0.4350744 0.5769206 1.447069 -0.24765 0.1082264 -0.3558765 -0.1394236

Accuracy Table By Test Type

test_type_exp %>%
  filter(exp=="s1") %>%
  #select(-c(accuracy_ci,d_prime_ci,c_bias,c_bias_ci,c_bias_lower_ci,c_bias_upper_ci)) %>%
  formattable()
exp condition testType N accuracy se accuracy_ci accuracy_lower_ci accuracy_upper_ci d_prime d_prime_ci d_prime_lower_ci d_prime_upper_ci c_bias c_bias_ci c_bias_lower_ci c_bias_upper_ci
s1 Learnable Pre-Exposure Only familiarX 48 0.6412037 0.03190216 0.06417887 0.5770248 0.7053826 0.8763520 0.4001411 0.4762109 1.276493 -0.3730469 0.1184300 -0.4914768 -0.254616937
s1 Learnable Pre-Exposure Only novelX 48 0.6516204 0.03030918 0.06097421 0.5906462 0.7125946 0.9315712 0.3779644 0.5536068 1.309536 -0.1136713 0.1082417 -0.2219131 -0.005429604

Correlation

Correlation between Familiar X and Novel X Trials
##Correlations between Familiar X and Novel X
c <- corr.test(subset(subj_accuracy_wide, exp=="s1")[,c("novelX","familiarX")])
c
## Call:corr.test(x = subset(subj_accuracy_wide, exp == "s1")[, c("novelX", 
##     "familiarX")])
## Correlation matrix 
##           novelX familiarX
## novelX       1.0       0.8
## familiarX    0.8       1.0
## Sample Size 
## [1] 48
## Probability values (Entries above the diagonal are adjusted for multiple tests.) 
##           novelX familiarX
## novelX         0         0
## familiarX      0         0
## 
##  To see confidence intervals of the correlations, print with the short=FALSE option
c$p
##                 novelX    familiarX
## novelX    0.000000e+00 8.227912e-12
## familiarX 8.227912e-12 0.000000e+00

Correlation Plot

ggplot(subset(subj_accuracy_wide,exp=="s1"),aes(familiarX,novelX, color=condition,linetype=condition,shape=condition))+
  geom_jitter(width=0.02,height=0.02,size=3)+
  geom_smooth(method=lm,se =F,size=1.5)+
  scale_color_manual(name="Condition",values=c("#265725"))+
  scale_linetype_manual(name="Condition",values=c(1))+
  scale_shape_manual(name="Condition",values=c(16))+
  ylab("Accuracy - Novel X")+
  xlab("Accuracy - Familiar X")+
  theme_classic(base_size=18)+
  theme(legend.position=c(0.25,0.9))

Logistic Mixed-Effects Model

Overall

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="s1"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "s1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2025.6   2036.5  -1010.8   2021.6     1726 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0537 -0.9745  0.2467  0.8765  1.2702 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.782    1.335   
## Number of obs: 1728, groups:  participantCode, 48
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.9017     0.2065   4.367 1.26e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## (Intercept) 0.4970538 1.306441
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="s1"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "s1")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2027.6   2044.0  -1010.8   2021.6     1725 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0537 -0.9745  0.2467  0.8765  1.2702 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.782    1.335   
##  stimulus        (Intercept) 0.000    0.000   
## Number of obs: 1728, groups:  participantCode, 48; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.9017     0.2065   4.367 1.26e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                2.5 %   97.5 %
## .sig01            NA       NA
## .sig02            NA       NA
## (Intercept) 0.497068 1.306398

Familiar X Trials

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="s1"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "s1" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1045.4   1054.9   -520.7   1041.4      862 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8641 -0.9603  0.2777  0.7782  1.5632 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.373    1.172   
## Number of obs: 864, groups:  participantCode, 48
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.7916     0.1923   4.116 3.85e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## (Intercept) 0.4146819 1.168537
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="s1"&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "s1" & testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1047.4   1061.7   -520.7   1041.4      861 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8640 -0.9603  0.2777  0.7782  1.5632 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.373    1.172   
##  stimulus        (Intercept) 0.000    0.000   
## Number of obs: 864, groups:  participantCode, 48; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.7916     0.1923   4.116 3.85e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## .sig02             NA       NA
## (Intercept) 0.4146746 1.168538

Novel X Trials

Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

m <- glmer(isRight~1+(1|participantCode),data=subset(d,exp=="s1"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode)
##    Data: subset(d, exp == "s1" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1048.9   1058.4   -522.4   1044.9      862 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7843 -0.9724  0.3592  0.7737  1.2429 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 1.166    1.08    
## Number of obs: 864, groups:  participantCode, 48
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.8163     0.1797   4.543 5.56e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## (Intercept) 0.4640702 1.168449
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~1+(1|participantCode)+(1|stimulus),data=subset(d,exp=="s1"&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ 1 + (1 | participantCode) + (1 | stimulus)
##    Data: subset(d, exp == "s1" & testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1050.9   1065.1   -522.4   1044.9      861 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7843 -0.9724  0.3592  0.7737  1.2429 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev. 
##  participantCode (Intercept) 1.166e+00 1.080e+00
##  stimulus        (Intercept) 1.257e-76 1.121e-38
## Number of obs: 864, groups:  participantCode, 48; stimulus, 18
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   0.8163     0.1797   4.543 5.56e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")
##                 2.5 %   97.5 %
## .sig01             NA       NA
## .sig02             NA       NA
## (Intercept) 0.4640675 1.168448

Comparison to No Pre-Exposure condition from Experiment 2

All Test Trials
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#compare to No Pre-Exposure condition from Experiment 2
#recode condition
d$conditionC <- ifelse(d$condition=="Learnable Pre-Exposure Only",0.5,
                       ifelse(d$condition=="No Pre-Exposure",-0.5,NA))
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure")),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: 
## subset(d, exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure"))
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   6036.3   6055.6  -3015.1   6030.3     4641 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0895 -1.0167  0.3237  0.8949  1.3116 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.6149   0.7841  
## Number of obs: 4644, groups:  participantCode, 129
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.49378    0.08032   6.147 7.87e-10 ***
## conditionC   0.55590    0.15961   3.483 0.000496 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.287
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.3363528 0.6512145
## conditionC  0.2430805 0.8687295
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure")),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: 
## subset(d, exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure"))
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   6042.3   6080.9  -3015.1   6030.3     4638 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0895 -1.0167  0.3237  0.8949  1.3116 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 6.149e-01 7.841e-01     
##  stimulus        (Intercept) 0.000e+00 0.000e+00     
##                  conditionC  5.426e-13 7.366e-07  NaN
## Number of obs: 4644, groups:  participantCode, 129; stimulus, 72
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.49378    0.08033   6.147 7.89e-10 ***
## conditionC   0.55590    0.15961   3.483 0.000496 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.287 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.3363456 0.6512215
## conditionC  0.2430712 0.8687369
Familiar X Test Trials
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#compare to No Pre-Exposure condition from Experiment 2
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: 
## subset(d, (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) &  
##     testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3072.1   3089.3  -1533.0   3066.1     2319 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2045 -1.0370  0.4558  0.8925  1.2954 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.4379   0.6617  
## Number of obs: 2322, groups:  participantCode, 129
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.44492    0.07719   5.764  8.2e-09 ***
## conditionC   0.45795    0.15337   2.986  0.00283 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.289
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.2936397 0.5962060
## conditionC  0.1573446 0.7585483
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="familiarX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: 
## subset(d, (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) &  
##     testType == "familiarX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3078.1   3112.6  -1533.0   3066.1     2316 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2045 -1.0370  0.4558  0.8925  1.2954 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 4.379e-01 6.617e-01     
##  stimulus        (Intercept) 0.000e+00 0.000e+00     
##                  conditionC  5.111e-14 2.261e-07  NaN
## Number of obs: 2322, groups:  participantCode, 129; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.44492    0.07719   5.764  8.2e-09 ***
## conditionC   0.45795    0.15337   2.986  0.00283 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.289 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.2936385 0.5962072
## conditionC  0.1573528 0.7585392
Novel X Trials
Final Converging Model

The final model with the maximal random effects structure that still allowed the model to converge.

#compare to No Pre-Exposure condition from Experiment 2
m <- glmer(isRight~conditionC+(1|participantCode),data=subset(d,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode)
##    Data: 
## subset(d, (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) &  
##     testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3077.6   3094.9  -1535.8   3071.6     2319 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1515 -1.0345  0.4827  0.9013  1.2818 
## 
## Random effects:
##  Groups          Name        Variance Std.Dev.
##  participantCode (Intercept) 0.3747   0.6122  
## Number of obs: 2322, groups:  participantCode, 129
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.44545    0.07344   6.066 1.31e-09 ***
## conditionC   0.52673    0.14605   3.606  0.00031 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.292
confint(m, method="Wald")
##                 2.5 %    97.5 %
## .sig01             NA        NA
## (Intercept) 0.3015137 0.5893828
## conditionC  0.2404672 0.8129891
Maximal Random Effects Model

Note that this model does not converge (singular fit), thus the parameter estimates should be interpreted with caution.

m <- glmer(isRight~conditionC+(1|participantCode)+(1+conditionC|stimulus),data=subset(d,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="novelX"),family=binomial,glmerControl(optimizer="bobyqa"))
## boundary (singular) fit: see ?isSingular
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ conditionC + (1 | participantCode) + (1 + conditionC |  
##     stimulus)
##    Data: 
## subset(d, (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) &  
##     testType == "novelX")
## Control: glmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   3083.6   3118.1  -1535.8   3071.6     2316 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1515 -1.0345  0.4827  0.9013  1.2818 
## 
## Random effects:
##  Groups          Name        Variance  Std.Dev.  Corr
##  participantCode (Intercept) 3.747e-01 6.122e-01     
##  stimulus        (Intercept) 0.000e+00 0.000e+00     
##                  conditionC  9.772e-14 3.126e-07  NaN
## Number of obs: 2322, groups:  participantCode, 129; stimulus, 36
## 
## Fixed effects:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  0.44545    0.07344   6.066 1.31e-09 ***
## conditionC   0.52673    0.14606   3.606 0.000311 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr)
## conditionC 0.292 
## convergence code: 0
## boundary (singular) fit: see ?isSingular
confint(m, method="Wald")[5:6,]
##                 2.5 %    97.5 %
## (Intercept) 0.3015126 0.5893824
## conditionC  0.2404509 0.8130027

Signal Detection Analysis

Overall

##all data
m <- lm(dprime~1,data=subset(subj_overall,exp=="s1"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_overall, exp == "s1"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7249 -1.0120 -0.6694  0.5681  2.8170 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   1.0120     0.2163   4.679 2.47e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.498 on 47 degrees of freedom

Familiar X Trials

m <- lm(dprime~1,data=subset(subj_testType,exp=="s1"&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "s1" & testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5277 -0.8763 -0.2514  0.8585  2.3101 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.8764     0.1989   4.406 6.06e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.378 on 47 degrees of freedom

Novel X Trials

m <- lm(dprime~1,data=subset(subj_testType,exp=="s1"&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ 1, data = subset(subj_testType, exp == 
##     "s1" & testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8360 -0.9316 -0.3611  0.7118  2.2549 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.9316     0.1879   4.958 9.68e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.302 on 47 degrees of freedom

Comparison to No Pre-Exposure condition from Experiment 2

Overall
#recode condition
subj_overall$conditionC <- ifelse(subj_overall$condition=="Learnable Pre-Exposure Only",0.5,
                       ifelse(subj_overall$condition=="No Pre-Exposure",-0.5,NA))
m <- lm(dprime~conditionC,data=subset(subj_overall,exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure")))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_overall, 
##     exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7249 -0.6257 -0.2917  0.1580  3.5373 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.6519     0.1054   6.183 7.93e-09 ***
## conditionC    0.7203     0.2109   3.416 0.000854 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.158 on 127 degrees of freedom
## Multiple R-squared:  0.08414,    Adjusted R-squared:  0.07693 
## F-statistic: 11.67 on 1 and 127 DF,  p-value: 0.0008544
Familiar X Trials
#recode condition
subj_testType$conditionC <- ifelse(subj_testType$condition=="Learnable Pre-Exposure Only",0.5,
                       ifelse(subj_testType$condition=="No Pre-Exposure",-0.5,NA))

m <- lm(dprime~conditionC,data=subset(subj_testType,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="familiarX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) & 
##         testType == "familiarX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5277 -0.7554 -0.2995  0.4840  2.8869 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.5879     0.1002   5.868 3.61e-08 ***
## conditionC    0.5768     0.2004   2.879  0.00469 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.1 on 127 degrees of freedom
## Multiple R-squared:  0.06125,    Adjusted R-squared:  0.05386 
## F-statistic: 8.286 on 1 and 127 DF,  p-value: 0.004688
Novel X Trials
m <- lm(dprime~conditionC,data=subset(subj_testType,(exp=="s1"|(exp=="exp2"&condition=="No Pre-Exposure"))&testType=="novelX"))
summary(m)
## 
## Call:
## lm(formula = dprime ~ conditionC, data = subset(subj_testType, 
##     (exp == "s1" | (exp == "exp2" & condition == "No Pre-Exposure")) & 
##         testType == "novelX"))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8360 -0.6405 -0.2467  0.3238  2.9398 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.5891     0.0947   6.221 6.59e-09 ***
## conditionC    0.6849     0.1894   3.616  0.00043 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.04 on 127 degrees of freedom
## Multiple R-squared:  0.09336,    Adjusted R-squared:  0.08622 
## F-statistic: 13.08 on 1 and 127 DF,  p-value: 0.0004296