Subject-level graph of overall accuracy and naming frequency

ggplot(tme_subj, aes(NamingFreq_Study_num, testAcc))+
  geom_point()+
  geom_smooth(method=lm)+
  theme_classic()

What factors predict accuracy? (typicality, nameability, judgment, naming frequency during study)

accuracy_randomSlope <- glmer(isRight ~ kinds_c + avgFam_c + typ_c*judgment_c + simpson_c*NamingFreq_Study_c + 
                                        (1|category) + (typ_c*judgment_c|subjCode),
                                      data=tme2_full, family=binomial)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl =
## control$checkConv, : Model failed to converge with max|grad| = 0.00830015
## (tol = 0.001, component 1)
accuracy_randomInt <- glmer(isRight ~ kinds_c+ avgFam_c + typ_c*judgment_c + simpson_c*NamingFreq_Study_c + 
                                        (1|category) + (1|subjCode), data=tme2_full, family=binomial)

anova(accuracy_randomSlope, accuracy_randomInt) #random slope model didn't converge but is a better fit...
## Data: tme2_full
## Models:
## accuracy_randomInt: isRight ~ kinds_c + avgFam_c + typ_c * judgment_c + simpson_c * 
## accuracy_randomInt:     NamingFreq_Study_c + (1 | category) + (1 | subjCode)
## accuracy_randomSlope: isRight ~ kinds_c + avgFam_c + typ_c * judgment_c + simpson_c * 
## accuracy_randomSlope:     NamingFreq_Study_c + (1 | category) + (typ_c * judgment_c | 
## accuracy_randomSlope:     subjCode)
##                      Df    AIC    BIC  logLik deviance  Chisq Chi Df
## accuracy_randomInt   11 2432.8 2494.6 -1205.4   2410.8              
## accuracy_randomSlope 20 2098.9 2211.1 -1029.4   2058.9 351.99      9
##                      Pr(>Chisq)    
## accuracy_randomInt                 
## accuracy_randomSlope  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(accuracy_randomInt)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ kinds_c + avgFam_c + typ_c * judgment_c + simpson_c *  
##     NamingFreq_Study_c + (1 | category) + (1 | subjCode)
##    Data: tme2_full
## 
##      AIC      BIC   logLik deviance df.resid 
##   2432.8   2494.6  -1205.4   2410.8     2014 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.4171 -0.8709  0.4271  0.6953  3.1317 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  category (Intercept) 0.1575   0.3969  
##  subjCode (Intercept) 0.8379   0.9154  
## Number of obs: 2025, groups:  category, 45; subjCode, 45
## 
## Fixed effects:
##                              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                   0.59605    0.15785   3.776 0.000159 ***
## kinds_c                       0.28680    0.12336   2.325 0.020073 *  
## avgFam_c                     -0.20244    0.37410  -0.541 0.588408    
## typ_c                        -0.01048    0.02070  -0.506 0.612745    
## judgment_c                    0.59903    0.10702   5.598 2.17e-08 ***
## simpson_c                    -0.35214    0.26208  -1.344 0.179063    
## NamingFreq_Study_c           -0.06906    0.12224  -0.565 0.572064    
## typ_c:judgment_c              0.04128    0.04227   0.976 0.328832    
## simpson_c:NamingFreq_Study_c -0.21845    0.12892  -1.694 0.090181 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) knds_c avgFm_ typ_c  jdgmn_ smpsn_ NmF_S_ typ_:_
## kinds_c      0.010                                                 
## avgFam_c    -0.002 -0.363                                          
## typ_c        0.001 -0.005 -0.010                                   
## judgment_c  -0.003  0.001  0.015 -0.008                            
## simpson_c    0.001  0.182 -0.394  0.003 -0.001                     
## NmngFrq_St_ -0.005 -0.001  0.000  0.000  0.006 -0.003              
## typ_c:jdgm_  0.000  0.042  0.015 -0.032  0.004 -0.008  0.004       
## smps_:NF_S_ -0.005 -0.003  0.000  0.000 -0.036 -0.009 -0.005 -0.027
summary(accuracy_randomSlope)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: isRight ~ kinds_c + avgFam_c + typ_c * judgment_c + simpson_c *  
##     NamingFreq_Study_c + (1 | category) + (typ_c * judgment_c |  
##     subjCode)
##    Data: tme2_full
## 
##      AIC      BIC   logLik deviance df.resid 
##   2098.9   2211.1  -1029.4   2058.9     2005 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.5545 -0.6264  0.2190  0.5116  2.7549 
## 
## Random effects:
##  Groups   Name             Variance Std.Dev. Corr             
##  category (Intercept)      0.055007 0.23454                   
##  subjCode (Intercept)      1.029561 1.01467                   
##           typ_c            0.005629 0.07503   0.34            
##           judgment_c       8.256849 2.87347   0.01  0.38      
##           typ_c:judgment_c 0.063433 0.25186  -0.14  0.78  0.78
## Number of obs: 2025, groups:  category, 45; subjCode, 45
## 
## Fixed effects:
##                              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                   0.95064    0.17311   5.492 3.99e-08 ***
## kinds_c                       0.12690    0.10719   1.184   0.2365    
## avgFam_c                     -0.21463    0.32467  -0.661   0.5086    
## typ_c                         0.01497    0.03085   0.485   0.6274    
## judgment_c                    0.78243    0.45510   1.719   0.0856 .  
## simpson_c                    -0.25077    0.22656  -1.107   0.2683    
## NamingFreq_Study_c           -0.08261    0.14082  -0.587   0.5574    
## typ_c:judgment_c              0.05578    0.06900   0.808   0.4188    
## simpson_c:NamingFreq_Study_c -0.15931    0.14578  -1.093   0.2745    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) knds_c avgFm_ typ_c  jdgmn_ smpsn_ NmF_S_ typ_:_
## kinds_c      0.006                                                 
## avgFam_c    -0.004 -0.356                                          
## typ_c        0.171 -0.001 -0.028                                   
## judgment_c   0.023 -0.003  0.004  0.142                            
## simpson_c   -0.001  0.171 -0.389  0.014  0.005                     
## NmngFrq_St_  0.004  0.009  0.013  0.009  0.010 -0.013              
## typ_c:jdgm_ -0.052  0.046 -0.004  0.258  0.440  0.005 -0.041       
## smps_:NF_S_ -0.005 -0.013  0.002 -0.007 -0.005 -0.035 -0.005 -0.025
## convergence code: 0
## Model failed to converge with max|grad| = 0.00830015 (tol = 0.001, component 1)

