1 Set up R environment.

library(tidyverse)
library(ggplot2)
library(ggpubr)
library(plyr)
library(magick)
library(png)
library(lme4)
library(lmerTest)
library(irrNA)
library(psy)
library(coefficientalpha)
library(parameters)

2 Set the R working drectory to the main experiment directory.

setwd("/Users/adambarnas/Box/MetaAwareness/data/")  

3 Read in data files.

Rensink_RTs_likelihood_no_NA <- read_csv("Rensink_RTs_likelihood_no_NA.csv")
Ma_RTs_likelihood_no_NA <- read_csv("Ma_RTs_likelihood_no_NA.csv")
Wolfe1_RTs_likelihood_no_NA <- read_csv("Wolfe1_RTs_likelihood_no_NA.csv")
Wolfe2_RTs_likelihood_no_NA <- read_csv("Wolfe2_RTs_likelihood_no_NA.csv")

tbl_all <- rbind(Rensink_RTs_likelihood_no_NA, Ma_RTs_likelihood_no_NA, Wolfe1_RTs_likelihood_no_NA, Wolfe2_RTs_likelihood_no_NA)

Box_and_change_info <- read_csv("Box_and_change_info.csv")
Box_and_change_info <- Box_and_change_info %>% 
  filter(!grepl('catch', image)) %>% 
  separate(image,into=c('database', 'image'), sep = "([\\_])", extra = "merge")
Box_and_change_info$image <- lapply(Box_and_change_info$image, gsub, pattern='-a', replacement='')
Box_and_change_info$image <- as.character(Box_and_change_info$image)
tbl_all <- left_join(tbl_all, Box_and_change_info, by = "image")

Get total number of subjects and counts for each stimulus set

nrow(tbl_all %>% distinct(workerId,.keep_all = FALSE))
## [1] 219
count <- tbl_all %>%
  group_by(stim_set) %>%
  dplyr::summarize(count = n_distinct(workerId)) %>%
  spread(stim_set,count)
count
## # A tibble: 1 x 4
##      ma rensink wolfe1 wolfe2
##   <int>   <int>  <int>  <int>
## 1    29      21     62    110

4 Compute average likelihood rating.

tbl_all_subj_avg <- tbl_all %>%
  group_by(workerId,image) %>%
  dplyr::summarize(average = mean(likelihood_rating)) %>%
  spread(image,average) %>% 
  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
mean(tbl_all_subj_avg$subj_avg)
## [1] 3.12851

5 Results.

5.1 Some plots.

tbl_all$log <- log10(tbl_all$detection_rt)

corr <- tbl_all %>% 
  group_by(image) %>% 
  dplyr::summarize(log = mean(log), raw = mean(detection_rt), likelihood_rating = mean(likelihood_rating), change_type = unique(change_type), eccentricity = mean(eccentricity), box_percent = mean(box_percent), change_percent = mean(change_percent))

corr %>% 
  gghistogram(x = "likelihood_rating", fill = "#f7a800", add = "mean", bins = 9, xlab = ("Likelihood of Detecting Change"), ylab = ("Frequency"), ylim = c(0, 100))

ggsave("fig_1_rating_histogram.jpg")

corr %>% 
  gghistogram(x = "log", fill = "#f7a800", add = "mean", bins = 36, ylim = c(0,60), xlim = c(0.7,1.5), xlab = ("Log Change Detection RT (sec)"), ylab = ("Frequency"))

ggsave("fig_2_log_histogram.jpg")

corr %>% 
  gghistogram(x = "raw", fill = "#f7a800", add = "mean", bins = 36, ylim = c(0,80), xlim = c(0,30), xlab = ("Raw Change Detection RT (sec)"), ylab = ("Frequency"))

ggsave("fig_3_raw_histogram.jpg")

corr %>% 
  ggboxplot(x = "change_type", y = "log", label = "image", font.label = c(5, "plain", "black"), ylab = ("Log Change Detection RT (sec)"), xlab = "Change Type", ylim = c(0.75,1.4))

ggsave("fig_4_log_changetype.jpg")

corr %>% 
  ggboxplot(x = "change_type", y = "raw", label = "image", font.label = c(5, "plain", "black"), ylab = ("Raw Change Detection RT (sec)"), xlab = "Change Type", ylim = c(5,30))

ggsave("fig_5_raw_changetype.jpg")

5.2 Mixed effects modeling.

5.2.1 Likelihood rating predicting change blindness duration.

fit_log1 = Does likelihood rating predict log change blindness duration? A: Yes. fit_raw1 = Does likelihood rating predict raw change blindness duration? A: Yes.

