set.seed(12345) # for reproducibility

if (!require("Rmisc", quietly = TRUE)) install.packages("Rmisc") # Never load it directly.
pacman::p_load(tidyverse, psych)
pacman::p_load(knitr, ggridges)
pacman::p_load(rstatix, TOSTER, pwr)
pacman::p_load(cowplot)
pacman::p_load_gh("thomasp85/patchwork")
pacman::p_load_gh("RLesur/klippy", "mitchelloharawild/icons")

options(knitr.kable.NA = '')
options(dplyr.summarise.inform=FALSE) # suppress warning in regards to regrouping 
xcut <- 2

klippy::klippy()
# Exp1: distractor = O's
E1 <- read.csv("data/data_vstmAS1.csv", header = T)
headTail(E1)
##       SN Trial vstmLoad Targ Flnk Congruency Resp   RT vstmCond vstmResp vstmRT
## 1      1     1        1    1    1          1    1 1.15        2        2   1.13
## 2      1     2        2    1    2          0    1 1.36        1        2   1.22
## 3      1     3        1    2    1          0    2 0.84        1        1    0.7
## 4      1     4        1    1    2          0    1 1.21        2        2   0.68
## ...  ...   ...      ...  ...  ...        ...  ...  ...      ...      ...    ...
## 3837  20   189        1    2    1          0    2 0.94        2        2   0.54
## 3838  20   190        1    2    1          0    2 0.75        1        1   0.48
## 3839  20   191        1    2    2          1    2 0.76        1        1   0.55
## 3840  20   192        1    2    1          0    2 0.75        2        2   0.61