Findings from random-intercepts model:
Significant effect of kinds: accuracy increases as category members are more conceptually distinct
Significant effect of judgment: accuracy is higher for ‘remember’ judgments
Marginal interaction between nameability and naming frequency: people with higher naming frequency are more negatively affected by nameability

Simpson vs. naming frequency (raw)

ggplot(filter(tme2_full, NamingFreq_Study_num %in% c(1,2,3,4,5)), aes(x=simpson, y=isRight, color=as.factor(NamingFreq_Study_num)))+
  geom_point()+
  geom_smooth(method="glm", formula=y~x, alpha=.2)+
  theme_classic()

Simpson vs. naming frequency (median split)

tme2_medsplit <- tme2_full %>% 
  mutate(naming_median=median(NamingFreq_Study_num)) %>% 
  mutate(naming_medSplit=ifelse(NamingFreq_Study_num>naming_median,1,0))

ggplot(tme2_medsplit, aes(x=simpson, y=isRight, color=as.factor(naming_medSplit)))+
  geom_point()+
  geom_smooth(method="glm", formula=y~x)+
  theme_classic()

Graph subject-level interaction between typ, overall naming frequency, and judgment

Each person contributes 6 data points: their mean accuracy for typ = 2, 5, or 8, and judgment = remember or know

How do naming frequency during study, nameability, typicality, and judgment affect typicality shift?

Absolute value (random slope model has singular fit)

abs_typ_shift_randomSlope <- lmer(abs_typ_adv_choice ~kinds_c + avgFam_c + judgment_c*typ_c + simpson_c*NamingFreq_Study_c +
                                    (1|category) + (judgment_c*typ_c|subjCode),
                                  data=filter(tme2_full, isRight==0))
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -1.5e+02
abs_typ_shift_randomInt <- lmer(abs_typ_adv_choice ~kinds_c + avgFam_c + judgment_c*typ_c + simpson_c*NamingFreq_Study_c +
                                    (1|subjCode)+(1|category),
                                  data=filter(tme2_full, isRight==0))

