library(tidyverse)
library(ggplot2)
library(ggpubr)
library(plyr)
Set the R working drectory to the main experiment directory.
setwd("/Users/adambarnas/Box/CogStyles_IB")
Read in the individual subject files.
Get a count of the number of subjects.
nrow(tbl_all %>% distinct(ID,.keep_all = FALSE))
## [1] 127
Organize data
tbl_all_simple = subset(tbl_all, select = -c(rowNo,responseWindow,presTime,ISI,ITI,stimFormat,button1,keyboard,key,responseType,randomPick,responseOptions,pageBreak,required,if.,then,ITI_ms,ITI_f,ITI_fDuration,presTime_ms,presTime_f,presTime_fDuration,timestamp,responseCode,correct))
tbl_all_simple <- tbl_all_simple %>%
separate(response,into=c('response'))
tbl_all_simple <- tbl_all_simple %>%
separate(RTkeys,into=c('RTkeys'))
tbl_all_simple[tbl_all_simple==""]<-NA
tbl_all_simple$rt<- tbl_all_simple$RTkeys
tbl_all_simple$rt[is.na(tbl_all_simple$rt)] <- tbl_all_simple$RT[is.na(tbl_all_simple$rt)]
tbl_all_simple$rt <- as.numeric(tbl_all_simple$rt)
tbl_all_simple$ID <- as.character(tbl_all_simple$ID)
tbl_all_simple$stim1 <- as.character(tbl_all_simple$stim1)
tbl_all_blank_removed <- tbl_all_simple %>%
filter(stim1 != "blank")
tbl_all_cog_style <- tbl_all_blank_removed %>%
filter(grepl('embedded|matching', stim1))
tbl_all_cog_style[tbl_all_cog_style== "embedded_prompt" ] <- NA
tbl_all_cog_style[tbl_all_cog_style== "matching_prompt" ] <- NA
tbl_all_cog_style[tbl_all_cog_style== "timeout" ] <- NA
tbl_all_cog_style <- tbl_all_cog_style %>%
group_by(ID) %>%
fill(stim1) %>% #default direction down
fill(stim1, .direction = "up")
tbl_all_cog_style_condensed <- tbl_all_cog_style %>%
group_by(ID, stim1) %>%
dplyr::summarise(RT = sum(rt), response = first(na.omit(response)))
Split up the cognitive styles stimuli nomenclature to task, answer, and number. Filter the two cognitive styles tasks.
tbl_all_cog_style_condensed <- tbl_all_cog_style_condensed %>%
separate(stim1,into=c('task', 'answer', 'number'))
In the matching figures task, subjects were instructed to press ‘F’ if the two complex shapes were the same and ‘J’ if the two complex shapes were different. Trials will be labeled 1 for correct responses (‘F’ for same objects and ‘J’ for different objects) and 0 for incorrect responses (‘F’ for different objects and ‘J’ for same objects).
In the embedded figures task, subjects were instructed to press ‘F’ if the simple shape is within the complex shape and ‘J’ if the the simple shape is not within the complex shape. Trials will be labeled 1 for correct responses (‘F’ for simple within complex and ‘J’ for simple not within complex) and 0 for incorrect responses (‘F’ simple not within complex and ‘J’ simple within complex).
tbl_all_cog_style_condensed$acc = "filler"
for (i in 1:length(tbl_all_cog_style_condensed$ID)){
if (tbl_all_cog_style_condensed$task[i] == "matching"){
if (tbl_all_cog_style_condensed$answer[i] == "same"){
if (tbl_all_cog_style_condensed$response[i] == "f"){
tbl_all_cog_style_condensed$acc[i] = 1
} else {
tbl_all_cog_style_condensed$acc[i] = 0
}
} else {
if (tbl_all_cog_style_condensed$response[i] == "j"){
tbl_all_cog_style_condensed$acc[i] = 1
} else {
tbl_all_cog_style_condensed$acc[i] = 0
}
}
}
if (tbl_all_cog_style_condensed$task[i] == "embedded"){
if (tbl_all_cog_style_condensed$answer[i] == "yes"){
if (tbl_all_cog_style_condensed$response[i] == "f"){
tbl_all_cog_style_condensed$acc[i] = 1
} else {
tbl_all_cog_style_condensed$acc[i] = 0
}
} else {
if (tbl_all_cog_style_condensed$response[i] == "j"){
tbl_all_cog_style_condensed$acc[i] = 1
} else {
tbl_all_cog_style_condensed$acc[i] = 0
}
}
}
}
write.csv(tbl_all_cog_style_condensed,'embedded_matching_data.csv', row.names=FALSE)
tbl_all_cog_style_condensed_acc <- tbl_all_cog_style_condensed %>%
group_by(ID,task,acc) %>%
dplyr::summarize(counts = n()) %>%
spread(acc,counts) %>%
mutate(total = rowSums(.[3:4], na.rm = TRUE))
colnames(tbl_all_cog_style_condensed_acc) <- c("ID", "task", "inacc", "acc", "total")
tbl_all_cog_style_condensed_acc[is.na(tbl_all_cog_style_condensed_acc)] <- 0
tbl_all_cog_style_condensed_acc$rate <- tbl_all_cog_style_condensed_acc$acc / tbl_all_cog_style_condensed_acc$total
tbl_all_cog_style_condensed_acc %>%
ggbarplot("ID", "rate", fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), font.xtickslab = 4, ylab = "Accuracy", ylim = c(0, 1), position = position_dodge(0.8)) + rotate_x_text() + geom_hline(yintercept = .5, linetype = 2)
tbl_all_cog_style_condensed_acc %>%
ggbarplot("task", "rate", add = "mean_se",fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), ylab = "Accuracy", ylim = c(0, 1), position = position_dodge(0.8)) + geom_hline(yintercept = .5, linetype = 2)
embedded_chance_sona <- tbl_all_cog_style_condensed_acc %>%
filter(task =="embedded")
embedded_chance_sona <-t.test(embedded_chance_sona$rate, mu = .50, alternative="greater")
embedded_chance_sona
##
## One Sample t-test
##
## data: embedded_chance_sona$rate
## t = 17.767, df = 126, p-value < 2.2e-16
## alternative hypothesis: true mean is greater than 0.5
## 95 percent confidence interval:
## 0.7479248 Inf
## sample estimates:
## mean of x
## 0.7734252
matching_chance_sona <- tbl_all_cog_style_condensed_acc %>%
filter(task =="matching")
matching_chance_sona <-t.test(matching_chance_sona$rate, mu = .50, alternative="greater")
matching_chance_sona
##
## One Sample t-test
##
## data: matching_chance_sona$rate
## t = 17.153, df = 126, p-value < 2.2e-16
## alternative hypothesis: true mean is greater than 0.5
## 95 percent confidence interval:
## 0.7023753 Inf
## sample estimates:
## mean of x
## 0.7240157
tbl_all_cog_style_condensed_acc %>%
with(t.test(rate~task,paired=TRUE))
##
## Paired t-test
##
## data: rate by task
## t = 5.1607, df = 126, p-value = 9.306e-07
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.03046237 0.06835653
## sample estimates:
## mean of the differences
## 0.04940945
tbl_all_cog_style_condensed_acc <- subset(tbl_all_cog_style_condensed_acc, select = c(ID, task, rate))
tbl_all_cog_style_condensed_acc_wide <- tbl_all_cog_style_condensed_acc %>%
spread(task,rate)
tbl_all_cog_style_condensed_acc <- tbl_all_cog_style_condensed_acc_wide %>%
filter(embedded > 0.5 & matching > 0.5)
tbl_all_cog_style_condensed_acc <- gather(tbl_all_cog_style_condensed_acc, task, rate, embedded:matching, factor_key=TRUE)
tbl_all_cog_style_condensed_acc %>%
ggbarplot("ID", "rate", fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), font.xtickslab = 4, ylab = "Accuracy", ylim = c(0, 1), position = position_dodge(0.8)) + rotate_x_text() + geom_hline(yintercept = .5, linetype = 2)
tbl_all_cog_style_condensed_acc %>%
ggbarplot("task", "rate", add = "mean_se",fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), ylab = "Accuracy", ylim = c(0, 1), position = position_dodge(0.8)) + geom_hline(yintercept = .5, linetype = 2)
embedded_chance_sona <- tbl_all_cog_style_condensed_acc %>%
filter(task =="embedded")
embedded_chance_sona <-t.test(embedded_chance_sona$rate, mu = .50, alternative="greater")
embedded_chance_sona
##
## One Sample t-test
##
## data: embedded_chance_sona$rate
## t = 29.934, df = 100, p-value < 2.2e-16
## alternative hypothesis: true mean is greater than 0.5
## 95 percent confidence interval:
## 0.8233401 Inf
## sample estimates:
## mean of x
## 0.8423267
matching_chance_sona <- tbl_all_cog_style_condensed_acc %>%
filter(task =="matching")
matching_chance_sona <-t.test(matching_chance_sona$rate, mu = .50, alternative="greater")
matching_chance_sona
##
## One Sample t-test
##
## data: matching_chance_sona$rate
## t = 26.602, df = 100, p-value < 2.2e-16
## alternative hypothesis: true mean is greater than 0.5
## 95 percent confidence interval:
## 0.7617828 Inf
## sample estimates:
## mean of x
## 0.7792079
tbl_all_cog_style_condensed_acc %>%
with(t.test(rate~task,paired=TRUE))
##
## Paired t-test
##
## data: rate by task
## t = 6.0773, df = 100, p-value = 2.234e-08
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.04251314 0.08372449
## sample estimates:
## mean of the differences
## 0.06311881
tbl_all_cog_style_condensed_rts <- tbl_all_cog_style_condensed[(tbl_all_cog_style_condensed$ID %in% tbl_all_cog_style_condensed_acc$ID),] %>%
filter(acc == 1)
tbl_all_cog_style_condensed_rts %>%
ggbarplot("ID", "RT", fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), font.xtickslab = 4, add = "median", position = position_dodge(0.8), ylab = "Median RT (ms)", ylim = c(0,6000)) + rotate_x_text()
tbl_all_cog_style_condensed_rts %>%
ggbarplot("task", "RT", add = "median",fill = "task", color = "task", palette = c("#0d2240", "#00a8e1"), position = position_dodge(0.8), order = c("embedded", "matching"), ylab = "Median RT (ms)", ylim = c(0,5000))
tbl_all_cog_style_condensed_rts_median <- tbl_all_cog_style_condensed_rts %>%
group_by(ID,task) %>%
dplyr::summarize(median_rt = median(RT, na.rm=TRUE))
tbl_all_cog_style_condensed_rts_median %>%
with(t.test(median_rt~task,paired=TRUE))
##
## Paired t-test
##
## data: median_rt by task
## t = -20.432, df = 100, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1448.303 -1191.935
## sample estimates:
## mean of the differences
## -1320.119
The wholist-analytic ratio is calculated by dividing the median response latency to items in the matching figures task (wholist) by the median response latency to items in the embedded figures task (analytic) A ratio of below 1 indicates that an individual responded relatively faster to the matching figure items, corresponding to a wholist profile; a ratio of above 1 indicates that an individual responded relatively faster to the embedded figure items, corresponding to a analytic profile.
tbl_all_cog_style_condensed_rts_median <- tbl_all_cog_style_condensed_rts_median %>%
spread(task, median_rt)
tbl_all_cog_style_condensed_rts_median$ratio <- tbl_all_cog_style_condensed_rts_median$matching / tbl_all_cog_style_condensed_rts_median$embedded
tbl_all_cog_style_condensed_rts_median$style = "filler"
for (i in 1:length(tbl_all_cog_style_condensed_rts_median$ID)){
if (tbl_all_cog_style_condensed_rts_median$ratio[i] > 1){
tbl_all_cog_style_condensed_rts_median$style[i] = "analytic"
} else {
tbl_all_cog_style_condensed_rts_median$style[i] = "wholist"
}
}
tbl_all_cog_style_condensed_rts_median %>%
ggbarplot("ID", "ratio", fill = "#f7a800", color = "#f7a800", ylim = c(0,4), font.xtickslab = 4, ylab = "Median wholist-analytic ratio") + rotate_x_text() + geom_hline(yintercept = 1, linetype = 2)
table(tbl_all_cog_style_condensed_rts_median$style)
##
## analytic
## 101
tbl_all_IB <- tbl_all %>%
filter(grepl('Did you notice|item', head))
tbl_all_IB = subset(tbl_all_IB, select = -c(stim1,ITI,ISI,presTime,if.,then,presTime_ms,presTime_f,presTime_fDuration,RTkeys,correct,stimFormat,button1,keyboard,key,responseWindow,randomBlock,responseType,randomPick,responseOptions,pageBreak,required,ITI_ms,ITI_f,ITI_fDuration,responseCode))
tbl_all_IB <- tbl_all_IB[(tbl_all_IB$ID %in% tbl_all_cog_style_condensed_rts_median$ID),]
tbl_all_counting <- tbl_all %>%
filter(rowNo >= 406 & rowNo <= 433)
tbl_all_counting = subset(tbl_all_counting, select = -c(rowNo,type,timestamp,RT,correct,ISI,ITI,stimFormat,button1,keyboard,key,responseWindow,randomBlock,presTime,head,responseType,randomPick,responseOptions,pageBreak,required,if.,then,ITI_ms,ITI_f,ITI_fDuration,presTime_ms,presTime_f,presTime_fDuration,RTkeys,responseCode))
tbl_all_counting <- tbl_all_counting[(tbl_all_counting$ID %in% tbl_all_cog_style_condensed_rts_median$ID),]
tbl_all_counting <- cbind(tbl_all_counting[c(TRUE, FALSE), ],tbl_all_counting[c(FALSE, TRUE), ])
tbl_all_counting = subset(tbl_all_counting, select = -c(3:5))
tbl_counts <- read_csv("./IB_stims/IB_counting.csv")
## Parsed with column specification:
## cols(
## stim1 = col_character(),
## count = col_double()
## )
tbl_counts_comparison <- full_join(tbl_all_counting, tbl_counts, by = "stim1")
tbl_counts_comparison <- tbl_counts_comparison[complete.cases(tbl_counts_comparison), ]
tbl_counts_comparison[is.na(tbl_counts_comparison)] <- 0
tbl_counts_comparison$response <- as.numeric(tbl_counts_comparison$response)
tbl_counts_comparison$count <- as.numeric(tbl_counts_comparison$count)
tbl_counts_comparison$error <- (abs(tbl_counts_comparison$response - tbl_counts_comparison$count) / tbl_counts_comparison$count) * 100
tbl_counts_comparison %>%
ggbarplot("ID", "error", fill = "#f7a800", color = "#f7a800", ylim = c(0,150), font.xtickslab = 4, add = "mean_se", ylab = "Mean Percent Error on Midline-crossings Task") + rotate_x_text() + geom_hline(yintercept = 20, linetype = 2)
tbl_counts_comparison_average <- tbl_counts_comparison %>%
group_by(ID) %>%
dplyr::summarize(mean_error = mean(error, na.rm=TRUE))
tbl_counts_comparison_average %>%
ggbarplot(y = "mean_error", fill = "#f7a800", color = "#f7a800", ylim = c(0,100), sort.val = c("asc") ,xlab = "Group", add = "mean_se", ylab = "Mean Percent Error on Midline-crossings Task")
error <-t.test(tbl_counts_comparison_average$mean_error, mu = 0, alternative="greater")
error
##
## One Sample t-test
##
## data: tbl_counts_comparison_average$mean_error
## t = 7.4469, df = 100, p-value = 1.721e-11
## alternative hypothesis: true mean is greater than 0
## 95 percent confidence interval:
## 14.74232 Inf
## sample estimates:
## mean of x
## 18.97197
write.csv(tbl_counts_comparison,'IB_counting.csv', row.names=FALSE)
tbl_counts_comparison_average_good <- tbl_counts_comparison_average %>%
filter(mean_error < 20)
tbl_counts_comparison_good <- tbl_counts_comparison[(tbl_counts_comparison$ID %in% tbl_counts_comparison_average_good$ID),]
tbl_counts_comparison_good %>%
ggbarplot("ID", "error", fill = "#f7a800", color = "#f7a800", ylim = c(0,30), font.xtickslab = 6, add = "mean_se", ylab = "Mean Percent Error on Midline-crossings Task") + rotate_x_text()
tbl_counts_comparison_average_good %>%
ggbarplot(y = "mean_error", fill = "#f7a800", color = "#f7a800", ylim = c(0,100), sort.val = c("asc") ,xlab = "Group", add = "mean_se", ylab = "Mean Percent Error on Midline-crossings Task")
error_good <-t.test(tbl_counts_comparison_average_good$mean_error, mu = 0, alternative="greater")
error_good
##
## One Sample t-test
##
## data: tbl_counts_comparison_average_good$mean_error
## t = 10.202, df = 73, p-value = 5.39e-16
## alternative hypothesis: true mean is greater than 0
## 95 percent confidence interval:
## 4.700469 Inf
## sample estimates:
## mean of x
## 5.617839
tbl_all_IB <- tbl_all_IB[(tbl_all_IB$ID %in% tbl_counts_comparison_average_good$ID),]
tbl_all_notice <- tbl_all_IB %>%
filter(grepl('items', head))
table(tbl_all_notice$response)
##
## No Not sure Yes
## 31 21 22
tbl_all_notice = subset(tbl_all_notice, select = -c(rowNo,type,head,timestamp,RT))
write.csv(tbl_all_notice,'IB_notice.csv', row.names=FALSE)
tbl_all_event <- tbl_all_IB %>%
filter(grepl('moved', head))
tbl_all_different <- tbl_all_IB %>%
filter(grepl('different', head))
tbl_all_event <- cbind.data.frame(tbl_all_event[1], tbl_all_event[6])
tbl_all_different <- cbind.data.frame(tbl_all_different[1], tbl_all_different[6])
tbl_all_event <- cbind.data.frame(tbl_all_different, tbl_all_notice[2], tbl_all_event[2])
colnames(tbl_all_event) <- c("ID", "notice_anything_different", "unexpected_item", "item_description")
tbl_all_event <- arrange(tbl_all_event, ID)
tbl_all_event$noticer_or_nonnoticer <- c(0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0)
knitr::kable(tbl_all_event)
| ID | notice_anything_different | unexpected_item | item_description | noticer_or_nonnoticer |
|---|---|---|---|---|
| A11PIARI7WALAX | No | Not sure | I did not see anything. I was purely focused on white shapes. | 0 |
| A12BPNWOK3NZT9 | The trial itself was much different. I get the feeling that something was going on in the background but I was too busy counting the letters. | Not sure | I am not sure. I know I saw letters inside the box but I’m wondering if there were letters anywhere else. | 0 |
| A15XIKX3PI7SLK | On the first two trials, I had to compare two shapes, while on the last trial, I had to count the number of times letters cross a line. | No | I did not notice any of the items. | 0 |
| A17CTPL658MHXG | a plus sign moved across the screen | Yes | a plus sign moved from the right to the left of the screen | 1 |
| A18E16UFE351U6 | I didn’t notice anything different on the last trial. | Not sure | I don’t think noticed any of those symbols in the last trial. | 0 |
| A1969Q0R4Y0E3J | No. | Not sure | I am guessing one of those items were present and moved at a slower rate than others. | 0 |
| A198MSVO1VTAT5 | No, I didn’t notice anything different. | No | I didn’t notice it at all. I was watching the L T. | 0 |
| A1AF25FCVKC87X | The cross was moving right to left. | Yes | It was a cross and it moved on the line from right to left. | 1 |
| A1BH6H9WRK49I | No | No | Didn’t see the item | 0 |
| A1IQUHRI7G63YF | it involved letters | Yes | The plus sign appeared on the line | 1 |
| A1JJYY622DGE5L | There were letters rather than shapes to deal with. | Yes | There was a + sign in the middle of the purple line. It never moved. | 0 |
| A1JR35HATOEME9 | No | Yes | They moved slower | 0 |
| A1M8HPA2YRBSEN | Nothing different. | Not sure | I’m not sure about that. | 0 |
| A1N0Q3QP4OMTZ2 | I noticed a grey cross moving across the center line at one point. | Yes | It moved right on the center line, and it was the third image (grey cross). | 1 |
| A1O0BGHFTMPQM0 | NO | No | DIDN’T NOTICE IT | 0 |
| A1P3HHEXWNLJMP | No I failed to notice anything different. I am guessing that maybe the shapes changed color. | No | I did not notice it at all. | 0 |
| A1Q4ZOXZ0Y7K6I | There was a gray plus/cross shape that moved on the line | Yes | I saw a gray plus shape moving from right to left on the line | 1 |
| A1RQLE4ZMTU22A | I did not notice anything different. | Not sure | I’d say it was the X if I was to guess. I have no idea how it moved. | 0 |
| A1SHLWKA0UH1IS | It had moving objects. Also I had to type in a number instead of clicking a letter. | No | I did not notice it. | 0 |
| A1U4DNYKF6YUY3 | A dark gray cross/plus sign/+ traveled along the center line. | Yes | +, moved along the center horizontal line from the right to the left. | 1 |
| A1W7I6FN183I8F | No, I did not notice anything different. Then again, my attention was focused on the white shapes crossing. | No | I did not see those letters/equation appear at all while I was counting. | 0 |
| A248QG4DPULP46 | Yes. The last trial involved counting moving shapes while the shapes in the two other trials did not move. | Not sure | I don’t think I saw any of the shapes. I was concentrating on counting the white figures that crossed the line. | 0 |
| A258ZJM0HU1OR3 | Yes entirely different. The main different is to count the white shape letters in the last task. first and second task to say same or different. | Yes | X and + I can see to travel left to right and bottom to top. | 0 |
| A270HX8LH9LJ8W | no | Not sure | I didn’t consciously see one of those items. | 0 |
| A279YSE7NB16M0 | no | No | no | 0 |
| A297OTX4PW0XS3 | Just that it was a completely different task from the first two. I was counting the number of times white letters crossed a line instead of comparing shapes. | Yes | The plus symbol moved along the line from one side to the other. | 1 |
| A2APG8MSLJ6G2K | no, sorry. there was a different letter i bet. | No | i didnt see it, sorry. | 0 |
| A2BBFG0J0TJI78 | No, I did not notice any difference. | Not sure | I did not see them | 0 |
| A2DFN1612YMN00 | I noticed a grey cross slide across the horizontal line. | Yes | I think I saw a grey cross go across the blue horizontal line on the last test. | 1 |
| A2FOYHZ7HOFKBI | No difference | Not sure | Didn’t see any of the items, I was too focused on the white letters | 0 |
| A2GOS6NF74E2ST | No | No | No, I didn’t see anything | 0 |
| A2H9ZRBC0JYKVJ | i saw a plus sign crossing from right to left. | Yes | Plus sign | 1 |
| A2HDDHOOCUCN9P | There was an animation rather than still shapes, and the shapes were letters T and L. | No | I did not see X, +, or E. | 0 |
| A2HJDLSU95MH8Q | no | Not sure | no idea, sorry | 0 |
| A2HRUFTA09371Y | there was a + moving from right to left on the screen | Yes | #NAME? | 1 |
| A2JW59JRBWUMR2 | NO | Not sure | X | 0 |
| A2K287FPB9YFIE | counting white crosses. | No | I didn’t pay attention to the dark symbols. | 0 |
| A2OPYRV3GLAPS1 | I did not! | No | I didn’t notice anything. | 0 |
| A2OVMMDZQ524IL | none | Yes | + | 1 |
| A2OX8TSRCU6NKD | no | No | I did not see anything different but if there was my guess was it didn’t move | 0 |
| A2POU9TTW177VH | No | No | I did not see it | 0 |
| A2R75YFKVALBXE | Didn’t notice anything different. | No | Didn’t see it. | 0 |
| A2UYZFH5VT5R3H | no | Yes | A cross shape moved through the center | 1 |
| A2VNSNAN1LZBAM | Maybe the shapes moved faster? I’m not really sure. | No | I didn’t see that. | 0 |
| A2VO8C41JJIQY9 | There was less number of black characters in the animation. | Not sure | I think I saw the black faded character “E” and it was moving up and down. | 0 |
| A2XQ3CFB5HT2ZQ | I did not notice. | Not sure | no idea | 0 |
| A2ZDEERVRN5AMC | nope. | No | I was too focused on the purple line. | 0 |
| A31JM9RECQGYEX | Different goal | Yes | none of them were present | 0 |
| A3APKUC67F9IMW | They all started too quick. I was caught off guard most of the time. I guess that’s what the study is or my internet is slow? No clue. | Not sure | I’m sure I saw crosses but not in the dimensions or rotation that you have there. You got me worried when you hit me right in the gut immediately. | 0 |
| A3BHRFFG75X3GO | no | Not sure | I did not notice any of that. | 0 |
| A3EC3OP6U52JYC | In the last trial, I noticed a moving gray cross. The gray cross ran across the middle from right to left. | Yes | I saw a gray cross move from right to left across the middle of the screen. | 1 |
| A3EZ3BRM1C5WKV | There more crossings by white letters. | No | X moved up and down | 0 |
| A3IF13XHP5UPO2 | Maybe required the most attention. | No | I didn’t see any of the previous letters. | 0 |
| A3IXWFXJC2YKU7 | No. | Not sure | The large X perhaps | 0 |
| A3L2FPKRD46FRW | no not really | No | L and T | 0 |
| A3LT7W355XOAKF | no | No | x, only a guess, moved the same as the others | 0 |
| A3N0QZ9ZKUCTCQ | There was a moving cross from the right to the left in the center. | Yes | Plus sign, moving slowly right to left. | 1 |
| A3OP24TYKA619W | i did not notice anything | No | i did not see it. too busy concentrating | 0 |
| A3RHJEMZ4EGY2U | No, I was too busy trying to count. | Not sure | It seemed that something was moving faster but I have no idea what it was because I was busy trying to count. | 0 |
| A3SJVR4BROAIJO | They included moving letters rather than static shapes. | No | I did not see any of those items. | 0 |
| A3V2XCDF45VN9X | no | Not sure | I did not notice. | 0 |
| A9ZCY6FLUCIU1 | different type of measurement, no yes or no | No | not sure saw | 0 |
| AABCSDU3TZLNG | No. This last L-and-T trial? No. | No | N/A. I didn’t see it. | 0 |
| AD1WGUMVD6KED | I didn’t notice anything different. | Not sure | I think there was a plus sign somewhere. | 1 |
| AD21ES5UMD77U | The movement and the focusing on one color. | No | I did not see any of the previous items | 0 |
| AFIK3VBMMX6G6 | gray plus sign went from right to left on horizontal bisector | Yes | plus sign, right to left | 1 |
| AI5RMOS8R652G | No, I didn’t notice anything different. | No | I didn’t see anything different I was paying too much attention to white passing through the line. | 0 |
| ALKQPW0O9C98N | No | No | I don’t think I saw any of them | 0 |
| AM8OWAW9TUVLN | the shapes moved differently each round | No | I just watched the white ones and forgot what they were | 0 |
| AMPMTF5IAAMK8 | N/A | Yes | an x moved on a horizontal line | 0 |
| AOJPRTHGMEPFX | A cross traveled across the screen from right to left. | Yes | Middle, from right to left | 1 |
| AONN1W54VC8YD | There was a moving + across the screen. | Yes | The + symbol moved to left, along the line. | 1 |
| AQN3WMCEA96DQ | I didn’t notice anything. | Not sure | I was only paying attention to the white figures. Maybe an X crossed the screen though. just a guess | 0 |
| AYFDUTHXE54I | The letters are moving in the last task not matching drawings. | No | I saw letters T L crossing a center line where as L is in white color. | 0 |
table(tbl_all_event$noticer_or_nonnoticer)
##
## 0 1
## 56 18
tbl_all <- tbl_all[(tbl_all$ID %in% tbl_all_IB$ID),]
tbl_all_expecting <- tbl_all %>%
filter(grepl('Before', head))
tbl_all_expecting = subset(tbl_all_expecting, select = -c(stim1,ITI,ISI,presTime,if.,then,presTime_ms,presTime_f,presTime_fDuration,RTkeys,correct,stimFormat,button1,keyboard,key,responseWindow,randomBlock,responseType,randomPick,responseOptions,pageBreak,required,ITI_ms,ITI_f,ITI_fDuration,responseCode))
tbl_all_expecting <- tbl_all_expecting[(tbl_all_expecting$ID %in% tbl_all_cog_style_condensed_rts_median$ID),]
table(tbl_all_expecting$response)
##
## No Yes
## 71 3
tbl_all_familiarity <- tbl_all %>%
filter(grepl('gorilla', head))
tbl_all_familiarity = subset(tbl_all_familiarity, select = -c(stim1,ITI,ISI,presTime,if.,then,presTime_ms,presTime_f,presTime_fDuration,RTkeys,correct,stimFormat,button1,keyboard,key,responseWindow,randomBlock,responseType,randomPick,responseOptions,pageBreak,required,ITI_ms,ITI_f,ITI_fDuration,responseCode))
tbl_all_familiarity <- tbl_all_familiarity[(tbl_all_familiarity$ID %in% tbl_all_cog_style_condensed_rts_median$ID),]
table(tbl_all_familiarity$response)
##
## No Yes
## 47 27
tbl_all_cog_style_condensed_rts_median <- tbl_all_cog_style_condensed_rts_median[(tbl_all_cog_style_condensed_rts_median$ID %in% tbl_all_event$ID),]
tbl_log_reg_median <- cbind.data.frame(tbl_all_cog_style_condensed_rts_median, tbl_all_event[5])
#tbl_log_reg_median[tbl_log_reg_median == "Yes"] <- 1
#tbl_log_reg_median[tbl_log_reg_median == "No"] <- 0
#tbl_log_reg_median[tbl_log_reg_median == "Not sure"] <- 0
names(tbl_log_reg_median)[names(tbl_log_reg_median)=="noticer_or_nonnoticer"] <- "notice"
tbl_log_reg_median$notice <- as.numeric(tbl_log_reg_median$notice)
log_reg_median_ratio <- glm(notice ~ ratio, data = tbl_log_reg_median, family = binomial(link = "logit"))
summary(log_reg_median_ratio)
##
## Call:
## glm(formula = notice ~ ratio, family = binomial(link = "logit"),
## data = tbl_log_reg_median)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.7817 -0.7559 -0.7393 -0.6972 1.7663
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.8748 1.1680 -0.749 0.454
## ratio -0.1360 0.5962 -0.228 0.820
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 82.056 on 72 degrees of freedom
## AIC: 86.056
##
## Number of Fisher Scoring iterations: 4
plot_median_ratio <- ggplot(tbl_log_reg_median, aes(x=ratio, y=notice)) + xlim(1,4) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_median_ratio))
log_reg_embedded_median <- glm(notice ~ embedded, data = tbl_log_reg_median, family = binomial(link = "logit"))
summary(log_reg_embedded_median)
##
## Call:
## glm(formula = notice ~ embedded, family = binomial(link = "logit"),
## data = tbl_log_reg_median)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.1260 -0.7846 -0.6744 -0.3514 1.9827
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.506551 1.653167 0.911 0.362
## embedded -0.001718 0.001085 -1.584 0.113
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 79.248 on 72 degrees of freedom
## AIC: 83.248
##
## Number of Fisher Scoring iterations: 4
plot_embedded_median <- ggplot(tbl_log_reg_median, aes(x=embedded, y=notice)) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_embedded_median))
log_reg_matching_median <- glm(notice ~ matching, data = tbl_log_reg_median, family = binomial(link = "logit"))
summary(log_reg_matching_median)
##
## Call:
## glm(formula = notice ~ matching, family = binomial(link = "logit"),
## data = tbl_log_reg_median)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.9592 -0.7831 -0.6790 -0.4584 2.1084
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.4319417 1.1983444 0.36 0.719
## matching -0.0005392 0.0004117 -1.31 0.190
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 80.223 on 72 degrees of freedom
## AIC: 84.223
##
## Number of Fisher Scoring iterations: 4
plot_matching_median <- ggplot(tbl_log_reg_median, aes(x=matching, y=notice)) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_matching_median))
Does not work because there are no ‘wholists’
#log_reg_style <- glm(notice ~ style, data = tbl_log_reg, family = binomial)
#summary(log_reg_style)
tbl_all_cog_style_condensed_acc_wide <- tbl_all_cog_style_condensed_acc_wide[(tbl_all_cog_style_condensed_acc_wide$ID %in% tbl_log_reg_median$ID),]
tbl_log_reg_acc <- merge(tbl_all_cog_style_condensed_acc_wide, tbl_all_notice, by = "ID")
#tbl_log_reg_acc = subset(tbl_log_reg_acc, select = -c(rowNo,type,head,timestamp,RT))
tbl_log_reg_acc[tbl_log_reg_acc == "Yes"] <- 1
tbl_log_reg_acc[tbl_log_reg_acc == "No"] <- 0
tbl_log_reg_acc[tbl_log_reg_acc == "Not sure"] <- 0
names(tbl_log_reg_acc)[names(tbl_log_reg_acc)=="response"] <- "notice"
tbl_log_reg_acc$notice <- as.numeric(tbl_log_reg_acc$notice)
tbl_log_reg_acc$ratio <- tbl_log_reg_acc$matching / tbl_log_reg_acc$embedded
log_reg_acc_ratio <- glm(notice ~ ratio, data = tbl_log_reg_acc, family = binomial(link = "logit"))
summary(log_reg_acc_ratio)
##
## Call:
## glm(formula = notice ~ ratio, family = binomial(link = "logit"),
## data = tbl_log_reg_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.8977 -0.8473 -0.8273 1.4786 1.6810
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.7246 2.1940 -0.786 0.432
## ratio 0.9214 2.3176 0.398 0.691
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 90.066 on 73 degrees of freedom
## Residual deviance: 89.909 on 72 degrees of freedom
## AIC: 93.909
##
## Number of Fisher Scoring iterations: 4
plot_acc_ratio <- ggplot(tbl_log_reg_acc, aes(x=ratio, y=notice)) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_acc_ratio))
log_reg_embedded_acc <- glm(notice ~ embedded, data = tbl_log_reg_acc, family = binomial(link = "logit"))
summary(log_reg_embedded_acc)
##
## Call:
## glm(formula = notice ~ embedded, family = binomial(link = "logit"),
## data = tbl_log_reg_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.2676 -0.8428 -0.6834 1.2124 1.8288
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 3.557 2.224 1.600 0.1097
## embedded -5.151 2.594 -1.985 0.0471 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 90.066 on 73 degrees of freedom
## Residual deviance: 85.929 on 72 degrees of freedom
## AIC: 89.929
##
## Number of Fisher Scoring iterations: 4
plot_embedded_acc <- ggplot(tbl_log_reg_acc, aes(x=embedded, y=notice)) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_embedded_acc))
log_reg_matching_acc <- glm(notice ~ matching, data = tbl_log_reg_acc, family = binomial(link = "logit"))
summary(log_reg_matching_acc)
##
## Call:
## glm(formula = notice ~ matching, family = binomial(link = "logit"),
## data = tbl_log_reg_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4089 -0.8295 -0.6750 1.2722 1.8540
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 4.157 2.268 1.833 0.0668 .
## matching -6.309 2.861 -2.205 0.0275 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 90.066 on 73 degrees of freedom
## Residual deviance: 84.871 on 72 degrees of freedom
## AIC: 88.871
##
## Number of Fisher Scoring iterations: 4
plot_matching_acc <- ggplot(tbl_log_reg_acc, aes(x=matching, y=notice)) + geom_point() + stat_smooth(method="glm", method.args=list(family="binomial"), se=TRUE, color="#f7a800") + theme_classic((base_size = 15))
suppressMessages(print(plot_matching_acc))
Does not work because there are no ‘wholists’
#log_reg_style <- glm(notice ~ style, data = tbl_log_reg, family = binomial)
#summary(log_reg_style)
tbl_log_reg_median_acc <- cbind.data.frame(tbl_log_reg_median, tbl_log_reg_acc[c(2,3,5)])
colnames(tbl_log_reg_median_acc) <- c("ID", "embedded_rt", "matching_rt", "ratio_rt", "style", "notice", "embedded_acc", "matching_acc", "ratio_acc")
log_reg_median_acc_ratio <- glm(notice ~ ratio_rt * ratio_acc, data=tbl_log_reg_median_acc, family=binomial)
summary(log_reg_median_acc_ratio)
##
## Call:
## glm(formula = notice ~ ratio_rt * ratio_acc, family = binomial,
## data = tbl_log_reg_median_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.0482 -0.7579 -0.6883 -0.2925 2.3604
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -21.024 10.362 -2.029 0.0425 *
## ratio_rt 11.106 5.752 1.931 0.0535 .
## ratio_acc 22.075 11.131 1.983 0.0473 *
## ratio_rt:ratio_acc -12.316 6.216 -1.981 0.0476 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 76.338 on 70 degrees of freedom
## AIC: 84.338
##
## Number of Fisher Scoring iterations: 4
log_reg_embedded_median_acc <- glm(notice ~ embedded_rt * embedded_acc, data = tbl_log_reg_median_acc, family = binomial(link = "logit"))
summary(log_reg_embedded_median_acc)
##
## Call:
## glm(formula = notice ~ embedded_rt * embedded_acc, family = binomial(link = "logit"),
## data = tbl_log_reg_median_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.28215 -0.78066 -0.55152 -0.08562 2.16865
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -21.291289 12.913278 -1.649 0.0992 .
## embedded_rt 0.014056 0.007772 1.808 0.0705 .
## embedded_acc 28.564316 15.565310 1.835 0.0665 .
## embedded_rt:embedded_acc -0.019825 0.009619 -2.061 0.0393 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 73.450 on 70 degrees of freedom
## AIC: 81.45
##
## Number of Fisher Scoring iterations: 5
log_reg_matching_median_acc <- glm(notice ~ matching_rt * matching_acc, data = tbl_log_reg_median_acc, family = binomial(link = "logit"))
summary(log_reg_matching_median_acc)
##
## Call:
## glm(formula = notice ~ matching_rt * matching_acc, family = binomial(link = "logit"),
## data = tbl_log_reg_median_acc)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.1747 -0.8096 -0.6165 -0.1419 2.4036
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -20.017285 12.060829 -1.660 0.0970 .
## matching_rt 0.006871 0.003948 1.740 0.0818 .
## matching_acc 26.574118 15.714899 1.691 0.0908 .
## matching_rt:matching_acc -0.009576 0.005122 -1.870 0.0615 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 82.109 on 73 degrees of freedom
## Residual deviance: 74.820 on 70 degrees of freedom
## AIC: 82.82
##
## Number of Fisher Scoring iterations: 5