length(unique(E1$SN))
## [1] 20
table(E1$vstmLoad, E1$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   2 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E1$Congruency, E1$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   0 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E1$Resp, E1$SN) # 7 = no resp
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1  96  96  97  98  94  96  97  97  96  96  97  94  95  90  96  93  95  96  95
##   2  89  94  93  89  98  93  94  95  96  96  95  98  95 102  92  97  96  96  95
##   7   7   2   2   5   0   3   1   0   0   0   0   0   2   0   4   2   1   0   2
##    
##      20
##   1  94
##   2  97
##   7   1
table(E1$vstmResp, E1$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 113  84  99 114  89 111 109 111 102  87  88 106  97  99  96 106  97  99 108
##   2  78 103  93  77 103  79  83  81  89 104 103  86  95  92  95  86  93  92  82
##   7   1   5   0   1   0   2   0   0   1   1   1   0   0   1   1   0   2   1   2
##    
##      20
##   1 100
##   2  90
##   7   2

E1$SN <- factor(E1$SN)
E1$vstmLoad <- factor(E1$vstmLoad, levels=c(1,2), labels=c("Low","High"))
E1$Congruency <- factor(E1$Congruency, levels=c(0,1), labels=c("Incongruent","Congruent"))
E1$Corr <- ifelse(E1$Targ==E1$Resp,1,0)
E1$vstmCorr <- ifelse(E1$vstmCond==E1$vstmResp,1,0)
glimpse(E1, width=70)
## Rows: 3,840
## Columns: 13
## $ SN         <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ Trial      <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15…
## $ vstmLoad   <fct> Low, High, Low, Low, Low, High, Low, Low, Low, Lo…
## $ Targ       <int> 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2…
## $ Flnk       <int> 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1…
## $ Congruency <fct> Congruent, Incongruent, Incongruent, Incongruent,…
## $ Resp       <int> 1, 1, 2, 1, 1, 7, 1, 1, 1, 1, 7, 1, 2, 2, 2, 2, 2…
## $ RT         <dbl> 1.1466, 1.3619, 0.8450, 1.2057, 1.0779, 7.0000, 0…
## $ vstmCond   <int> 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1…
## $ vstmResp   <int> 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1…
## $ vstmRT     <dbl> 1.1304, 1.2176, 0.7007, 0.6774, 0.6777, 1.2781, 0…
## $ Corr       <dbl> 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1…
## $ vstmCorr   <dbl> 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1…

table(E1$Corr, E1$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  15  14   5   7   2   7   7   5   0   6   5   6   8  10   8   8   4   0   6
##   1 177 178 187 185 190 185 185 187 192 186 187 186 184 182 184 184 188 192 186
##    
##      20
##   0   4
##   1 188
table(E1$vstmCorr, E1$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  31  59  27  41   7  33  29  37  11  32  17  18  25  25  13  36  26  18  40
##   1 161 133 165 151 185 159 163 155 181 160 175 174 167 167 179 156 166 174 152
##    
##      20
##   0  10
##   1 182


# Exp2: distractor = ., blocked, 1 vs. 4
E2 <- read.csv("data/data_vstmAS2.csv", header = T)
headTail(E2)
##       SN Trial Block vstmLoad Targ Flnk TargPos FlnkPos Congruency Resp   RT
## 1      1     1     1        1    2    1       3       2          0    2 0.64
## 2      1     2     1        1    1    2       6       2          0    1  0.7
## 3      1     3     1        1    1    1       5       1          1    1 0.55
## 4      1     4     1        1    2    1       2       2          0    2 0.62
## ...  ...   ...   ...      ...  ...  ...     ...     ...        ...  ...  ...
## 3837  20   189     4        2    1    2       6       2          0    7    7
## 3838  20   190     4        2    1    2       6       1          0    1 0.75
## 3839  20   191     4        2    2    1       3       1          0    2 0.74
## 3840  20   192     4        2    2    2       6       1          1    2 0.65
##      vstmCond vstmResp vstmRT
## 1           1        1   0.62
## 2           2        2   0.62
## 3           1        1    0.6
## 4           2        2    0.8
## ...       ...      ...    ...
## 3837        1        1   1.65
## 3838        2        2   0.73
## 3839        2        2   0.73
## 3840        1        2   0.95

length(unique(E2$SN))
## [1] 20

table(E2$Block, E2$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   2 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   3 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   4 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
table(E2$vstmLoad, E2$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   2 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E2$Congruency, E2$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   0 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E2$Resp, E2$SN) # 7 = no resp
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1  97 112  98  92  92  95  98  97  99  98  99  97  84  96  92  97  95  98  99
##   2  93  75  94 100  99  97  92  95  93  94  91  93  93  96 100  89  97  94  93
##   7   2   5   0   0   1   0   2   0   0   0   2   2  15   0   0   6   0   0   0
##    
##      20
##   1  85
##   2 101
##   7   6
table(E2$vstmResp, E2$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 109  84 104 101 103  95 105 108 101 109 102 103  95 109  98  90  87  89 101
##   2  79 105  88  89  88  96  86  83  91  83  90  87  91  82  93 102 102 103  91
##   7   4   3   0   2   1   1   1   1   0   0   0   2   6   1   1   0   3   0   0
##    
##      20
##   1  95
##   2  94
##   7   3

E2$SN <- factor(E2$SN)
E2$vstmLoad <- factor(E2$vstmLoad, levels=c(1,2), labels=c("Low","High"))
E2$Congruency <- factor(E2$Congruency, levels=c(0,1), labels=c("Incongruent","Congruent"))
E2$Corr <- ifelse(E2$Targ==E2$Resp,1,0)
E2$vstmCorr <- ifelse(E2$vstmCond==E2$vstmResp,1,0)
glimpse(E2, width=70)
## Rows: 3,840
## Columns: 16
## $ SN         <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ Trial      <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15…
## $ Block      <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ vstmLoad   <fct> Low, Low, Low, Low, Low, Low, Low, Low, Low, Low,…
## $ Targ       <int> 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2…
## $ Flnk       <int> 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2…
## $ TargPos    <int> 3, 6, 5, 2, 1, 5, 6, 6, 5, 1, 2, 2, 6, 6, 2, 4, 1…
## $ FlnkPos    <int> 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2…
## $ Congruency <fct> Incongruent, Incongruent, Congruent, Incongruent,…
## $ Resp       <int> 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 7, 1, 2…
## $ RT         <dbl> 0.6373, 0.6963, 0.5516, 0.6224, 0.7491, 0.7324, 0…
## $ vstmCond   <int> 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2…
## $ vstmResp   <int> 1, 2, 1, 2, 2, 7, 2, 2, 1, 1, 2, 2, 1, 1, 7, 1, 2…
## $ vstmRT     <dbl> 0.6211, 0.6161, 0.5994, 0.7982, 0.6049, 7.0000, 0…
## $ Corr       <dbl> 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1…
## $ vstmCorr   <dbl> 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1…

table(E2$Corr, E2$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0   6  30   2   6  14   3  10   7   5   4   7   7  28   4   4  12   1   6   5
##   1 186 162 190 186 178 189 182 185 187 188 185 185 164 188 188 180 191 186 187
##    
##      20
##   0  19
##   1 173
table(E2$vstmCorr, E2$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  34  70  28  35  19  15  31  22  21  29  24  42  47  31  34  14  26  23  15
##   1 158 122 164 157 173 177 161 170 171 163 168 150 145 161 158 178 166 169 177
##    
##      20
##   0  33
##   1 159
table(E2$TargPos, E2$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   2 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   3 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   4 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   5 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   6 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32


# Exp3: distractor = ., blocked, 0 vs. 3
E3 <- read.csv("data/data_vstmAS3.csv", header = T)
headTail(E3)
##       SN Trial Block vstmLoad Targ Flnk TargPos FlnkPos Congruency Resp   RT
## 1      1     1     1        1    2    2       4       1          1    7    7
## 2      1     2     1        1    2    1       2       2          0    2 1.08
## 3      1     3     1        1    2    1       5       1          0    2 1.03
## 4      1     4     1        1    1    1       5       2          1    1 0.83
## ...  ...   ...   ...      ...  ...  ...     ...     ...        ...  ...  ...
## 3837  20   189     4        2    1    2       4       1          0    1 1.01
## 3838  20   190     4        2    1    1       1       2          1    1 0.57
## 3839  20   191     4        2    1    2       3       1          0    1 0.82
## 3840  20   192     4        2    1    1       5       2          1    1 0.57
##      vstmCond vstmResp vstmRT
## 1           1        7      7
## 2           1        7      7
## 3           1        7      7
## 4           1        7      7
## ...       ...      ...    ...
## 3837        1        1   0.55
## 3838        2        2   0.62
## 3839        2        2   0.62
## 3840        1        1   0.74

length(unique(E3$SN))
## [1] 20

table(E3$Block, E3$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   2 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   3 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   4 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
table(E3$vstmLoad, E3$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   2 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E3$Congruency, E3$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   0 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
##   1 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96
table(E3$Resp, E3$SN) # 7 = no resp
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1  97  98  99  90 101  99  98  99  90  95 100  94  96  92  98  91  91 110  96
##   2  94  93  93  99  91  88  93  90 102  96  92  98  96  97  94 101 100  82  96
##   7   1   1   0   3   0   5   1   3   0   1   0   0   0   3   0   0   1   0   0
##    
##      20
##   1  97
##   2  95
##   7   0
table(E3$vstmResp[E3$vstmLoad==2], E3$SN[E3$vstmLoad==2])
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 51 49 55 57 57 41 50 45 47 55 49 52 53 44 49 35 55 57 46 46
##   2 45 47 41 39 39 51 46 50 48 38 47 44 43 52 46 60 41 39 50 50
##   7  0  0  0  0  0  4  0  1  1  3  0  0  0  0  1  1  0  0  0  0

E3$SN <- factor(E3$SN)
E3$vstmLoad <- factor(E3$vstmLoad, levels=c(1,2), labels=c("Low","High"))
E3$Congruency <- factor(E3$Congruency, levels=c(0,1), labels=c("Incongruent","Congruent"))
E3$Corr <- ifelse(E3$Targ==E3$Resp,1,0)
E3$vstmCorr <- ifelse(E3$vstmLoad=="Low",1,ifelse(E3$vstmCond==E3$vstmResp,1,0))

table(E3$Corr, E3$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  10  22   3  18   5  18   4   7   6   7  18   8  10  13   6   9  25  30   4
##   1 182 170 189 174 187 174 188 185 186 185 174 184 182 179 186 183 167 162 188
##    
##      20
##   0   1
##   1 191
table(E3$vstmCorr, E3$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  13  19  13  23  15  24  18  22  17  18  15  16  11  18  14  34  11  31   8
##   1 179 173 179 169 177 168 174 170 175 174 177 176 181 174 178 158 181 161 184
##    
##      20
##   0   4
##   1 188
table(E3$TargPos, E3$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   2 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   3 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   4 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   5 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
##   6 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32


# Exp4: perceptual load
E4 <- read.csv("data/data_vstmAS4.csv", header = T)
headTail(E4)
##       SN Trial Block PercLoad Targ Flnk TargPos FlnkPos Congruency Resp   RT
## 1      1     1     1        1    2    2       2       2          1    7    7
## 2      1     2     1        1    2    2       4       2          1    2 0.64
## 3      1     3     1        1    2    1       6       1          0    1 0.47
## 4      1     4     1        1    2    1       3       2          0    2 0.78
## ...  ...   ...   ...      ...  ...  ...     ...     ...        ...  ...  ...
## 8061  21   381     8        2    1    1       2       1          1    1 0.84
## 8062  21   382     8        2    2    2       2       2          1    2 0.79
## 8063  21   383     8        2    2    1       4       1          0    2 0.82
## 8064  21   384     8        2    1    2       6       1          0    1 0.79

length(unique(E4$SN))
## [1] 21

table(E4$Block, E4$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21
##   1 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   2 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   3 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   4 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   5 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   6 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   7 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   8 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
table(E4$PercLoad, E4$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   2 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20  21
##   1 192 192
##   2 192 192
table(E4$Congruency, E4$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20  21
##   0 192 192
##   1 192 192
table(E4$Resp, E4$SN) # 7 = no resp
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 183 198 196 191 191 198 193 192 192 194 202 197 191 198 176 190 194 192 197
##   2 190 186 188 193 191 185 190 191 190 189 182 186 193 186 208 191 189 192 187
##   7  11   0   0   0   2   1   1   1   2   1   0   1   0   0   0   3   1   0   0
##    
##      20  21
##   1 199 196
##   2 185 188
##   7   0   0

E4$SN <- factor(E4$SN)
E4$PercLoad <- factor(E4$PercLoad, levels=c(1,2), labels=c("Low","High"))
E4$Congruency <- factor(E4$Congruency, levels=c(0,1), labels=c("Incongruent","Congruent"))
E4$Corr <- ifelse(E4$Targ==E4$Resp,1,0)

table(E4$Corr, E4$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  76  18   8  55  31  31  40  25  27  26  18  14   5  44  58  60  21  18  15
##   1 308 366 376 329 353 353 344 359 357 358 366 370 379 340 326 324 363 366 369
##    
##      20  21
##   0  21  14
##   1 363 370


# Exp5: overlap
E5 <- read.csv("data/data_vstmAS5.csv", header = T)
headTail(E5)
##       SN Trial Block vstmLoad Overlap Targ Flnk TargPos FlnkPos Congruency Resp
## 1      1     1     1        1       0    2    2       2       2          1    2
## 2      1     2     1        1       0    2    2       4       2          1    2
## 3      1     3     1        1       1    2    1       6       1          0    2
## 4      1     4     1        1       0    2    1       3       2          0    1
## ...  ...   ...   ...      ...     ...  ...  ...     ...     ...        ...  ...
## 7677  20   381     8        1       1    1    1       2       1          1    1
## 7678  20   382     8        1       1    2    1       5       2          0    2
## 7679  20   383     8        1       0    1    2       3       2          0    1
## 7680  20   384     8        1       0    1    1       4       2          1    1
##        RT vstmPos vstmCond vstmResp vstmRT
## 1    0.52       1        2        2   0.44
## 2    0.51       1        2        2   0.69
## 3     0.5       1        1        1   0.74
## 4    0.56       1        1        2   1.04
## ...   ...     ...      ...      ...    ...
## 7677 0.82       1        1        1   0.49
## 7678 0.75       2        2        2   0.48
## 7679 0.62       1        1        1   0.61
## 7680 0.63       1        1        1   0.49

table(E5$Block, E5$SN)
##    
##      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
##   1 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   2 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   3 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   4 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   5 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   6 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   7 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
##   8 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
table(E5$vstmLoad, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   2 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20
##   1 192
##   2 192
table(E5$Overlap, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20
##   0 192
##   1 192
table(E5$Congruency, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20
##   0 192
##   1 192
table(E5$vstmPos, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##   2 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
##    
##      20
##   1 192
##   2 192
table(E5$Resp, E5$SN) # 7 = no resp
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   1 188 196 189 191 199 194 185 189 189 192 197 189 193 189 188 196 190 183 178
##   2 195 186 193 193 185 189 197 195 193 192 183 195 188 193 193 181 191 200 206
##   7   1   2   2   0   0   1   2   0   2   0   4   0   3   2   3   7   3   1   0
##    
##      20
##   1 195
##   2 189
##   7   0

E5$SN <- factor(E5$SN)
E5$vstmLoad <- factor(E5$vstmLoad, levels=c(1,2), labels=c("Low","High"))
E5$Congruency <- factor(E5$Congruency, levels=c(0,1), labels=c("Incongruent","Congruent"))
E5$Overlap <- factor(E5$Overlap, levels=c(0,1), labels=c("NonOverlap","Overlap"))
E5$Corr <- ifelse(E5$Targ==E5$Resp,1,0)
E5$vstmCorr <- ifelse(E5$vstmCond==E5$vstmResp,1,0)

table(E5$Corr, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  19   9   5   3  21   7  14   3   9   4  10   3  10   8  12  22  20  48  22
##   1 365 375 379 381 363 377 370 381 375 380 374 381 374 376 372 362 364 336 362
##    
##      20
##   0   9
##   1 375
table(E5$vstmCorr, E5$SN)
##    
##       1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
##   0  70  64  57  62  41  93  60  58  46  52  78  90  90  63  82  69  73  62  57
##   1 314 320 327 322 343 291 324 326 338 332 306 294 294 321 302 315 311 322 327
##    
##      20
##   0  52
##   1 332






1 Experiment 1

VSTM low loadhigh load 조건의 기억항목은 각각 한 개와 네 개. 두 조건은 무작위 순서(interleaved).

ggdraw() + draw_image("fig_proc/procExp1.png")