anova(abs_typ_shift_randomInt,abs_typ_shift_randomSlope) #random slope does not improve model fit and has singular fit
## refitting model(s) with ML (instead of REML)
## Data: filter(tme2_full, isRight == 0)
## Models:
## abs_typ_shift_randomInt: abs_typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + 
## abs_typ_shift_randomInt:     simpson_c * NamingFreq_Study_c + (1 | subjCode) + (1 | category)
## abs_typ_shift_randomSlope: abs_typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + 
## abs_typ_shift_randomSlope:     simpson_c * NamingFreq_Study_c + (1 | category) + (judgment_c * 
## abs_typ_shift_randomSlope:     typ_c | subjCode)
##                           Df    AIC    BIC  logLik deviance  Chisq Chi Df
## abs_typ_shift_randomInt   12 3157.9 3213.6 -1567.0   3133.9              
## abs_typ_shift_randomSlope 21 3173.0 3270.4 -1565.5   3131.0 2.9138      9
##                           Pr(>Chisq)
## abs_typ_shift_randomInt             
## abs_typ_shift_randomSlope     0.9676
summary(abs_typ_shift_randomInt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: abs_typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c +  
##     simpson_c * NamingFreq_Study_c + (1 | subjCode) + (1 | category)
##    Data: filter(tme2_full, isRight == 0)
## 
## REML criterion at convergence: 3157.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7562 -0.7494 -0.1686  0.6374  2.6530 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  subjCode (Intercept) 7.447e-02 0.2728970
##  category (Intercept) 1.088e-07 0.0003299
##  Residual             3.539e+00 1.8813068
## Number of obs: 763, groups:  subjCode, 45; category, 45
## 
## Fixed effects:
##                               Estimate Std. Error        df t value
## (Intercept)                    3.15018    0.08221  43.62511  38.320
## kinds_c                       -0.21608    0.11084 744.92154  -1.949
## avgFam_c                       0.25240    0.33072 744.27049   0.763
## judgment_c                    -0.11021    0.14940 217.29292  -0.738
## typ_c                          0.25854    0.02806 745.23225   9.214
## simpson_c                     -0.24992    0.23125 749.10282  -1.081
## NamingFreq_Study_c             0.06780    0.06861  46.94793   0.988
## judgment_c:typ_c               0.01290    0.05684 751.36464   0.227
## simpson_c:NamingFreq_Study_c   0.15642    0.18284 748.09943   0.855
##                              Pr(>|t|)    
## (Intercept)                    <2e-16 ***
## kinds_c                        0.0516 .  
## avgFam_c                       0.4456    
## judgment_c                     0.4615    
## typ_c                          <2e-16 ***
## simpson_c                      0.2802    
## NamingFreq_Study_c             0.3281    
## judgment_c:typ_c               0.8205    
## simpson_c:NamingFreq_Study_c   0.3926    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) knds_c avgFm_ jdgmn_ typ_c  smpsn_ NmF_S_ jdg_:_
## kinds_c      0.087                                                 
## avgFam_c    -0.017 -0.335                                          
## judgment_c   0.086 -0.051  0.081                                   
## typ_c       -0.002  0.026  0.017  0.020                            
## simpson_c   -0.043  0.144 -0.371 -0.022  0.008                     
## NmngFrq_St_ -0.039 -0.001  0.032 -0.093  0.002 -0.043              
## jdgmnt_c:t_  0.014  0.094  0.075  0.001  0.081 -0.032  0.021       
## smps_:NF_S_ -0.036 -0.036 -0.006  0.018 -0.022 -0.044 -0.077 -0.013

Raw value (random slope model has singular fit)

typ_shift_randomSlope <- lmer(typ_adv_choice ~kinds_c+avgFam_c+judgment_c*typ_c+simpson_c*NamingFreq_Study_c+
                                    (1|category)+(typ_c*judgment_c|subjCode),
                                  data=filter(tme2_full, isRight==0))
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -8.2e+01
typ_shift_randomInt <- lmer(typ_adv_choice ~kinds_c+avgFam_c+judgment_c*typ_c+simpson_c*NamingFreq_Study_c+
                                    (1|subjCode)+(1|category),
                                  data=filter(tme2_full, isRight==0))

anova(typ_shift_randomInt,typ_shift_randomSlope) #random slope has singular fit and does not improve fit
## refitting model(s) with ML (instead of REML)
## Data: filter(tme2_full, isRight == 0)
## Models:
## typ_shift_randomInt: typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + simpson_c * 
## typ_shift_randomInt:     NamingFreq_Study_c + (1 | subjCode) + (1 | category)
## typ_shift_randomSlope: typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + simpson_c * 
## typ_shift_randomSlope:     NamingFreq_Study_c + (1 | category) + (typ_c * judgment_c | 
## typ_shift_randomSlope:     subjCode)
##                       Df    AIC    BIC  logLik deviance Chisq Chi Df
## typ_shift_randomInt   12 3563.9 3619.5 -1769.9   3539.9             
## typ_shift_randomSlope 21 3568.1 3665.5 -1763.0   3526.1 13.79      9
##                       Pr(>Chisq)
## typ_shift_randomInt             
## typ_shift_randomSlope       0.13
summary(typ_shift_randomInt)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + simpson_c *  
##     NamingFreq_Study_c + (1 | subjCode) + (1 | category)
##    Data: filter(tme2_full, isRight == 0)
## 
## REML criterion at convergence: 3556.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5773 -0.7167  0.1930  0.7877  1.8076 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subjCode (Intercept) 0.1025   0.3201  
##  category (Intercept) 0.3206   0.5662  
##  Residual             5.8166   2.4118  
## Number of obs: 763, groups:  subjCode, 45; category, 45
## 
## Fixed effects:
##                               Estimate Std. Error        df t value
## (Intercept)                    1.07377    0.13436  37.14709   7.991
## kinds_c                       -0.14067    0.19650  40.30703  -0.716
## avgFam_c                      -1.49139    0.59351  38.58857  -2.513
## judgment_c                    -0.08893    0.19145 198.85191  -0.464
## typ_c                          1.04934    0.03631 730.89230  28.898
## simpson_c                      1.17047    0.41478  38.22704   2.822
## NamingFreq_Study_c             0.16027    0.08644  45.96493   1.854
## judgment_c:typ_c              -0.13626    0.07521 746.56308  -1.812
## simpson_c:NamingFreq_Study_c  -0.05472    0.23589 727.01733  -0.232
##                              Pr(>|t|)    
## (Intercept)                  1.37e-09 ***
## kinds_c                       0.47819    
## avgFam_c                      0.01627 *  
## judgment_c                    0.64281    
## typ_c                         < 2e-16 ***
## simpson_c                     0.00753 ** 
## NamingFreq_Study_c            0.07013 .  
## judgment_c:typ_c              0.07042 .  
## simpson_c:NamingFreq_Study_c  0.81661    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) knds_c avgFm_ jdgmn_ typ_c  smpsn_ NmF_S_ jdg_:_
## kinds_c      0.051                                                 
## avgFam_c    -0.010 -0.353                                          
## judgment_c   0.067 -0.035  0.051                                   
## typ_c       -0.001  0.019  0.010  0.023                            
## simpson_c   -0.017  0.168 -0.382 -0.010  0.010                     
## NmngFrq_St_ -0.031 -0.003  0.027 -0.094  0.000 -0.030              
## jdgmnt_c:t_  0.024  0.071  0.046  0.010  0.084 -0.029  0.013       
## smps_:NF_S_ -0.024 -0.026 -0.005  0.015 -0.020 -0.031 -0.078 -0.020

Compare absolute value random-intercept models

#abs_model1 <- lmer(abs_typ_adv_choice ~ avgFam_c + (1|subjCode)+(1|category), data=filter(tme2_full, isRight==0))

abs_model1 <- lmer(abs_typ_adv_choice ~ kinds_c + avgFam_c + (1|subjCode)+(1|category),
                                  data=filter(tme2_full, isRight==0)) #singular fit
## boundary (singular) fit: see ?isSingular
abs_model2 <- lmer(abs_typ_adv_choice ~ kinds_c + avgFam_c + judgment_c*typ_c+simpson_c*NamingFreq_Study_c+
                                    (1|subjCode)+(1|category),
                                  data=filter(tme2_full, isRight==0))

anova(abs_model1, abs_model2)
## refitting model(s) with ML (instead of REML)
## Data: filter(tme2_full, isRight == 0)
## Models:
## abs_model1: abs_typ_adv_choice ~ kinds_c + avgFam_c + (1 | subjCode) + (1 | 
## abs_model1:     category)
## abs_model2: abs_typ_adv_choice ~ kinds_c + avgFam_c + judgment_c * typ_c + 
## abs_model2:     simpson_c * NamingFreq_Study_c + (1 | subjCode) + (1 | category)
##            Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)    
## abs_model1  6 3231.1 3258.9 -1609.5   3219.1                             
## abs_model2 12 3157.9 3213.6 -1567.0   3133.9 85.138      6  3.091e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Typicality shift model summaries

Absolute value:
Significant effect of kinds: typicality shift is smaller for categories that are more conceptually distinct
Significant effect of typ: typicality shift is greater when studied object was less typical (driven by typ=8) Absolute value model fits better when including all predictors (compared to model with only kind similarity and familiarity)

Raw value:
Significant effect of familiarity: for more familiar object categories, when people are wrong, they choose a less typical item than the one they studied
Significant effect of typ: typicality shift is greater when studied object was less typical
Significant effect of nameability: incorrect responses for more-nameable objects tend to be more typical than studied object Marginal effect of naming frequency: people who name more during study tend to choose more-typical objects when they’re wrong Marginal interaction between typicality and judgment: effect of studied typ on shift is smaller for ‘remember’ judgments than ‘know’ judgments (specifically from typ == 8)

Density plots for typicality shift depending on studied typ and judgment

Absolute value

meanshift2 <- filter(tme2_full2, isRight==0) %>% 
  group_by(typ,judgment) %>% 
  summarise(mean=mean(abs_typ_adv_choice))

ggplot(filter(tme2_full2, isRight==0), aes(x=abs_typ_adv_choice, color=as.factor(typ), fill=as.factor(typ)))+
  geom_density(alpha=.05)+
  # geom_histogram(aes(y=..density..), color="black", fill="white", alpha=.03)+
  geom_vline(data=meanshift2, aes(xintercept=mean, color=as.factor(typ)), linetype="dashed")+
  facet_grid(typ~judgment)+
  scale_x_continuous(name="Absolute value of typicality shift", limits=c(0,8),breaks=c(1,2,3,4,5,6,7,8))+
  theme_classic()

Raw value

meanshift_raw2 <- filter(tme2_full2, isRight==0) %>% 
  group_by(typ,judgment) %>% 
  summarise(mean=mean(abs_typ_adv_choice))

ggplot(filter(tme2_full2, isRight==0), aes(x=typ_adv_choice, color=as.factor(typ), fill=as.factor(typ)))+
  geom_density(alpha=.05)+
  # geom_histogram(aes(y=..density..), color="black", fill="white", alpha=.03)+
  geom_vline(data=meanshift_raw2, aes(xintercept=mean, color=as.factor(typ)), linetype="dashed")+
  facet_grid(typ~judgment)+
  scale_x_continuous(name="Raw value of typicality shift", limits=c(-8,8),breaks=c(-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8))+
  theme_classic()

Histograms for typicality shift depending on studied typ and judgment

Absolute value

meanshift2 <- filter(tme2_full2, isRight==0) %>% 
  group_by(typ,judgment) %>% 
  summarise(mean=mean(abs_typ_adv_choice))

ggplot(filter(tme2_full2, isRight==0), aes(x=abs_typ_adv_choice, color=as.factor(typ), fill=as.factor(typ)))+
  geom_histogram(alpha=.1)+
  geom_vline(data=meanshift2, aes(xintercept=mean, color=as.factor(typ)), linetype="dashed")+
  facet_grid(typ~judgment)+
  scale_x_continuous(name="Absolute value of typicality shift", limits=c(0,8),breaks=c(1,2,3,4,5,6,7,8))+
  theme_classic()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 12 rows containing missing values (geom_bar).

Raw value

meanshift_raw2 <- filter(tme2_full2, isRight==0) %>% 
  group_by(typ,judgment) %>% 
  summarise(mean=mean(typ_adv_choice))

ggplot(filter(tme2_full2, isRight==0), aes(x=typ_adv_choice, color=as.factor(typ), fill=as.factor(typ)))+
  geom_histogram(alpha=.1)+
  geom_vline(data=meanshift_raw2, aes(xintercept=mean, color=as.factor(typ)), linetype="dashed")+
  facet_grid(typ~judgment)+
  scale_x_continuous(name="Raw value of typicality shift", limits=c(-8,8),breaks=c(-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8))+
  theme_classic()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 12 rows containing missing values (geom_bar).