KBB CPT (In depth) - LeoLedesma237/LeoWebsite GitHub Wiki
Our CPT task was created using PsycoPy-2023.2.3. This program is commonly used in psychological related research. It provides a graphical user interface to make programming tasks easier than writing code in Python. It is also designed to work well with Excel. Thus, researchers that have very low familiarity with Python code (including myself) can create columns (variables) in Excel with different values that can be used for trial manipulation in PsychoPy. This is exactly the approach we took.
However, instead of manually creating variables and their respective values in Excel, an R script was used to create a data frame that was then saved as an Excel file. Not only does this approach save time and allow for easy modifications to variables in the future, but it also mitigates potential errors from manually entering values. Additionally, to verify that the R script and PsychoPy are producing the trials that we intended, a separate R script was created to report on the data quality of pilot data collection.
Initial R script
The R script creates a data frame with 8 variables and saves them as an excel file. The variables are as follows:
file_name
Stimuli_duration
Block_num
Version_num
ISI_start
ISI
file_pathway
Trial_Type
The variable file_name
contains the name of each stimulus that will be presented to the participant. Each participant will be presented the same stimulus, in the same order, with the same interstimulus interval (ISI).
There are 7 unique stimuli (all geometric shapes): a cross, triangle, square, pentagon, hexagon, diamond, and a circle. They were all created from default shapes in Microsoft PowerPoint. One of these shapes, the cross, will function as a non-target and the other six shapes will function as targets. The non-target stimulus (cross) will be shown 10% of the time and the targets will be shown 90% of the time. When the target is shown, the subject will have a certain amount of time (1-4 sec) to press the spacebar. However, when the non-target is displayed, the participant must reframe from hitting the spacebar. Essentially, this task functions similarly to a Go/No-Go task. Information on whether the trial presented a targer or non-target stimulus is saved in the Trial_Type
variable.
Each stimulus will be shown for 0.25 seconds (250 milliseconds). This was decided based on a study that used the Conner's CPT-II (CPT-II) in a developmental population (Miranda et al., 2012). Additionally, a 250-millisecond stimulus duration for the CPT-II was also used in adult populations (Zane et al., 2016). Thus, this stimulus duration seems appropriate for our sample with ages ranged from 6-18 years old. '0.250' is the value used for the variable Stimuli_duration
.
There are 6 blocks just as in the original CPT-II task. According to Conner and colleagues (2018), the CPT-II blocks contain 60 trials for a total of 360 trials. Each block is made up of 3 sub-blocks that have 20 trials with an ISI of 1, 2, or 4 seconds. ISI refers to the duration of time that occurs between the end of a stimulus and the start of the successive stimulus. The sub-blocks are shown in different orders in each of the 6 blocks to counterbalance the ISI.
Block_Num | Version_Num | ISI (sec) |
---|---|---|
1 | v1 | 2 |
1 | v2 | 4 |
1 | v3 | 1 |
2 | v1 | 1 |
2 | v2 | 2 |
2 | v3 | 4 |
3 | v1 | 4 |
3 | v2 | 2 |
3 | v3 | 1 |
4 | v1 | 1 |
4 | v2 | 4 |
4 | v3 | 2 |
5 | v1 | 2 |
5 | v2 | 1 |
5 | v3 | 4 |
6 | v1 | 4 |
6 | v2 | 1 |
6 | v3 | 2 |
From the table above, we can see that there are 6 unique values for the variable Block_num
that represent the block numbers. Each of these blocks has three different versions Version_num
, however, this variable is more for quality control than having actual meaning. The ISI
variable is very important because it codes for the ISI that each stimulus will have in a given sub-block. Thus, this variable contains the values 1, 2, and 4 in a specific order.
It is important to note that there is a delay between the start of the trial and the start of the presentation of a stimulus (a shape) of roughly .015 seconds. While this delay seems miniscule, it does decrease the length of the trials from the intended 2.2 seconds (if ISI is equal to 2) to 1.85 seconds. However, this can be fixed by delaying the start of the ISI by .015, which is what the variable ISI_start
does. Lastly, PsychoPy does not know where the stimuli are located. They are essentially .png files saved in a specific folder. The variable file_pathway
tells PsychoPy what directory the stimulus .png files are so they can be displayed during the task.
Post R script (Quality Control)
The table below shows the output of the first 19 trials in pilot recorded CTP-II data (our version). The start time of each trial was subtracted by itself to have them all start at 0 seconds. Additionally, the time stamps for: a) when the stimulus starts; b) when the stimulus stops; and c) when the ISI starts and stops were all subtracted from the time stamp of the start time of each trial. Thus, this makes it easier to visually inspect the data. As mentioned above, the start time of the stimulus (image.start) is slight delayed compared to the trial start time (trial.start), by .015 seconds (15 milliseconds) for all but the initial trial. Fortunately, this delay is accounted for in the start time of the ISI, and this is proven to be the case since the time stamp for the end of the stimulus presentation (image.stop) and the start time of the respective ISI (ISI.start) occurs at the same time (have the same values). The stimulus duration for each trial is 250-milliseconds as coded for. Lastly, we see that the trial duration is 2.25 seconds as intended (.250 (stimulus duration) + 2 (ISI duration) = 2.250 sec). Thus, this is evidence that the code for the task is working as expected.
References
Keith Conners, C., Sitarenios, G., Ayearst, L.E. (2018). Conners’ Continuous Performance Test Third Edition. In: Kreutzer, J.S., DeLuca, J., Caplan, B. (eds) Encyclopedia of Clinical Neuropsychology. Springer, Cham. https://doi.org/10.1007/978-3-319-57111-9_1535
Miranda, M. C., Barbosa, T., Muszkat, M., Rodrigues, C. C., Sinnes, E. G., Coelho, L. F. S., ... & Bueno, O. F. A. (2012). Performance patterns in Conners' CPT among children with attention deficit hyperactivity disorder and dyslexia. Arquivos de Neuro-psiquiatria, 70, 91-96.
Zane, K. L., Gfeller, J. D., Roskos, P. T., & Bucholz, R. D. (2016). The clinical utility of the Conners’ Continuous Performance Test-II in traumatic brain injury. Archives of clinical neuropsychology, 31(8), 996-1005.