fit_log1 <- lmer(log ~ likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all)
summary(fit_log1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log ~ likelihood_rating + (1 | workerId) + (1 | image) + (1 |  
##     stim_set)
##    Data: tbl_all
## 
## REML criterion at convergence: -5814.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8487 -0.5531 -0.1383  0.3340  5.2174 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept) 0.0017054 0.04130 
##  workerId (Intercept) 0.0117514 0.10840 
##  stim_set (Intercept) 0.0003399 0.01844 
##  Residual             0.0158299 0.12582 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        9.710e-01  1.384e-02  2.665e+00  70.183 1.98e-05 ***
## likelihood_rating -9.841e-03  1.807e-03  2.683e+03  -5.445 5.64e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## liklhd_rtng -0.405
ci(fit_log1)
##           Parameter CI     CI_low      CI_high
## 1       (Intercept) 95  0.9438773  0.998110187
## 2 likelihood_rating 95 -0.0133837 -0.006299196
corr %>%
  ggscatter(y = "log", x = "likelihood_rating", ylab = "Log Change Detection RT (sec)", xlab = "Likelihood of Detecting Change", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(0.75, 1.4))

ggsave("fig_6_likelihood_predict_log.jpg")

corr1 <- cor.test(corr$log, corr$likelihood_rating, method = c("pearson"))
corr1
## 
##  Pearson's product-moment correlation
## 
## data:  corr$log and corr$likelihood_rating
## t = -7.233, df = 478, p-value = 1.89e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3925539 -0.2310841
## sample estimates:
##        cor 
## -0.3140886
fit_raw1 <- lmer(detection_rt ~ likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all)
summary(fit_raw1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: detection_rt ~ likelihood_rating + (1 | workerId) + (1 | image) +  
##     (1 | stim_set)
##    Data: tbl_all
## 
## REML criterion at convergence: 31087.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7473 -0.4185 -0.1301  0.1484  9.1228 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept)  1.5595  1.2488  
##  workerId (Intercept)  7.9059  2.8118  
##  stim_set (Intercept)  0.3667  0.6055  
##  Residual             19.6149  4.4289  
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         10.58004    0.42883    3.42545  24.672 5.58e-05 ***
## likelihood_rating   -0.33206    0.06131 2415.40510  -5.416 6.68e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## liklhd_rtng -0.445
ci(fit_raw1)
##           Parameter CI     CI_low    CI_high
## 1       (Intercept) 95  9.7395530 11.4205365
## 2 likelihood_rating 95 -0.4522239 -0.2119055
corr %>%
  ggscatter(y = "raw", x = "likelihood_rating", ylab = "Raw Change Detection RT (sec)", xlab = "Likelihood of Detecting Change", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(5, 30))

ggsave("fig_7_likelihood_predict_raw.jpg")

Conclusion: Yes, ratings of change blindness ability predict change blindness duration.

5.2.5 Model comparisons.

Do likelihood ratings better predict change blindness duration beyond what is predicted from image-related properties (change size, eccentricity, and change type) alone?

Size of change. A: Yes.

model1a_log <- lmer(log ~  change_percent + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model1a_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ change_percent + (1 | workerId) + (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5800.9  -5761.6   2906.5  -5812.9     5204 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7724 -0.5460 -0.1409  0.3318  5.2184 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 1.940e-03 4.405e-02
##  workerId (Intercept) 1.186e-02 1.089e-01
##  stim_set (Intercept) 3.007e-10 1.734e-05
##  Residual             1.579e-02 1.256e-01
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)      0.951402   0.008092 272.746848 117.574  < 2e-16 ***
## change_percent  -0.003811   0.001288 468.123515  -2.959  0.00324 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chang_prcnt -0.225
model1b_log <- lmer(log ~  change_percent + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model1b_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ change_percent + likelihood_rating + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5827.8  -5781.9   2920.9  -5841.8     5203 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8544 -0.5508 -0.1412  0.3345  5.2205 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 1.667e-03 4.083e-02
##  workerId (Intercept) 1.174e-02 1.084e-01
##  stim_set (Intercept) 1.477e-10 1.215e-05
##  Residual             1.582e-02 1.258e-01
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        9.818e-01  9.753e-03  5.414e+02 100.669  < 2e-16 ***
## change_percent    -3.799e-03  1.238e-03  4.506e+02  -3.068  0.00229 ** 
## likelihood_rating -9.933e-03  1.802e-03  2.656e+03  -5.511 3.91e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_p
## chang_prcnt -0.184       
## liklhd_rtng -0.571  0.007
## convergence code: 0
## boundary (singular) fit: see ?isSingular
anova(model1a_log,model1b_log)
## Data: tbl_all
## Models:
## model1a_log: log ~ change_percent + (1 | workerId) + (1 | image) + (1 | stim_set)
## model1b_log: log ~ change_percent + likelihood_rating + (1 | workerId) + (1 | 
## model1b_log:     image) + (1 | stim_set)
##             npar     AIC     BIC logLik deviance  Chisq Df Pr(>Chisq)    
## model1a_log    6 -5800.9 -5761.6 2906.5  -5812.9                         
## model1b_log    7 -5827.8 -5781.9 2920.9  -5841.8 28.909  1  7.586e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model2a_raw <- lmer(detection_rt ~  change_percent + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model2a_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ change_percent + (1 | workerId) + (1 | image) +  
##     (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31117.1  31156.4 -15552.5  31105.1     5204 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6665 -0.4133 -0.1274  0.1467  9.0153 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 1.791e+00 1.3383490
##  workerId (Intercept) 8.025e+00 2.8328350
##  stim_set (Intercept) 2.431e-07 0.0004931
##  Residual             1.958e+01 4.4245791
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)      9.87817    0.22015 287.72798  44.871  < 2e-16 ***
## change_percent  -0.11328    0.04094 484.75324  -2.767  0.00587 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chang_prcnt -0.265
model2b_raw <- lmer(detection_rt ~  change_percent + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model2b_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ change_percent + likelihood_rating + (1 | workerId) +  
##     (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31090.4  31136.3 -15538.2  31076.4     5203 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7508 -0.4178 -0.1340  0.1473  9.1099 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept)  1.529679 1.23680 
##  workerId (Intercept)  7.933779 2.81670 
##  stim_set (Intercept)  0.006188 0.07866 
##  Residual             19.607618 4.42805 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         10.89898    0.29197    7.42153  37.329 1.02e-09 ***
## change_percent      -0.11173    0.03960  311.00739  -2.821  0.00509 ** 
## likelihood_rating   -0.33445    0.06117 2393.77505  -5.468 5.03e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_p
## chang_prcnt -0.199       
## liklhd_rtng -0.647  0.002
anova(model2a_raw,model2b_raw)
## Data: tbl_all
## Models:
## model2a_raw: detection_rt ~ change_percent + (1 | workerId) + (1 | image) + 
## model2a_raw:     (1 | stim_set)
## model2b_raw: detection_rt ~ change_percent + likelihood_rating + (1 | workerId) + 
## model2b_raw:     (1 | image) + (1 | stim_set)
##             npar   AIC   BIC logLik deviance  Chisq Df Pr(>Chisq)    
## model2a_raw    6 31117 31156 -15552    31105                         
## model2b_raw    7 31090 31136 -15538    31076 28.707  1  8.422e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Eccentricity. A: Yes.

model3a_log <- lmer(log ~  eccentricity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model3a_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ eccentricity + (1 | workerId) + (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5804.6  -5765.2   2908.3  -5816.6     5204 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7216 -0.5450 -0.1436  0.3361  5.2760 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept) 1.888e-03 0.043457
##  workerId (Intercept) 1.200e-02 0.109557
##  stim_set (Intercept) 4.659e-05 0.006826
##  Residual             1.579e-02 0.125645
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##               Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  9.231e-01  1.076e-02 2.595e+00  85.754  1.5e-05 ***
## eccentricity 1.124e-04  3.194e-05 4.150e+02   3.519 0.000481 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## eccentricty -0.570
model3b_log <- lmer(log ~  eccentricity + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model3b_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ eccentricity + likelihood_rating + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5831.9  -5786.0   2922.9  -5845.9     5203 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7989 -0.5485 -0.1394  0.3332  5.2834 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept) 1.617e-03 0.040209
##  workerId (Intercept) 1.185e-02 0.108844
##  stim_set (Intercept) 6.735e-05 0.008206
##  Residual             1.582e-02 0.125795
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        9.533e-01  1.219e-02  5.933e+00  78.183 3.61e-10 ***
## eccentricity       1.120e-04  3.064e-05  4.021e+02   3.656  0.00029 ***
## likelihood_rating -9.978e-03  1.798e-03  2.620e+03  -5.550 3.14e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) eccntr
## eccentricty -0.481       
## liklhd_rtng -0.454 -0.002
anova(model3a_log,model3b_log)
## Data: tbl_all
## Models:
## model3a_log: log ~ eccentricity + (1 | workerId) + (1 | image) + (1 | stim_set)
## model3b_log: log ~ eccentricity + likelihood_rating + (1 | workerId) + (1 | 
## model3b_log:     image) + (1 | stim_set)
##             npar     AIC     BIC logLik deviance  Chisq Df Pr(>Chisq)    
## model3a_log    6 -5804.6 -5765.2 2908.3  -5816.6                         
## model3b_log    7 -5831.9 -5786.0 2922.9  -5845.9 29.314  1  6.155e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model4a_raw <- lmer(detection_rt ~  eccentricity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model4a_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ eccentricity + (1 | workerId) + (1 | image) +  
##     (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31120.6  31160.0 -15554.3  31108.6     5204 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6368 -0.4171 -0.1304  0.1447  9.0504 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept)  1.7929  1.3390  
##  workerId (Intercept)  8.0242  2.8327  
##  stim_set (Intercept)  0.1867  0.4321  
##  Residual             19.5786  4.4248  
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##               Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  9.235e+00  3.753e-01 4.113e+00  24.608 1.27e-05 ***
## eccentricity 1.929e-03  1.048e-03 4.092e+02   1.841   0.0663 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## eccentricty -0.533
model4b_raw <- lmer(detection_rt ~  eccentricity + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model4b_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ eccentricity + likelihood_rating + (1 | workerId) +  
##     (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31094.0  31139.9 -15540.0  31080.0     5203 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7175 -0.4196 -0.1316  0.1487  9.1475 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept)  1.5364  1.2395  
##  workerId (Intercept)  7.9432  2.8184  
##  stim_set (Intercept)  0.1577  0.3971  
##  Residual             19.6078  4.4281  
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        1.027e+01  4.060e-01  7.574e+00  25.304 1.36e-08 ***
## eccentricity       1.923e-03  1.010e-03  4.003e+02   1.904   0.0576 .  
## likelihood_rating -3.337e-01  6.121e-02  2.403e+03  -5.452 5.49e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) eccntr
## eccentricty -0.474       
## liklhd_rtng -0.466 -0.002
anova(model4a_raw,model4b_raw)
## Data: tbl_all
## Models:
## model4a_raw: detection_rt ~ eccentricity + (1 | workerId) + (1 | image) + 
## model4a_raw:     (1 | stim_set)
## model4b_raw: detection_rt ~ eccentricity + likelihood_rating + (1 | workerId) + 
## model4b_raw:     (1 | image) + (1 | stim_set)
##             npar   AIC   BIC logLik deviance  Chisq Df Pr(>Chisq)    
## model4a_raw    6 31121 31160 -15554    31109                         
## model4b_raw    7 31094 31140 -15540    31080 28.571  1  9.032e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Type of change. A: Yes.

model5a_log <- lmer(log ~  change_type + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model5a_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ change_type + (1 | workerId) + (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5797.1  -5738.1   2907.6  -5815.1     5201 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7466 -0.5536 -0.1380  0.3334  5.1830 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept) 0.001902 0.04361 
##  workerId (Intercept) 0.011977 0.10944 
##  stim_set (Intercept) 0.000000 0.00000 
##  Residual             0.015790 0.12566 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              0.961522   0.010126 476.541412  94.957  < 2e-16 ***
## change_typedisappear    -0.017518   0.008438 443.002675  -2.076  0.03846 *  
## change_typemovement     -0.029171   0.012616 453.564508  -2.312  0.02121 *  
## change_typereplacement  -0.021801   0.030943 450.793276  -0.705  0.48145    
## change_typesize         -0.048274   0.017669 461.168650  -2.732  0.00653 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_typd chng_typm chng_typr
## chng_typdsp -0.614                              
## chng_typmvm -0.306  0.354                       
## chng_typrpl -0.128  0.144     0.168             
## chang_typsz -0.220  0.246     0.289     0.161   
## convergence code: 0
## boundary (singular) fit: see ?isSingular
model5b_log <- lmer(log ~  change_type + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model5b_log)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: log ~ change_type + likelihood_rating + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  -5831.2  -5765.6   2925.6  -5851.2     5200 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8352 -0.5519 -0.1338  0.3269  5.1783 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept) 0.001558 0.03947 
##  workerId (Intercept) 0.011768 0.10848 
##  stim_set (Intercept) 0.000000 0.00000 
##  Residual             0.015844 0.12587 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)             9.983e-01  1.152e-02  7.389e+02  86.693  < 2e-16 ***
## change_typedisappear   -1.878e-02  8.013e-03  4.188e+02  -2.344 0.019566 *  
## change_typemovement    -4.254e-02  1.219e-02  4.585e+02  -3.490 0.000530 ***
## change_typereplacement -2.835e-02  2.943e-02  4.381e+02  -0.963 0.335978    
## change_typesize        -5.853e-02  1.689e-02  4.505e+02  -3.467 0.000577 ***
## likelihood_rating      -1.134e-02  1.827e-03  2.858e+03  -6.207 6.19e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_typd chng_typm chng_typr chng_typs
## chng_typdsp -0.525                                        
## chng_typmvm -0.344  0.350                                 
## chng_typrpl -0.126  0.144     0.174                       
## chang_typsz -0.234  0.245     0.304     0.167             
## liklhd_rtng -0.519  0.025     0.181     0.037     0.100   
## convergence code: 0
## boundary (singular) fit: see ?isSingular
anova(model5a_log,model5b_log)
## Data: tbl_all
## Models:
## model5a_log: log ~ change_type + (1 | workerId) + (1 | image) + (1 | stim_set)
## model5b_log: log ~ change_type + likelihood_rating + (1 | workerId) + (1 | 
## model5b_log:     image) + (1 | stim_set)
##             npar     AIC     BIC logLik deviance Chisq Df Pr(>Chisq)    
## model5a_log    9 -5797.1 -5738.1 2907.6  -5815.1                        
## model5b_log   10 -5831.2 -5765.6 2925.6  -5851.2 36.07  1  1.904e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model6a_raw <- lmer(detection_rt ~  change_type + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model6a_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ change_type + (1 | workerId) + (1 | image) + (1 |  
##     stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31116.3  31175.4 -15549.2  31098.3     5201 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6339 -0.4143 -0.1248  0.1494  9.0205 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 1.716e+00 1.310e+00
##  workerId (Intercept) 8.109e+00 2.848e+00
##  stim_set (Intercept) 3.678e-18 1.918e-09
##  Residual             1.958e+01 4.425e+00
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                        Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)             10.3528     0.2927 509.4464  35.370  < 2e-16 ***
## change_typedisappear    -0.7436     0.2677 448.5829  -2.777  0.00571 ** 
## change_typemovement     -1.0766     0.4064 452.5058  -2.649  0.00835 ** 
## change_typereplacement  -1.1019     1.0027 452.8482  -1.099  0.27238    
## change_typesize         -1.6335     0.5698 459.0375  -2.867  0.00433 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_typd chng_typm chng_typr
## chng_typdsp -0.675                              
## chng_typmvm -0.343  0.361                       
## chng_typrpl -0.143  0.147     0.165             
## chang_typsz -0.247  0.252     0.285     0.157   
## convergence code: 0
## boundary (singular) fit: see ?isSingular
model6b_raw <- lmer(detection_rt ~  change_type + likelihood_rating + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all, REML=FALSE)
summary(model6b_raw)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: detection_rt ~ change_type + likelihood_rating + (1 | workerId) +  
##     (1 | image) + (1 | stim_set)
##    Data: tbl_all
## 
##      AIC      BIC   logLik deviance df.resid 
##  31081.3  31146.9 -15530.6  31061.3     5200 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7248 -0.4202 -0.1323  0.1525  9.1105 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept)  1.378   1.174   
##  workerId (Intercept)  7.947   2.819   
##  stim_set (Intercept)  0.000   0.000   
##  Residual             19.631   4.431   
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              11.61454    0.34890  852.54452  33.289  < 2e-16 ***
## change_typedisappear     -0.78907    0.25516  428.77478  -3.092 0.002115 ** 
## change_typemovement      -1.52552    0.39424  464.67523  -3.869 0.000125 ***
## change_typereplacement   -1.31618    0.95681  445.96898  -1.376 0.169638    
## change_typesize          -1.97785    0.54626  454.72491  -3.621 0.000327 ***
## likelihood_rating        -0.38749    0.06189 2562.56277  -6.261 4.48e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) chng_typd chng_typm chng_typr chng_typs
## chng_typdsp -0.556                                        
## chng_typmvm -0.376  0.358                                 
## chng_typrpl -0.136  0.147     0.171                       
## chang_typsz -0.255  0.251     0.301     0.163             
## liklhd_rtng -0.583  0.029     0.186     0.038     0.103   
## convergence code: 0
## boundary (singular) fit: see ?isSingular
anova(model6a_raw,model6b_raw)
## Data: tbl_all
## Models:
## model6a_raw: detection_rt ~ change_type + (1 | workerId) + (1 | image) + (1 | 
## model6a_raw:     stim_set)
## model6b_raw: detection_rt ~ change_type + likelihood_rating + (1 | workerId) + 
## model6b_raw:     (1 | image) + (1 | stim_set)
##             npar   AIC   BIC logLik deviance  Chisq Df Pr(>Chisq)    
## model6a_raw    9 31116 31175 -15549    31098                         
## model6b_raw   10 31081 31147 -15531    31061 37.036  1   1.16e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion: Change blindness duration is better predicted by the size of the change, the eccentricity of the change, and the type of the change when accounting for likelihood ratings.

5.3 Predicting self vs. other.

5.3.1 Read in data files.

tbl_all_mod <- tbl_all[, -c(8,9,10,11,12,13,14,16,17,19,20,21,22,23,24)]
names(tbl_all_mod)[4] <- "raw_CB_duration"
names(tbl_all_mod)[11] <- "log_CB_duration"
tbl_all_mod$group = "return"

tbl_all_raw_avg <- tbl_all_mod %>% 
  group_by(workerId,image) %>%
  dplyr::summarize(raw_CB_duration = mean(raw_CB_duration)) %>%
  spread(image,raw_CB_duration) %>% 
  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
mean(tbl_all_raw_avg$subj_avg)
## [1] 9.597852
tbl_all_raw_avg <- data.frame(raw_CB_duration = colMeans(tbl_all_raw_avg[,2:481], na.rm = TRUE))
tbl_all_raw_avg <- tibble::rownames_to_column(tbl_all_raw_avg, "image")
#tbl_all_raw_avg

tbl_all_log_avg <- tbl_all_mod %>% 
  group_by(workerId,image) %>%
  dplyr::summarize(log_CB_duration = mean(log_CB_duration)) %>%
  spread(image,log_CB_duration) %>% 
  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
mean(tbl_all_log_avg$subj_avg)
## [1] 0.942007
tbl_all_log_avg <- data.frame(log_CB_duration = colMeans(tbl_all_log_avg[,2:481], na.rm = TRUE))
tbl_all_log_avg <- tibble::rownames_to_column(tbl_all_log_avg, "image")
#tbl_all_log_avg

return_likelihood_avg <- tbl_all_mod %>% 
  group_by(workerId,image) %>%
  dplyr::summarize(likelihood_rating = mean(likelihood_rating)) %>%
  spread(image,likelihood_rating) %>% 
  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
mean(return_likelihood_avg$subj_avg)
## [1] 3.12851
return_likelihood_avg <- data.frame(likelihood_rating = colMeans(return_likelihood_avg[,2:481], na.rm = TRUE))
return_likelihood_avg <- tibble::rownames_to_column(return_likelihood_avg, "image")
return_likelihood_avg$group = "Original"
#return_likelihood_avg

return <- left_join(tbl_all_log_avg, return_likelihood_avg, by = "image")

corr2 <- cor.test(return$log_CB_duration, return$likelihood_rating, method = c("pearson"))
corr2
## 
##  Pearson's product-moment correlation
## 
## data:  return$log_CB_duration and return$likelihood_rating
## t = -7.385, df = 478, p-value = 6.833e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3981169 -0.2373160
## sample estimates:
##        cor 
## -0.3200193
rensink_new <- list.files(path = "./Rensink_New", pattern = "*.csv", full.names = T, ignore.case = F) %>%
  map_df(~read.csv(., colClasses=c("gender..m.f."="character", "a"="character", "tp_a"="character")))
nrow(rensink_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 36
rensink_new <- rensink_new %>% 
  group_by(workerId) %>% 
  filter(any(Airplane_resp.keys >= 4) & any(Boat_resp.keys >= 4) & any(Cow_resp.keys >= 4) & any(Garden_resp.keys <= 3))
nrow(rensink_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 20
rensink_new = subset(rensink_new, select = c(user_resp.keys,user_resp.rt,workerId,image_a))
col_idx <- grep("workerId", names(rensink_new))
rensink_new <- rensink_new[, c(col_idx, (1:ncol(rensink_new))[-col_idx])]
rensink_new <- data.frame(na.omit(rensink_new))
rensink_new <- rensink_new %>%
separate(image_a,into=c('database', 'image'), sep = "([\\_])", extra = "merge")
rensink_new$image <- lapply(rensink_new$image, gsub, pattern='-a_w_outline.jpg', replacement='')
rensink_new <- rensink_new %>%  
    mutate(image = as.character(image))

ma_new <- list.files(path = "./Ma_New", pattern = "*.csv", full.names = T, ignore.case = F) %>%
  map_df(~read.csv(., colClasses=c("gender..m.f."="character", "a"="character", "tp_a"="character")))
nrow(ma_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 45
ma_new <- ma_new %>% 
  group_by(workerId) %>% 
  filter(any(Airplane_resp.keys >= 4) & any(Boat_resp.keys >= 4) & any(Cow_resp.keys >= 4) & any(Garden_resp.keys <= 3))
nrow(ma_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 37
ma_new = subset(ma_new, select = c(user_resp.keys,user_resp.rt,workerId,image_a))
col_idx <- grep("workerId", names(ma_new))
ma_new <- ma_new[, c(col_idx, (1:ncol(ma_new))[-col_idx])]
ma_new <- data.frame(na.omit(ma_new))
ma_new <- ma_new %>%
separate(image_a,into=c('database', 'image'), sep = "([\\_])", extra = "merge")
ma_new$image <- lapply(ma_new$image, gsub, pattern='-a_w_outline.jpg', replacement='')
ma_new <- ma_new %>%  
    mutate(image = as.character(image))

wolfe1_new <- list.files(path = "./Wolfe1_New", pattern = "*.csv", full.names = T, ignore.case = F) %>%
  map_df(~read.csv(., colClasses=c("gender..m.f."="character", "a"="character", "tp_a"="character")))
nrow(wolfe1_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 88
wolfe1_new <- wolfe1_new %>% 
  group_by(workerId) %>% 
  filter(any(Airplane_resp.keys >= 4) & any(Boat_resp.keys >= 4) & any(Cow_resp.keys >= 4) & any(Garden_resp.keys <= 3))
nrow(wolfe1_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 64
wolfe1_new = subset(wolfe1_new, select = c(user_resp.keys,user_resp.rt,workerId,image_a))
col_idx <- grep("workerId", names(wolfe1_new))
wolfe1_new <- wolfe1_new[, c(col_idx, (1:ncol(wolfe1_new))[-col_idx])]
wolfe1_new <- data.frame(na.omit(wolfe1_new))
wolfe1_new <- wolfe1_new %>%
separate(image_a,into=c('database', 'image'), sep = "([\\_])")
wolfe1_new$image <- lapply(wolfe1_new$image, gsub, pattern='-a', replacement='')
wolfe1_new <- wolfe1_new %>%  
    mutate(image = as.character(image))
wolfe1_new$database = "wolfe1"

wolfe2_new <- list.files(path = "./Wolfe2_New", pattern = "*.csv", full.names = T, ignore.case = F) %>%
  map_df(~read.csv(., colClasses=c("gender..m.f."="character", "a"="character", "tp_a"="character")))
nrow(wolfe2_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 174
wolfe2_new <- wolfe2_new %>% 
  group_by(workerId) %>% 
  filter(any(Airplane_resp.keys >= 4) & any(Boat_resp.keys >= 4) & any(Cow_resp.keys >= 4) & any(Garden_resp.keys <= 3))
nrow(wolfe2_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 109
wolfe2_new = subset(wolfe2_new, select = c(user_resp.keys,user_resp.rt,workerId,image_a))
col_idx <- grep("workerId", names(wolfe2_new))
wolfe2_new <- wolfe2_new[, c(col_idx, (1:ncol(wolfe2_new))[-col_idx])]
wolfe2_new <- data.frame(na.omit(wolfe2_new))
wolfe2_new <- wolfe2_new %>%
separate(image_a,into=c('database', 'image'), sep = "([\\_])", extra = "merge")
wolfe2_new$image <- lapply(wolfe2_new$image, gsub, pattern='-a_w_outline.jpg', replacement='')
wolfe2_new <- wolfe2_new %>%  
    mutate(image = as.character(image))
wolfe2_new$database = "wolfe2"

new_ratings <- rbind(rensink_new, ma_new, wolfe1_new, wolfe2_new)
names(new_ratings)[2] <- "likelihood_rating"
names(new_ratings)[3] <- "likelihood_rt"
names(new_ratings)[4] <- "stim_set"

new_ratings <- left_join(new_ratings, tbl_all_log_avg, by = "image")
new_ratings <- left_join(new_ratings, tbl_all_raw_avg, by = "image")

#new_subj_avg <- new_ratings %>%
#  group_by(workerId,image) %>%
#  dplyr::summarize(average = mean(likelihood_rating)) %>%
#  spread(image,average) %>% 
#  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
#mean(new_subj_avg$subj_avg)

#new_img_avg <- data.frame(new_img_avg = colMeans(new_subj_avg[,2:483], na.rm = TRUE))
#new_img_avg <- tibble::rownames_to_column(new_img_avg, "image")

new_ratings_mod <- left_join(new_ratings, Box_and_change_info, by = "image")
new_ratings_mod <- new_ratings_mod[, -c(8,9,10,11,12,13,14,16,17,19,20,21,22,23,24)]

new_likelihood_avg <- new_ratings_mod %>% 
  group_by(workerId,image) %>%
  dplyr::summarize(likelihood_rating = mean(likelihood_rating)) %>%
  spread(image,likelihood_rating) %>% 
  mutate(subj_avg = rowMeans(.[-1], na.rm = TRUE))
mean(new_likelihood_avg$subj_avg)
## [1] 3.031667
new_likelihood_avg <- data.frame(likelihood_rating = colMeans(new_likelihood_avg[,2:483], na.rm = TRUE))
new_likelihood_avg <- tibble::rownames_to_column(new_likelihood_avg, "image")
new_likelihood_avg$group = "New"
#new_likelihood_avg

new <- left_join(tbl_all_log_avg, new_likelihood_avg, by = "image")

corr3 <- cor.test(new$log_CB_duration, new$likelihood_rating, method = c("pearson"))
corr3
## 
##  Pearson's product-moment correlation
## 
## data:  new$log_CB_duration and new$likelihood_rating
## t = -8.3381, df = 478, p-value = 8.109e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4320623 -0.2756317
## sample estimates:
##        cor 
## -0.3563415
return_new_comparison <- rbind.fill(new, return)

all_change_type<- read_csv("All_change_type.csv", col_types = cols())
new_ratings_mod <- left_join(new_ratings_mod, all_change_type, by = "image")
new_ratings_mod$group = "new"

return_new <- rbind.fill(tbl_all_mod, new_ratings_mod)
write.csv(return_new, "return_new_data.csv", row.names=FALSE)

nrow(return_new %>% distinct(workerId,.keep_all = FALSE))
## [1] 449

5.3.2 Analyze and plot.

#new_avg <- return_new %>%
#  filter(group == "new") %>%
#  group_by(image) %>%
#  summarise_at(vars(likelihood_rating), funs(mean(., na.rm=TRUE)))
#names(new_avg)[2] <- "new_avg_likelihood_rating"

#return_new <- return_new %>% 
#  filter (group == "return")
#return_new <- left_join(return_new, new_avg, by = "image")

#fit_return_new_log <- lmer(log_CB_duration ~ likelihood_rating + new_avg_likelihood_rating + (1|workerId) + (1|image) + (1|stim_set), #data=return_new)
#summary(fit_return_new_log)
#ci(fit_return_new_log)

#fit_return_new_raw <- lmer(raw_CB_duration ~ likelihood_rating + new_avg_likelihood_rating + (1|workerId) + (1|image) + (1|stim_set), #data=return_new)
#summary(fit_return_new_raw)
#ci(fit_return_new_raw)

fit <- lmer(log_CB_duration ~ likelihood_rating + group + (1|workerId) + (1|image) + (1|stim_set), data=return_new)
summary(fit)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_CB_duration ~ likelihood_rating + group + (1 | workerId) +  
##     (1 | image) + (1 | stim_set)
##    Data: return_new
## 
## REML criterion at convergence: -23694.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.2859 -0.2197 -0.0194  0.1537  8.2086 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept) 0.004713 0.06865 
##  workerId (Intercept) 0.005203 0.07213 
##  stim_set (Intercept) 0.001123 0.03351 
##  Residual             0.006570 0.08106 
## Number of obs: 12111, groups:  image, 480; workerId, 449; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        9.481e-01  1.816e-02  3.051e+00  52.209 1.32e-05 ***
## likelihood_rating -2.404e-03  8.532e-04  1.208e+04  -2.818  0.00485 ** 
## groupreturn       -2.084e-03  7.014e-03  4.333e+02  -0.297  0.76649    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lklhd_
## liklhd_rtng -0.144       
## groupreturn -0.185 -0.001
ci(fit)
##           Parameter CI       CI_low       CI_high
## 1       (Intercept) 95  0.912477663  0.9836598757
## 2 likelihood_rating 95 -0.004075946 -0.0007316492
## 3       groupreturn 95 -0.015832437  0.0116637091
#return_new_corr <- return_new %>% 
#  group_by(image,group) %>% 
#  dplyr::summarize(likelihood_rating = mean(likelihood_rating), new_avg_likelihood_rating = mean(new_avg_likelihood_rating))

return_new_comparison %>% 
  ggscatter(y = "log_CB_duration", x = "likelihood_rating", color = "group", ylab = "Log Change Detection RT (sec)", xlab = "Likelihood of Detecting Change", palette = c("#0d2240", "#00a8e1", "#f7a800", "#dfdddc", "#E31818", "#0d2240"), add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(0.75, 1.4)) + stat_cor(aes(color = group), label.x = 4, label.y = c(1.4, 1.3), method = "pearson")

return_new_comparison %>% 
  ggscatter(y = "log_CB_duration", x = "likelihood_rating", color = "group", ylab = "Log Change Detection RT (sec)", xlab = "Likelihood of Detecting Change", palette = c("#0d2240", "#00a8e1", "#f7a800", "#dfdddc", "#E31818", "#0d2240"), add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(0.75, 1.4)) + theme(legend.title=element_blank())

ggsave("fig_19_return_new.jpg")

return_new_corr <- return_new %>% 
  group_by(image,group) %>% 
  dplyr::summarize(likelihood_rating = mean(likelihood_rating)) %>%
  spread(group,likelihood_rating) 

return_new_corr %>%
  ggscatter(y = "return", x = "new", ylab = "Returning Subject Rating", xlab = "New Subject Rating", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(1, 5)) + stat_cor(method = "pearson", label.x = 1, label.y = 5)

return_new_corr %>%
  ggscatter(y = "return", x = "new", ylab = "Own Subject Rating", xlab = "Other Subject Rating", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(1, 5))

ggsave("fig_18_return_new.jpg")

5.4 Semantic analyses.

5.4.1 Summary of descriptions.

rensink_semantic_final_descriptions_count <- read_csv("rensink_semantic_final_descriptions_count.csv")
ma_semantic_final_descriptions_count <- read_csv("ma_semantic_final_descriptions_count.csv")
wolfe1_semantic_final_descriptions_count <- read_csv("wolfe1_semantic_final_descriptions_count.csv")
wolfe2_semantic_final_descriptions_count <- read_csv("wolfe2_semantic_final_descriptions_count.csv")

descriptions <- rbind(rensink_semantic_final_descriptions_count, ma_semantic_final_descriptions_count, wolfe1_semantic_final_descriptions_count, wolfe2_semantic_final_descriptions_count)

# This is the average number of descriptions for all 480 image pairs.
mean(descriptions$count)
## [1] 5.582988
# This is a frequency distrubtion of the number of descriptions for all 480 image pairs. For example, 1 image pair had 3 descriptions, 166 image pairs had 4 descriptions, etc.
descriptions_frequency_all <- data.frame(table(descriptions$count))
colnames(descriptions_frequency_all) <- c("count", "frequency")
descriptions_frequency_all 
##    count frequency
## 1      3         1
## 2      4       166
## 3      5       120
## 4      6        75
## 5      7        55
## 6      8        29
## 7      9        18
## 8     10         7
## 9     11         7
## 10    12         4
# This is the average number of descriptions for image pairs in each stimulus set.
descriptions_average <- descriptions %>%
  group_by(stim_set) %>%
  dplyr::summarize(average = mean(count)) %>%
  spread(stim_set,average)
descriptions_average 
## # A tibble: 1 x 4
##      ma rensink wolfe1 wolfe2
##   <dbl>   <dbl>  <dbl>  <dbl>
## 1  7.48    6.25   5.73   4.88
# This is a frequency distrubtion of the number of descriptions for the Ma stimuli.
descriptions_ma <- descriptions %>% 
  filter(stim_set == "ma")
descriptions_ma <- data.frame(table(descriptions_ma$count))
colnames(descriptions_ma) <- c("count", "frequency")
descriptions_ma 
##   count frequency
## 1     4         4
## 2     5        10
## 3     6        18
## 4     7         7
## 5     8         8
## 6     9         6
## 7    10         5
## 8    11         7
## 9    12         4
# This is a frequency distrubtion of the number of descriptions for the Rensink stimuli.
descriptions_rensink <- descriptions %>% 
  filter(stim_set == "rensink")
descriptions_rensink <- data.frame(table(descriptions_rensink$count))
colnames(descriptions_rensink) <- c("count", "frequency")
descriptions_rensink 
##   count frequency
## 1     4         3
## 2     5        10
## 3     6        15
## 4     7        14
## 5     8         5
## 6    10         1
# This is a frequency distrubtion of the number of descriptions for the Wolfe1 stimuli.
descriptions_wolfe1 <- descriptions %>% 
  filter(stim_set == "wolfe1")
descriptions_wolfe1 <- data.frame(table(descriptions_wolfe1$count))
colnames(descriptions_wolfe1) <- c("count", "frequency")
descriptions_wolfe1 
##   count frequency
## 1     3         1
## 2     4        28
## 3     5        31
## 4     6        17
## 5     7        17
## 6     8         9
## 7     9         7
## 8    10         1
# This is a frequency distrubtion of the number of descriptions for the Wolfe2 stimuli.
descriptions_wolfe2 <- descriptions %>% 
  filter(stim_set == "wolfe2")
descriptions_wolfe2 <- data.frame(table(descriptions_wolfe2$count))
colnames(descriptions_wolfe2) <- c("count", "frequency")
descriptions_wolfe2 
##   count frequency
## 1     4       131
## 2     5        69
## 3     6        25
## 4     7        17
## 5     8         7
## 6     9         5

5.4.2 Summary of similarity ratings.

rensink_similarity_descriptions_count <- read_csv("rensink_similarity_descriptions_count.csv")
ma_similarity_descriptions_count <- read_csv("ma_similarity_descriptions_count.csv")
wolfe1_similarity_descriptions_count <- read_csv("wolfe1_similarity_descriptions_count.csv")
wolfe2_similarity_descriptions_count <- read_csv("wolfe2_similarity_descriptions_count.csv")

similarity <- rbind(rensink_similarity_descriptions_count, ma_similarity_descriptions_count, wolfe1_similarity_descriptions_count, wolfe2_similarity_descriptions_count)

# This is the average number of ratings for all 2691 descriptions.
mean(similarity$count)
## [1] 3.924192
# This is a frequency distrubtion of the number of ratings for all 2691 descriptions. For example, 1347 descriptions had 3 ratings, 762 descriptions had 4 ratings, etc.
similarity_frequency_all <- data.frame(table(similarity$count))
colnames(similarity_frequency_all) <- c("count", "frequency")
similarity_frequency_all
##    count frequency
## 1      3      1347
## 2      4       762
## 3      5       296
## 4      6       148
## 5      7        55
## 6      8        48
## 7      9        22
## 8     10         8
## 9     11         4
## 10    12         1
# This is the average number of ratings for descriptions in each stimulus set. For example, every description in the Ma sitmulus set was rated an average of 4.42 times.
similarity_average <- similarity %>%
  group_by(stim_set) %>%
  dplyr::summarize(average = mean(count)) %>%
  spread(stim_set,average)
similarity_average
## # A tibble: 1 x 4
##      ma rensink wolfe1 wolfe2
##   <dbl>   <dbl>  <dbl>  <dbl>
## 1  4.42     3.7   4.10   3.68
# This is a frequency distrubtion of the number of ratings for the Ma descriptions.
similarity_ma <- similarity %>% 
  filter(stim_set == "ma")
similarity_ma <- data.frame(table(similarity_ma$count))
colnames(similarity_ma) <- c("count", "frequency")
similarity_ma
##   count frequency
## 1     3       176
## 2     4       153
## 3     5        79
## 4     6        52
## 5     7        29
## 6     8        16
## 7     9         9
## 8    10         1
## 9    11         1
# This is a frequency distrubtion of the number of ratings for the Rensink descriptions.
similarity_rensink <- similarity %>% 
  filter(stim_set == "rensink")
similarity_rensink <- data.frame(table(similarity_rensink$count))
colnames(similarity_rensink) <- c("count", "frequency")
similarity_rensink
##   count frequency
## 1     3       166
## 2     4        83
## 3     5        30
## 4     6        17
## 5     7         4
# This is a frequency distrubtion of the number of ratings for the Wolfe1 descriptions.
similarity_wolfe1 <- similarity %>% 
  filter(stim_set == "wolfe1")
similarity_wolfe1 <- data.frame(table(similarity_wolfe1$count))
colnames(similarity_wolfe1) <- c("count", "frequency")
similarity_wolfe1
##    count frequency
## 1      3       272
## 2      4       196
## 3      5        87
## 4      6        43
## 5      7         8
## 6      8        20
## 7      9         3
## 8     10         4
## 9     11         2
## 10    12         1
# This is a frequency distrubtion of the number of ratings for the Wolfe2 descriptions.
similarity_wolfe2 <- similarity %>% 
  filter(stim_set == "wolfe2")
similarity_wolfe2 <- data.frame(table(similarity_wolfe2$count))
colnames(similarity_wolfe2) <- c("count", "frequency")
similarity_wolfe2
##   count frequency
## 1     3       733
## 2     4       330
## 3     5       100
## 4     6        36
## 5     7        14
## 6     8        12
## 7     9        10
## 8    10         3
## 9    11         1

5.4.3 Read in data.

rensink_semantic_similarity_rating <- read_csv("rensink_semantic_similarity_rating.csv")
ma_semantic_similarity_rating <- read_csv("ma_semantic_similarity_rating.csv")
wolfe1_semantic_similarity_rating <- read_csv("wolfe1_semantic_similarity_rating.csv")
wolfe2_semantic_similarity_rating <- read_csv("wolfe2_semantic_similarity_rating.csv")

similarity_ratings <- rbind(rensink_semantic_similarity_rating, ma_semantic_similarity_rating, wolfe1_semantic_similarity_rating, wolfe2_semantic_similarity_rating)

tbl_all_2.0 <- left_join(return_new, similarity_ratings, by = "image")

5.4.4 Analyze semantic similarity ratings.

fit_log4 = Does semantic similarity predict log change blindness duration for returning subjects? A: No fit_log5 = Does semantic similarity predict likelihood rating for returning subjects? A: Yes fit_log6 = Does semantic similarity predict log change blindness duration for new subjects? A: No fit_log7 = Does semantic similarity predict likelihood rating for new subjects? A: Yes

tbl_all_2.0_return <- tbl_all_2.0 %>% 
  filter(group == "return")

fit_log4 <- lmer(log_CB_duration ~ semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_return)
summary(fit_log4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_CB_duration ~ semantic_similarity + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all_2.0_return
## 
## REML criterion at convergence: -5789.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7596 -0.5463 -0.1420  0.3378  5.2149 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept) 0.0019742 0.04443 
##  workerId (Intercept) 0.0118601 0.10890 
##  stim_set (Intercept) 0.0003878 0.01969 
##  Residual             0.0157927 0.12567 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                      Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)         9.222e-01  2.899e-02 3.795e+01  31.816   <2e-16 ***
## semantic_similarity 4.662e-03  6.604e-03 4.237e+02   0.706    0.481    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## smntc_smlrt -0.890
ci(fit_log4)
##             Parameter CI       CI_low    CI_high
## 1         (Intercept) 95  0.865412317 0.97903692
## 2 semantic_similarity 95 -0.008282446 0.01760627
fit_log5 <- lmer(likelihood_rating ~ semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_return)
summary(fit_log5)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: likelihood_rating ~ semantic_similarity + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all_2.0_return
## 
## REML criterion at convergence: 14416.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9795 -0.6212 -0.0044  0.6506  3.4278 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept) 0.69495  0.8336  
##  workerId (Intercept) 0.45433  0.6740  
##  stim_set (Intercept) 0.01695  0.1302  
##  Residual             0.66291  0.8142  
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                      Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)           4.02458    0.38741 243.98797  10.388   <2e-16 ***
## semantic_similarity  -0.24452    0.09614 472.55761  -2.543   0.0113 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## smntc_smlrt -0.970
ci(fit_log5)
##             Parameter CI     CI_low     CI_high
## 1         (Intercept) 95  3.2652716  4.78388603
## 2 semantic_similarity 95 -0.4329401 -0.05609419
fit_log6 <- lmer(log_CB_duration ~ likelihood_rating + semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_return)
summary(fit_log6)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_CB_duration ~ likelihood_rating + semantic_similarity + (1 |  
##     workerId) + (1 | image) + (1 | stim_set)
##    Data: tbl_all_2.0_return
## 
## REML criterion at convergence: -5806.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8431 -0.5526 -0.1366  0.3340  5.2168 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  image    (Intercept) 0.0017119 0.04138 
##  workerId (Intercept) 0.0117543 0.10842 
##  stim_set (Intercept) 0.0003345 0.01829 
##  Residual             0.0158296 0.12582 
## Number of obs: 5210, groups:  image, 480; workerId, 219; stim_set, 4
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          9.611e-01  2.877e-02  4.793e+01  33.404  < 2e-16 ***
## likelihood_rating   -9.787e-03  1.812e-03  2.707e+03  -5.402 7.17e-08 ***
## semantic_similarity  2.494e-03  6.368e-03  4.140e+02   0.392    0.696    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lklhd_
## liklhd_rtng -0.252       
## smntc_smlrt -0.878  0.066
ci(fit_log6)
##             Parameter CI       CI_low      CI_high
## 1         (Intercept) 95  0.904733099  1.017519692
## 2   likelihood_rating 95 -0.013338052 -0.006235872
## 3 semantic_similarity 95 -0.009987549  0.014975024
corr_2.0 <- tbl_all_2.0_return %>% 
  group_by(image) %>% 
  dplyr::summarize(log = mean(log_CB_duration), raw = mean(raw_CB_duration), likelihood_rating = mean(likelihood_rating), change_type = unique(change_type), eccentricity = mean(eccentricity), box_percent = mean(box_percent), change_percent = mean(change_percent), similarity = mean(semantic_similarity))

corr_2.0 %>%
  ggscatter(y = "similarity", x = "likelihood_rating", ylab = "Average Semantic Similarity", xlab = "Likelihood of Detecting Change", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(2, 6))

ggsave("fig_19_likelihood_predict_log.jpg")

tbl_all_2.0_new <- tbl_all_2.0 %>% 
  filter(group == "new")

fit_log7 <- lmer(log_CB_duration ~ semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_new)
summary(fit_log7)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_CB_duration ~ semantic_similarity + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all_2.0_new
## 
## REML criterion at convergence: -175645.6
## 
## Scaled residuals: 
##        Min         1Q     Median         3Q        Max 
## -9.988e-06 -2.238e-06 -4.596e-07  1.644e-06  2.854e-05 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 4.528e-04 2.128e-02
##  workerId (Intercept) 0.000e+00 0.000e+00
##  stim_set (Intercept) 5.939e-17 7.707e-09
##  Residual             9.088e-14 3.015e-07
## Number of obs: 6901, groups:  image, 480; workerId, 230; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)         0.926459   0.008851 1.604897 104.673 0.000455 ***
## semantic_similarity 0.006076   0.002248 1.608259   2.703 0.142930    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## smntc_smlrt -0.994
## convergence code: 0
## boundary (singular) fit: see ?isSingular
ci(fit_log7)
##             Parameter CI      CI_low    CI_high
## 1         (Intercept) 95 0.909110930 0.94380620
## 2 semantic_similarity 95 0.001670813 0.01048099
fit_log8 <- lmer(likelihood_rating ~ semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_new)
summary(fit_log8)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: likelihood_rating ~ semantic_similarity + (1 | workerId) + (1 |  
##     image) + (1 | stim_set)
##    Data: tbl_all_2.0_new
## 
## REML criterion at convergence: 19933.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.4842 -0.6389  0.0087  0.6432  3.9172 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  image    (Intercept) 0.55065  0.7421  
##  workerId (Intercept) 0.48793  0.6985  
##  stim_set (Intercept) 0.01081  0.1040  
##  Residual             0.80089  0.8949  
## Number of obs: 6930, groups:  image, 482; workerId, 230; stim_set, 4
## 
## Fixed effects:
##                     Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)           4.1522     0.3438 297.3423  12.079  < 2e-16 ***
## semantic_similarity  -0.2843     0.0852 482.9411  -3.337 0.000911 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## smntc_smlrt -0.971
ci(fit_log8)
##             Parameter CI     CI_low   CI_high
## 1         (Intercept) 95  3.4785169  4.825973
## 2 semantic_similarity 95 -0.4513123 -0.117348
fit_log9 <- lmer(log_CB_duration ~ likelihood_rating + semantic_similarity + (1 | workerId) + (1 | image) + (1 | stim_set), data=tbl_all_2.0_new)
summary(fit_log9)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_CB_duration ~ likelihood_rating + semantic_similarity + (1 |  
##     workerId) + (1 | image) + (1 | stim_set)
##    Data: tbl_all_2.0_new
## 
## REML criterion at convergence: -178670.7
## 
## Scaled residuals: 
##        Min         1Q     Median         3Q        Max 
## -1.075e-05 -1.923e-06 -4.344e-07  1.487e-06  2.624e-05 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  image    (Intercept) 3.992e-04 1.998e-02
##  workerId (Intercept) 0.000e+00 0.000e+00
##  stim_set (Intercept) 1.573e-04 1.254e-02
##  Residual             5.685e-14 2.384e-07
## Number of obs: 6901, groups:  image, 480; workerId, 230; stim_set, 4
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)          9.183e-01  1.034e-02  6.698e-03  88.795    0.950
## likelihood_rating   -1.404e-13  2.626e-09  1.130e+01   0.000    1.000
## semantic_similarity  3.623e-03  2.089e-03  1.643e+00   1.734    0.251
## 
## Correlation of Fixed Effects:
##             (Intr) lklhd_
## liklhd_rtng  0.000       
## smntc_smlrt -0.792  0.000
## convergence code: 0
## boundary (singular) fit: see ?isSingular
ci(fit_log9)
##             Parameter CI        CI_low      CI_high
## 1         (Intercept) 95  8.980428e-01 9.385824e-01
## 2   likelihood_rating 95 -5.147012e-09 5.146731e-09
## 3 semantic_similarity 95 -4.711187e-04 7.716718e-03
corr_3.0 <- tbl_all_2.0_new %>% 
  group_by(image) %>% 
  dplyr::summarize(log = mean(log_CB_duration), raw = mean(raw_CB_duration), likelihood_rating = mean(likelihood_rating), change_type = unique(change_type), eccentricity = mean(eccentricity), box_percent = mean(box_percent), change_percent = mean(change_percent), similarity = mean(semantic_similarity))

corr_3.0 %>%
  ggscatter(y = "similarity", x = "likelihood_rating", ylab = "Average Semantic Similarity", xlab = "Likelihood of Detecting Change", add = "reg.line", conf.int = TRUE, xlim = c(1, 5), ylim = c(2, 6))

ggsave("fig_20_likelihood_predict_log.jpg")