Stroop
This final section of the tutorial brings together everything you've learned to create a full, working assessment based on the Stroop task.
In psychology, the Stroop effect is the delay in reaction time between congruent and incongruent stimuli. The effect has been used to create a psychological test (the Stroop test) that is widely used in clinical practice and investigation. A basic task that demonstrates this effect occurs when there is a mismatch between the name of a color (e.g., "blue", "green", or "red") and the color it is printed on (i.e., the word "red" printed in blue ink instead of red ink). When asked to name the color of the word it takes longer and is more prone to errors when the color of the ink does not match the name of the color. The effect is named after John Ridley Stroop, who first published the effect in English in 1935. The effect had previously been published in Germany in 1929 by other authors. The original paper by Stroop has been one of the most cited papers in the history of experimental psychology, leading to more than 700 Stroop-related articles in literature.
Planning the assessment
There are many variations of the Stroop task. We'll use a simple version. Our assessment will need the following:
- Instructions.
- A fixation cross.
- Stimulus that is a word, "Red", "Green", or "Blue", each of which may appear in a different color, randomly determined to be congruent or incongruent.
- Response buttons (labeled "Red", "Green", and "Blue") for the participant to click.
- Saving data on the participant's response time and accuracy.
- Schema for the data collected.
- Repeated trials of the task.
- A completion screen that optionally shows the participant's results.
- Configurable parameters for:
- the number of trials.
- the number of congruent and incongruent trials.
- how long the fixation cross appears.
- how long is the delay between when the fixation cross disappears and the stimulus appears.
- whether or not to show results feedback to the participant.
A note about screen size
In the tutorial, we've been using a screen size of 200 width x 400 height. This is a small size so the examples fit next to the code editor. For a real task, you'll use a larger screen size. In the Stroop task options, you will define a screen size of 400 width x 800 height:
const options = {
name: "Documentation Example",
id: "docs",
publishUuid: "c9ec7b5b-a6cc-4308-9b1c-73b40ae4aa9e",
width: 400, height: 800,
fonts: [{
fontName: "roboto",
url: "fonts/roboto/Roboto-Regular.ttf"
}],
};
As we build the task, however, it will appear in the same small area as all the other examples, automatically scaled down to fit the space allocated, which is 200 x 400. Once we've finished programming the task, we will present it within a page that allocates enough space for it to display at 400 x 800.
m2c2kit will scale the assessment to best fit the space allocated by the device. In terms of display clarity, the resolution you choose for the assessment is not important: 1200 x 2400 will not be any better than 400 x 800. Your main concern with defining the assessment size is the aspect ratio, because this will be preserved during resizing. 1:2 is a good aspect ratio for modern phones.
Just use 400 x 800. All the m2c2kit assessments use 400 x 800.