The ability to observe and organize environmental stimuli into meaningful knowledge is an important behaviour in animal survival. It helps to identify dangerous landscapes and poisonous foods, as well as understand the parameters of environmental features and abstract that to other similar stimuli. Furthermore, this ability has continued to influence higher order cognition in humans. For instance, among taxonomists, the ability to recognize characteristics of species and group them according to their similarities is a necessary professional skill. While many Galapagos finches appear similar, a taxonomist that was unable to tell the difference between them would not be particularly good.
In the COVIS model of category learning, categorization is characterized by two different systems competing simultaneously against each other in order to detect and process incoming information (Ashby, Alfonso-Reese, Turken, & Waldron, 1998). In it, categorization is assumed to be mediated by one of two independent systems. In the first system, a verbal system processes incoming information using learned, easily verbalizable rules and hypothesis testing. Its dependency on hypothesis testing and executive functioning indicates that this process is heavily influenced by working memory components. In particular, it is thought that these are the verbal components of working memory, as interpretted by Baddeley and Hitch in their 1974 paper, and updated by Baddeley in 1986, 2000, and 2013, and is specifically mediated by a central executive supportive system referred to as a the phonological loop. The phonological loop is a rehearsal mechanism responsible for maintain chuncks of temporary verbalizable information. For instance, I could ask you to remember a stream of numbers and you might do so by repeating the numbers to yourself over and over again. In contrast, the second system utilizes a similarity-based II process, where multiple dimensions of an object are integrated at a procedural learning-based level. Because of its reliance on procedural memory, II makes predictions about motor performance during categorization tasks; specifically that II performance will diminish in the presence of an unrelated motor function (Maddox, Bohil, & Ing, 2004). As both of these processes rely on seemingly independent systems in order to function and make different predictions, it would appear that the processes themselves can be differentiated from one another.
A fundamental aspect of multiple system categorization is that different systems are supported by different cognitive structures. In order to demonstrate this, it is necessary to provide instances of structure disruption impacting one system, but not the other. Though it could be said that RB learning is influenced by working memory, the evidence that supports this varies. It is especially important to consider that there is reason to think that RB learning may be affected by executive functioning and mood as well. Rule-based categorization appears to be influenced and mediated by a multitude of factors, the interaction of which is not well understood.
The current study addresses these concerns by having participants complete a Gaussian blur categorization task, where participants learn to categorize either a rule-based categorization set or a non-rule-based (Information Integration) category set. Simultaneously, participants will also be asked to complete one of two concurrent tasks. The first concurrent task will require participants to speak a list of letters out loud while simultaneously completing the categorization task. The second concurrent task will require participants to tap on the desk with their non-dominant hand when a colon appears on the screen during the categorization task. It is hypothesized that those participants who are assigned to the concurrent verbal task will show performance deficits in rule-based category learning. The concurrent verbal task is not expected to impact II category learning. Additionally, as information integration category learning is thought to be influenced by procedural memory and motor function, it is expected that those participants who are assigned to the tapping concurrent task will show performance deficits in information integration category learning, but not rule-based learning. This study’s tasks have been developed on Psychopy2 and involve participants being assigned to one of four groups, (1) rule-defined concurrent tapping, (2) rule-defined concurrent articulation, (3) information integration concurrent tapping, or (4) information integration concurrent articulation.
The first step in any R analysis requires us to prepare the libraries that R will use.
#First install the packages that you don't already have in R. For example, I don't have the packages for 'schoRsch' and 'summary tools'. Once they've been installed, we # them out so that I don't continue to install them every time we run this script.
#install.packages('schoRsch')
#install.packages('summarytools')
#install.packages('apaTables')
#install.packages('Rmisc')
#install.packages('knitr')
#install.packages('kableExtra')
#install.packages('prettydoc')
#install.packages('tidyverse')
#install.packages("knitr")
#install.packages('ez')
#install.packages('stringi')
#install.packages("ggplot2")
#install.packages("colorspace")
#install.packages('curl')
#install.packages("data.table")
#install.packages("zip")
#install.packages("broom")
library(broom)
library(stringi)
library(ggplot2) #for plotting
library(readxl) #reading in excel docs
library(ez) #this package is calls the car package and runs basic ANOVAs and other stats
library(apaTables)
library(RColorBrewer)
library(schoRsch)
library(Rmisc)
library(summarytools)
library(knitr)
library(plyr)
library(kableExtra)
library(prettydoc)
library(tidyverse)
Next, we will need to import the data that we will be using for our analysis.The following data is a set of 20 participants collected as part of a Honours thesis project.
#mydata = readr::read_csv("https://www.dropbox.com/home/Psychopy%20Examples/coarticulation%20gabor%20blur%20task/Data%20Analysis?preview=Cogintcatlearning.csv")
library(readr)
mydata <- read_csv("COVISInteferenceData.csv")
#View(mydata)
Before we can begin our data analysis, we must first create a new data frame. R works best when data has been organized into a long format/matrix. Right now, our data is a ‘short’ format, where each participant has a column for each block. What we want is for each participant to have their own row for each block of each variable, so eight total. Before we can analyse each block, we need to have a single column (that we’ll call performance) with the performance at that block for a subject, and another column (called block) with the numbers 1, 2, 3, and 4 in it. The new data frame will have a column for Subject, Category, Concurrent Task, Block, and Performance.
We’ll begin by using our old data file.
Subject <- mydata$`Participant Code`
Category <-mydata$`Category Set`
ConcurrentTask <- mydata$`Concurrent Set`
Condition <- mydata$Condition
#Blocks for Accuracy
Block1 <- mydata$`B1 Accuracy`
Block2 <- mydata$`B2 Accuracy`
Block3 <- mydata$`B3 Accuracy`
Block4 <- mydata$`B4 Accuracy`
#Now that we have collected our data, we can arrange it into a single data frame.
myaccdata_wide <- data.frame(Subject, Category, ConcurrentTask, Condition, Block1, Block2, Block3, Block4)
Next we need to make this taller.
library(tidyr)
myaccdata_wide <- gather(myaccdata_wide, Block, Performance,
Block1:Block4, factor_key = TRUE)
Lets make a table of our performance.Below we can we performance broken down by several factors. Though it looks large, remember that it is a representation of the accuracy and response across four blocks, for each of our four conditions (RB/Letters, RB/Tapping, II/Letters, II/Tapping).
mydata_acc <- summarySE(data = myaccdata_wide, measurevar = "Performance", groupvars = c("Category", "ConcurrentTask", "Condition", "Block"),
na.rm = FALSE, conf.interval = 0.95, .drop = TRUE)
kable(mydata_acc, digits = 3,
caption = "Table 1. Accuracy Performance Summary",
align = 'c') %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Category | ConcurrentTask | Condition | Block | N | Performance | sd | se | ci |
|---|---|---|---|---|---|---|---|---|
| II | Letters | C2 | Block1 | 20 | 0.623 | 0.110 | 0.025 | 0.052 |
| II | Letters | C2 | Block2 | 20 | 0.621 | 0.127 | 0.028 | 0.059 |
| II | Letters | C2 | Block3 | 20 | 0.668 | 0.112 | 0.025 | 0.053 |
| II | Letters | C2 | Block4 | 20 | 0.694 | 0.144 | 0.032 | 0.068 |
| II | None | Control 2 | Block1 | 19 | 0.655 | 0.081 | 0.018 | 0.039 |
| II | None | Control 2 | Block2 | 19 | 0.713 | 0.073 | 0.017 | 0.035 |
| II | None | Control 2 | Block3 | 19 | 0.694 | 0.130 | 0.030 | 0.063 |
| II | None | Control 2 | Block4 | 19 | 0.738 | 0.110 | 0.025 | 0.053 |
| II | Tapping | C4 | Block1 | 18 | 0.601 | 0.111 | 0.026 | 0.055 |
| II | Tapping | C4 | Block2 | 18 | 0.697 | 0.104 | 0.024 | 0.051 |
| II | Tapping | C4 | Block3 | 18 | 0.711 | 0.152 | 0.036 | 0.076 |
| II | Tapping | C4 | Block4 | 18 | 0.712 | 0.119 | 0.028 | 0.059 |
| RB | Letters | C1 | Block1 | 21 | 0.524 | 0.080 | 0.017 | 0.036 |
| RB | Letters | C1 | Block2 | 21 | 0.582 | 0.114 | 0.025 | 0.052 |
| RB | Letters | C1 | Block3 | 21 | 0.610 | 0.134 | 0.029 | 0.061 |
| RB | Letters | C1 | Block4 | 21 | 0.643 | 0.151 | 0.033 | 0.069 |
| RB | None | Control 1 | Block1 | 19 | 0.596 | 0.113 | 0.026 | 0.054 |
| RB | None | Control 1 | Block2 | 19 | 0.668 | 0.141 | 0.032 | 0.068 |
| RB | None | Control 1 | Block3 | 19 | 0.687 | 0.151 | 0.035 | 0.073 |
| RB | None | Control 1 | Block4 | 19 | 0.681 | 0.165 | 0.038 | 0.079 |
| RB | Tapping | C3 | Block1 | 20 | 0.535 | 0.075 | 0.017 | 0.035 |
| RB | Tapping | C3 | Block2 | 20 | 0.606 | 0.178 | 0.040 | 0.083 |
| RB | Tapping | C3 | Block3 | 20 | 0.612 | 0.156 | 0.035 | 0.073 |
| RB | Tapping | C3 | Block4 | 20 | 0.648 | 0.162 | 0.036 | 0.076 |
Now let’s plot some learning curves using the table we just built as a reference.
AC_Full = ggplot(mydata_acc, aes(x = Block, y = Performance, group = Condition, Colour = Condition))+
geom_line(aes(colour = Condition, group = Condition), position = position_dodge(width = .4))+
geom_point(aes(colour = Condition), position = position_dodge(width = .4))+
geom_errorbar(aes(ymin = Performance-se, ymax = Performance+se), width = 0.1, position = position_dodge(width = .4))+
ggtitle("Accuracy by Block")+
scale_fill_discrete(name = "Condition")+
scale_fill_brewer(palette = "Paired")+
theme_classic()
AC_Full + scale_color_discrete(
name = "Condition",
breaks = c("C1", "C2", "C3", "C4", "Control 1", "Control 2"),
labels = c("Rule-Based Verbal Concurrent","Information Integration Verbal Concurrent", "Rule-Based Motor Concurrent", "Information Integration Motor Concurrent", "Rule-Based Control", "Information Integration Control")
)
There’s a lot of information in this graph. Again, we see the four different conditions compaired across each block. However, in regards to our hypothesis, we’re most interested in the difference in performance between the two concurrent tasks in the Rule-Based category set and the two concurrent tasks in the Information Integration category set. Let’s make two graphs that depict this.
First, the Rule-Based category set:
acgraph = ggplot(mydata_acc, aes(x = Block, y = Performance, group = Condition, Colour = Condition))+
geom_line(aes(colour = Condition, group = Condition), position = position_dodge(width = .4))+
geom_point(aes(colour = Condition), position = position_dodge(width = .4))+
geom_errorbar(aes(ymin = Performance-se, ymax = Performance+se), width = 0.1, position = position_dodge(width = .4))+
ggtitle("Accuracy by Block")+
scale_fill_discrete(name = "Condition")+
scale_fill_brewer(palette = "Paired")+
theme_classic()
#Now we'll tell R to break the graphs down by Category Type, which we specified earlier.
acgraph = acgraph + facet_wrap(~ Category) + scale_color_discrete(
name = "Condition",
breaks = c("C2", "C4", "Control 2", "C1", "C3", "Control 1"),
labels = c("Information Integration Verbal Concurrent", "Information Integration Motor Concurrent", "Information Integration Control", "Rule-Based Verbal Concurrent","Rule-Based Motor Concurrent", "Rule-Based Control")
)
print(acgraph)
ggsave("acgraph.pdf")
Now we can see performance (accuracy) broken down by category set. On the left, we can see the performance of conditions C2 and C4 in the Information Integration category set (II). If we’re familiar with the original data set, we will know that the C2 group completed an II category set while completing a concurrent letter articulation task, and the C4 group completed an II category set while completing a concurrent tapping task. It was expected that for the II category set, participants who were in the tapping condition would perform worse than those participants in the letter task. This was thought to occur because II category learning requires the use of procedural memory, which is also thought to be used in motor function tasks. A diversion in resources because of a concurrent motor task, should move resources away from II category learning, resulting in poorer performance. As we can see, this does not appear to be the case in our II
To set up a between subjects ANOVA using ez, we need to specify the data file (that we created above), the dependent variable, the error term and the factors.
Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().Collapsing data to cell means. IF the requested effects are a subset of the full design, you must use the “within_full” argument, else results may be inaccurate.
| Effect | DFn | DFd | SSn | SSd | F | p | p<.05 | ges | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | (Intercept) | 1 | 110 | 193.7890 | 5.5038 | 3873.0819 | 0.0000 | * | 0.9640 |
| 2 | Category | 1 | 110 | 0.4540 | 5.5038 | 9.0731 | 0.0032 | * | 0.0590 |
| 3 | ConcurrentTask | 2 | 110 | 0.2932 | 5.5038 | 2.9304 | 0.0576 | 0.0389 | |
| 5 | Block | 3 | 330 | 0.6062 | 1.7395 | 38.3368 | 0.0000 | * | 0.0772 |
| 4 | Category:ConcurrentTask | 2 | 110 | 0.0214 | 5.5038 | 0.2139 | 0.8078 | 0.0029 | |
| 6 | Category:Block | 3 | 330 | 0.0067 | 1.7395 | 0.4218 | 0.7375 | 0.0009 | |
| 7 | ConcurrentTask:Block | 6 | 330 | 0.0418 | 1.7395 | 1.3229 | 0.2462 | 0.0057 | |
| 8 | Category:ConcurrentTask:Block | 6 | 330 | 0.0365 | 1.7395 | 1.1529 | 0.3314 | 0.0050 |
Block Main Effect Based on an alpha level of 0.05, a main effect of Block was found with F(3, 210) = 24.3511, p < 0.0000, n^2 = 0.0801. A post hoc bonferroni correction confirms a significant difference between block 1 and block 4 in the rule-based category sets (p = 0.0142).
#Define RB data sets:
RB_Perf = subset(mydata_acc, Category == "RB")
#Create a pairwise t test with bonferroni correction:
RB_post = pairwise.t.test(RB_Perf$Performance, RB_Perf$Block, p.adjust.method = "bonferroni", paired = T)
#Round the results to 4 decimal points:
RB_post = data.frame(round(RB_post$p.value,4))
#Format the results table so that significant p-values with be bolded:
RB_posthoc = RB_post %>%
mutate(
Block1 = text_spec(Block1, bold = (ifelse(Block1 < .05, "TRUE", "FALSE"))),
Block2 = text_spec(Block2, bold = (ifelse(Block2 < .05, "TRUE", "FALSE"))),
Block3 = text_spec(Block3, bold = (ifelse(Block3 < .05, "TRUE", "FALSE")))
)
#Add row labels:
RB_posthocL = data.frame("Comparison" = c("Block2", "Block3", "Block4"))
RB_posthoc = cbind(RB_posthocL, RB_posthoc)
#Create a table to display the results:
kable(RB_posthoc, digits = 4,
caption = "Table 4. Post-hoc test of rule-defined performance across block.",
align = 'c', escape = FALSE) %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Comparison | Block1 | Block2 | Block3 |
|---|---|---|---|
| Block2 | 0.0337 | NA | NA |
| Block3 | 0.0031 | 0.3839 | NA |
| Block4 | 0.0567 | 0.8343 | 1 |
#Repeat this process for II Blocks. Define data set for II:
II_Perf = subset(mydata_acc, Category == "II")
#Create a pairwise t test with bonferroni correction:
II_post = pairwise.t.test(II_Perf$Performance, II_Perf$Block, p.adjust.method = "bonferroni", paired = T)
#Round the results to 4 decimal points:
II_post = data.frame(round(II_post$p.value,4))
#Format the results table so that significant p-values with be bolded:
II_posthoc = II_post %>%
mutate(
Block1 = text_spec(Block1, bold = (ifelse(Block1 < .05, "TRUE", "FALSE"))),
Block2 = text_spec(Block2, bold = (ifelse(Block2 < .05, "TRUE", "FALSE"))),
Block3 = text_spec(Block3, bold = (ifelse(Block3 < .05, "TRUE", "FALSE")))
)
#Add row labels:
II_posthocL = data.frame("Comparison" = c("Block2", "Block3", "Block4"))
II_posthoc = cbind(II_posthocL, II_posthoc)
#Create a table to display the results:
kable(II_posthoc, digits = 4,
caption = "Table 5. Post-hoc test of information integration performance across block.",
align = 'c', escape = FALSE) %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Comparison | Block1 | Block2 | Block3 |
|---|---|---|---|
| Block2 | 1 | NA | NA |
| Block3 | 0.682 | 1 | NA |
| Block4 | 0.1632 | 0.7195 | 1 |
The following data is for response time values. To being, we’ll have to edit our wide data frame that we were using before to include response time for blocks, rather than accuracy.
Subject <- mydata$`Participant Code`
Category <-mydata$`Category Set`
ConcurrentTask <- mydata$`Concurrent Set`
Condition <- mydata$Condition
#Blocks for Response Time
Block1 <- mydata$`B1 Response Time`
Block2 <- mydata$`B2 Response Time`
Block3 <- mydata$`B3 Response Time`
Block4 <- mydata$`B4 Response Time`
#Now that we have collected our data, we can arrange it into a single data frame.
myRTdata_wide <- data.frame(Subject, Category, ConcurrentTask, Condition, Block1, Block2, Block3, Block4)
#We'll gather the values that we want for our visualization and analysis:
myRTdata_wide <- gather(myRTdata_wide, Block, Performance,
Block1:Block4, factor_key = TRUE)
Here is our table of data:
#And then visualize it:
mydata_RT <- summarySE(data = myRTdata_wide, measurevar = "Performance", groupvars = c("Category", "ConcurrentTask", "Condition", "Block"),
na.rm = FALSE, conf.interval = 0.95, .drop = TRUE)
kable(mydata_RT, digits = 3,
caption = "Table 3. Response Time Performance Summary",
align = 'c') %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Category | ConcurrentTask | Condition | Block | N | Performance | sd | se | ci |
|---|---|---|---|---|---|---|---|---|
| II | Letters | C2 | Block1 | 19 | 1.719 | 1.297 | 0.298 | 0.625 |
| II | Letters | C2 | Block2 | 19 | 0.834 | 0.335 | 0.077 | 0.162 |
| II | Letters | C2 | Block3 | 19 | 0.817 | 0.391 | 0.090 | 0.188 |
| II | Letters | C2 | Block4 | 19 | 0.869 | 0.420 | 0.096 | 0.202 |
| II | None | Control 2 | Block1 | 19 | 1.277 | 0.811 | 0.186 | 0.391 |
| II | None | Control 2 | Block2 | 19 | 0.920 | 0.284 | 0.065 | 0.137 |
| II | None | Control 2 | Block3 | 19 | 0.825 | 0.242 | 0.055 | 0.116 |
| II | None | Control 2 | Block4 | 19 | 0.877 | 0.308 | 0.071 | 0.149 |
| II | Tapping | C4 | Block1 | 16 | 1.473 | 0.471 | 0.118 | 0.251 |
| II | Tapping | C4 | Block2 | 16 | 1.063 | 0.413 | 0.103 | 0.220 |
| II | Tapping | C4 | Block3 | 16 | 1.005 | 0.327 | 0.082 | 0.174 |
| II | Tapping | C4 | Block4 | 16 | 1.005 | 0.320 | 0.080 | 0.171 |
| RB | Letters | C1 | Block1 | 20 | 1.297 | 0.755 | 0.169 | 0.353 |
| RB | Letters | C1 | Block2 | 20 | 0.877 | 0.446 | 0.100 | 0.209 |
| RB | Letters | C1 | Block3 | 20 | 0.764 | 0.280 | 0.063 | 0.131 |
| RB | Letters | C1 | Block4 | 20 | 0.757 | 0.325 | 0.073 | 0.152 |
| RB | None | Control 1 | Block1 | 17 | 1.478 | 0.465 | 0.113 | 0.239 |
| RB | None | Control 1 | Block2 | 17 | 1.218 | 0.458 | 0.111 | 0.235 |
| RB | None | Control 1 | Block3 | 17 | 1.138 | 0.427 | 0.104 | 0.220 |
| RB | None | Control 1 | Block4 | 17 | 0.999 | 0.408 | 0.099 | 0.210 |
| RB | Tapping | C3 | Block1 | 19 | 1.699 | 0.737 | 0.169 | 0.355 |
| RB | Tapping | C3 | Block2 | 19 | 1.108 | 0.489 | 0.112 | 0.235 |
| RB | Tapping | C3 | Block3 | 19 | 1.044 | 0.438 | 0.100 | 0.211 |
| RB | Tapping | C3 | Block4 | 19 | 0.907 | 0.322 | 0.074 | 0.155 |
Now let’s create three graphs. The first should be with all of the conditions and the second and third should be broken down into their respective category sets.
rtplot = ggplot(mydata_RT, aes(x = Block, y = Performance, group = Condition, Colour = Condition))+
geom_line(aes(colour = Condition, group = Condition), position = position_dodge(width = .4))+
geom_point(aes(colour = Condition), position = position_dodge(width = .4))+
geom_errorbar(aes(ymin = Performance-se, ymax = Performance+se), width = 0.1, position = position_dodge(width = .4))+
ggtitle("Response Time by Block")+
ylab("Response Time")+
scale_fill_discrete(name = "Condition")+
scale_fill_brewer(palette = "Paired")+
theme_classic()
rtplot + scale_color_discrete(
name = "Condition",
breaks = c("C1", "C2", "C3", "C4", "Control 1", "Control 2"),
labels = c("Rule-Based Verbal Concurrent","Information Integration Verbal Concurrent", "Rule-Based Motor Concurrent", "Information Integration Motor Concurrent", "Rule-Based Control", "Information Integration Control")
)
#Now we'll tell R to break the graph down by Category Type, which we specified earlier.
rtplot + facet_wrap(~ Category) + facet_wrap(~ Category) + scale_color_discrete(
name = "Condition",
breaks = c("C2", "C4", "Control 2", "C1", "C3", "Control 1"),
labels = c("Information Integration Verbal Concurrent", "Information Integration Motor Concurrent", "Information Integration Control", "Rule-Based Verbal Concurrent","Rule-Based Motor Concurrent", "Rule-Based Control")
)
rt = ezANOVA(myRTdata_wide,
dv = .(Performance), #DV
wid = .(Subject), #Subject as within Independent Variable means subject is the error term
between = .(Category, ConcurrentTask), #Condition as the Independent Variable
within = .(Block),
detailed = TRUE,
return_aov = TRUE,
type = 3)
#apa.ezANOVA.table(rt, table.title = "Table 4. Mixed ANOVA on response time across block by category set and concurrent task.")
kable(rt$ANOVA, digits = 4,
caption = "Table 6. Mixed ANOVA on response time across block by category set and concurrent task.",
align = 'c') %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = TRUE, position = "center")
| Effect | DFn | DFd | SSn | SSd | F | p | p<.05 | ges | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | (Intercept) | 1 | 103 | 509.0611 | 55.5503 | 943.8882 | 0.0000 | * | 0.8183 |
| 2 | Category | 1 | 103 | 0.2422 | 55.5503 | 0.4491 | 0.5042 | 0.0021 | |
| 3 | ConcurrentTask | 2 | 103 | 2.2102 | 55.5503 | 2.0490 | 0.1341 | 0.0192 | |
| 5 | Block | 3 | 309 | 24.9367 | 57.4651 | 44.6964 | 0.0000 | * | 0.1808 |
| 4 | Category:ConcurrentTask | 2 | 103 | 2.4009 | 55.5503 | 2.2259 | 0.1131 | 0.0208 | |
| 6 | Category:Block | 3 | 309 | 0.4936 | 57.4651 | 0.8847 | 0.4493 | 0.0043 | |
| 7 | ConcurrentTask:Block | 6 | 309 | 1.3574 | 57.4651 | 1.2165 | 0.2974 | 0.0119 | |
| 8 | Category:ConcurrentTask:Block | 6 | 309 | 1.3417 | 57.4651 | 1.2024 | 0.3047 | 0.0117 |
Block Main Effects Based on an alpha level of 0.05, a main effect of Block was found with F(3, 210) = 31.9265, p < 0.0000, n^2 = 0.1941. In the Rule-Based category set, a bonferroni correction indicated a significant difference between Block 2 and Block 4 in Rule-Based Category sets (p = 0.0275).
#Define RB data sets:
RB_Perf = subset(mydata_RT, Category == "RB")
#Create a pairwise t test with bonferroni correction:
RB_post = pairwise.t.test(RB_Perf$Performance, RB_Perf$Block, p.adjust.method = "bonferroni", paired = T)
#Round the results to 4 decimal points:
RB_post = data.frame(round(RB_post$p.value,4))
#Format the results table so that significant p-values with be bolded:
RB_posthoc = RB_post %>%
mutate(
Block1 = text_spec(Block1, bold = (ifelse(Block1 < .05, "TRUE", "FALSE"))),
Block2 = text_spec(Block2, bold = (ifelse(Block2 < .05, "TRUE", "FALSE"))),
Block3 = text_spec(Block3, bold = (ifelse(Block3 < .05, "TRUE", "FALSE")))
)
#Add row labels:
RB_posthocL = data.frame("Comparison" = c("Block2", "Block3", "Block4"))
RB_posthoc = cbind(RB_posthocL, RB_posthoc)
#Create a table to display the results:
kable(RB_posthoc, digits = 4,
caption = "Table 7. Post-hoc test of rule-defined performance across block.",
align = 'c', escape = FALSE) %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Comparison | Block1 | Block2 | Block3 |
|---|---|---|---|
| Block2 | 0.2818 | NA | NA |
| Block3 | 0.185 | 0.1594 | NA |
| Block4 | 0.1445 | 0.1659 | 0.9716 |
#Repeat this process for II Blocks. Define data set for II:
II_Perf = subset(mydata_RT, Category == "II")
#Create a pairwise t test with bonferroni correction:
II_post = pairwise.t.test(II_Perf$Performance, II_Perf$Block, p.adjust.method = "bonferroni", paired = T)
#Round the results to 4 decimal points:
II_post = data.frame(round(II_post$p.value,4))
#Format the results table so that significant p-values with be bolded:
II_posthoc = II_post %>%
mutate(
Block1 = text_spec(Block1, bold = (ifelse(Block1 < .05, "TRUE", "FALSE"))),
Block2 = text_spec(Block2, bold = (ifelse(Block2 < .05, "TRUE", "FALSE"))),
Block3 = text_spec(Block3, bold = (ifelse(Block3 < .05, "TRUE", "FALSE")))
)
#Add row labels:
II_posthocL = data.frame("Comparison" = c("Block2", "Block3", "Block4"))
II_posthoc = cbind(II_posthocL, II_posthoc)
#Create a table to display the results:
kable(II_posthoc, digits = 4,
caption = "Table 8. Post-hoc test of information integration performance across block.",
align = 'c', escape = FALSE) %>%
kable_styling(bootstrap_options =
c("hover", "responsive", "striped"),
full_width = F, position = "center")
| Comparison | Block1 | Block2 | Block3 |
|---|---|---|---|
| Block2 | 0.4892 | NA | NA |
| Block3 | 0.3249 | 0.7846 | NA |
| Block4 | 0.3287 | 1 | 1 |