You are on page 1of 225

EXPERIMENTAL SKILLS

IN PSYCHOLOGY
Bachelor Psychology 2020-2021
Coordinators and instructors
Coordinators

Dr. Jeroen Stekelenburg Ing. Hans Revers

(Introduction) 2
Welcome!

In the first online practical we will


explain all about Experimental Skills

For now, you can watch this short


introduction video of last year
(pre-Corona)
3
Course Overview

6 Tutorials (all-in this document):


 Tutorial 1: Simple Reaction Time experiment
 Tutorial 2: Priming experiment
 Tutorial 3: Flanker experiment
 Tutorial 4: Practice session & Data analysis
 Tutorial 5: Your own experiment (variation on Flanker experiment)
 Tutorial 6: Merge + analyse data & final report

(Introduction) 4
Experimental Psychology
1) Lectures
 Theories on cognitive processes in the brain
 Lecturer: Prof. Jean Vroomen
 Test = Exam

2) Tutorials Experimental Skills


 How to build and run experiments and analyse experimental data
 Lecturers: Dr. Jeroen Stekelenburg and ing. Hans Revers MSc
 Test = Report (deadline is the day of exam Experimental Psychology)

(Introduction) 5
Why Experimental Skills?

Knowledge about human cognition can be acquired by


doing experiments.

In this course you will acquire the tools and skills that
are necessary to study and describe the cognitive
functions of healthy individuals and patients.

(Introduction) 6
Learning objectives?

1. To build and administer (basic) psychological


experiments.

2. To describe, analyze and interpret experimental


data.

3. To describe the experimental methods and results


in a structured research report.

(Introduction) 7
Procedure of Experimental skills

Workbook and Report


• This workbook consists of 6 tutorials.
• You can do the tutorials at home or at any computer at
the university.
• You work your way through all tutorials.
• In each tutorial there are questions and assignments.
• The answers and assignments should be written up in a
separate document: Report_Experimental_Skills that can
be found on Canvas.
• The filled-out document Report_Experimental_Skills is
what you hand in and this will be graded.
(Introduction) 8
Procedure of Experimental skills

Workbook and Report


• The workbook will also contain short video clips with
instructions and demonstrations. You need to watch
these to fully understand the content of the tutorials.
• The tutorials start easy and will become progressively
more difficult.
• So, it is import that you really understand all the steps in
each tutorial.

(Introduction) 9
Procedure of Experimental skills

Questions by students
• Every year we receive many questions from students on
issues with Opensesame and Excel.
• 90% of the questions are due to:
– Not reading the instructions properly
– Not executing the instructions properly
– Not being careful or being imprecise in following the
instructions (being sloppy, typos, etc)
– Forgetting how to do things that were explained in the
previous tutorials

(Introduction) 10
Procedure of Experimental skills

Questions by students
• This means that if you are stuck or you get an error
message, 90% of the times you can easily fix this
yourself:
– Go back a few steps: re-read the instructions and do it
again
– Watch out for spelling mistakes
– Go back to previous tutorials when you have forgotten the
necessary steps

(Introduction) 11
Procedure of Experimental skills

Questions by students
• For most common issues, mistakes or error messages we
have made a Frequently Asked Questions List (FAQs). This
can be found on Canvas.
• Consult these FAQs first before contacting us.
• If you want to ask our help you must fill out a form in
which you explain the issue. This form is called
HelpMePlease and can be found on Canvas.
• Upload HelpMePlease with your question via Discussions
on Canvas (as an attachment).
• We will NOT respond to emails!
(Introduction) 12
Procedure of Experimental skills

Questions by students
• We will address your questions during an
online session that will be held once a week.

(Introduction) 13
Report
 Answer the questions that are asked throughout the tutorials.
 In tutorial 5/6: Run your own experiment on 5 subjects .
 Perform data analysis on the gathered data.
 Describe the methods and results of your study in a (short)
research report.
 Grade = pass/fail.

NB: A pass for experimental skills is necessary for passing the


course Experimental Psychology.

Hand in deadline: day of Experimental Psychology exam


online via: Canvas/Assignments/Experimental Skills
(Introduction) 14
OpenSesame
 The experiments will be build in the program OpenSesame.
 The workbook tutorials are based on OpenSesame (OS) v3.3 which can be
downloaded for use at home: https://osdoc.cogsci.nl/3.3/download/ (If
you get a message that the program might harm your computer: just
ignore, also see FAQ)
 There is also an OpenSesame version for Apple. Note though that the
tutorials are written for OpenSesame for Windows. Therefore, we do not
support the Apple version and will not answer questions that are specific
to the Apple version.
 See http://osdoc.cogsci.nl/ for more documentation, demonstrations and
videos.
 OS is a free-to-use open-source program. Although the program is
frequently updated, it still contains some bugs. Therefore, we urge you to
regularly save your experiments (after each step CTRL+S). Furthermore,
the latest OS version you have downloaded may differ slightly from the
version being used in the workbook.
(Introduction) 15
OpenSesame
First, watch this short clip about OpenSesame

16
OpenSesame
Toolbar: Save, Run

17
OpenSesame

OpenSesame Items

18
OpenSesame

Timeline/
structure

19
OpenSesame

Content/parameters of the selected item

20
OpenSesame

Help

21
General Tips & Advice

 Thoroughly read every step in the Tutorials and follow the


instructions carefully. Backtracking due to ‘sloppy’ mistakes is
very time-consuming and can easily be avoided.

 Try to comprehend the necessity of each step in order to


remember the steps. The tutorials increase in difficulty and
the steps are only explained once in detail (e.g. in Tutorial 3
you will build an experiment almost without instructions, so
you have to apply the knowledge from the previous tutorials).

(Introduction) 22
TO DO

• Download and install Opensesame on your own


computer https://osdoc.cogsci.nl/3.3/download/
• Download Report_Experimental_Skills from
Canvas
• On your computer: add your student number to
the name of Report_Experimental_Skills (e.g.
Report_Experimental_Skills_20358692)
• Download the HelpMePlease document
• Download the Frequently Asked Questions
document

23
Tutorial 1

Simple Reaction Time Task (SRT)

24
Simple Reaction time Task (SRT)

In a simple reaction time (RT) task, only one


stimulus (in this tutorial, a white circle) is
presented each trial. The subject has to react to
the stimulus as fast as possible (by pressing a
button).

Watch this short video clip about the SRT


Experiment
(Tutorial 1) 25
SRT experiment design

Start

Instruction

Stimulus

X number of trials Answer

Inter trial interval*

*The amount of time between a subject’s answer and


End presentation of the next stimulus is called the inter trial
interval (ITI)
(Tutorial 1) 26
Design a SRT experiment

• In tutorial 1, we will design an SRT experiment


using the OpenSesame experiment builder.
• We will present a stimulus (white circle on a
black screen) for a duration of 100 ms.
• The response (answer) is given using the 'm'
on the keyboard.
• ITI (the time between two trials) varies
between 2 and 4 seconds.
• This will be repeated 20 times.
(Tutorial 1) 27
Conventions regarding notations

• Bold text means that a particular action has to be performed,


like: Click the ‘Close’ button.
• Some words are enclosed in quotation marks (e.g. 'Close'), to
accentuate that specific word. When typing, do not copy the
quotation marks (so: Close).
• When instructed to click the mouse button, this entails
clicking the left mouse button, unless listed otherwise.
• Text in OpenSesame is case-sensitive: ‘Stimulus’ (with capital
S) is different from ‘stimulus’ (lowercase). So, be extremely
precise! Each year this mistake causes experiments to either
crash, or to run without collecting data.

(Tutorial 1) 28
SRT Experiment
What are we going to do today?
I. Create a new experiment
II. Enter Instructions
III. Create the trial structure
IV. Draw a stimulus
V. Define the response
VI. Add an ITI
VII. Log (register) the RT
VIII. Insert the End of the experiment
IX. Create a formula in Excel
X. Import data in Excel and calculate the average RT

(Tutorial 1) 29
Preparations

1) Create a new folder on your drive


1)
and name it ‘Tutorial1’. You will
save your experiment and data in
this folder (we recommend creating
a different folder for each tutorial).
Important: When working on a
student computer at the university,
DO NOT save the data on the C or D
drive. The C and D drives will be
erased every time you turn off the
computer! You have your own
private space on the network drive
on which the data will be stored
permanently (until you graduate).
The drive is called by your student
number (Open Explorer by the
combination of the windows key and
‘e’:  + e, and look for you own
2)
drive).

2) Start OpenSesame
Start  OpenSesame
OpenSesame

Do NOT click on ‘OpenSesame (runtime)’

(Tutorial 1) 30
I. Create a new experiment
1)
1) OpenSesame may show a ‘Get
Started’ Screen upon opening the
application.

(Tutorial 1) 31
2) Multiple options are displayed:

2) a)
a) Start a new experiment: create a
new experiment. There are 4 types
of templates (i.e. the basic structure b)
of an experiment): a simple one
(default) and 3 more advanced ones.

b) Continue with a recent experiment


(not always displayed): Open recent
existing experiment (i.e. the one you
have previously saved).

We have not created anything yet,


3)
so we select the 'Default template’
option.

Click 'Default template’

3) The following screen pops up.

(Tutorial 1) 32
4) The Overview window shows the 4)
basic experiment structure.

5) General settings that apply to the


whole experiment are displayed on
the right.

The primary options are:

5)
a) ‘Resolution‘: The default setting is
1024 pixels wide and 768 pixels
high. 1024 x 768 pixels is the screen
resolution during the administration c)
of the experiment.

b) ‘Foreground' and ‘Background': The a)


default setting is a white foreground
on a black background. So when, for b)
example, a word is displayed on the
screen, it will be white. The
background will be black.

c) The back-end should be on


‘xpyriment’. Change this if it is not
not set on ‘xpyriment’.

(Tutorial 1) 33
6) We start off with a new (empty)
experiment. First, unnecessary items 6)
are removed. Because we do not
need the 'getting_started' notepad
(Instructions), we remove it. Right
click the ‘getting_started‘-item.
Then click ‘Permanently delete all
linked copies’.

7) OS asks if you really want to remove


the item. Click ‘Yes’.

7)

8) Remove the 'welcome‘-item using


the same steps (this contains the
version number of OpenSesame).
You can also use the keyboard
shortcut ‘shift + delete’ if you have 8)
selected the item.

(Tutorial 1) 34
9) The next step is saving the 9)
experiment (do this regularly while
building your experiment!).

Click the ‘Save’ button


(Shortcut Keys: CTRL+S).

10)

10)

a) In the next window, navigate to the


‘Tutorial1’- folder you made earlier
(step 1).

b) Assign the following name:


'SimpleRT‘ followed by your student
number (i.e. SimpleRT12345678)

c) Click 'Save‘. Depending on your


Windows settings, the extension of
the file (.osexp) may or may not be
shown. If it is shown, do not change
it. If the extension is not shown, do
not add it (It is there, Windows is
just not showing it).

(Tutorial 1) 35
II. Enter Instructions 1)

We want the experiment to start off with


a task instruction. Therefore, we need to
add an item to the experiment that
allows us to create an instruction
message.
2)
1) Right click the 'experiment‘-item in
the Overview-window.

2) Click ‘Append item’. Two options are


displayed that allow us to either
append a new item (‘Append new
item’) or an existing item (‘Append
existing item’) to the experiment.

NOTE 1: In the ‘Append existing item’


option, you find every item that has
previously been used in the experiment.

(Tutorial 1) 36
3) The experiment should start with a
task Instruction. So we need to add
3)
an item that allows us to put text in
it (i.e. a ‘sketchpad’ item).

a) Click ‘Append new item’. A list


appears showing different items.

b) Select the ‘sketchpad‘ item.

4) The ‘sketchpad'-item
(new_sketchpad) is added to the
experiment (visible in the Overview-
window).
4)

(Tutorial 1) 37
5) We are going to rename item 5)
‘new_sketchpad' to 'Instruction'.

Right click the ‘new_sketchpad‘-


item in the Overview-window and
then click ‘Rename’.

6) The text can now be altered.


Type 'Instruction'. Then press the
ENTER key on the keyboard. 6)

7) Now let’s enter an instruction text.

Click the 'Instruction‘-item.

The sketchpad in which we can write


the instructions appears on the right
side of the screen. 7)
Click the text icon (A) to enter text.

(Save the experiment. shortcut: Ctrl+s)

(Tutorial 1) 38
8)
8) The ‘Draw textline element’ has a
number of adjustable properties,
including: font, letter size, text color
etc. These allow you to change the
appearance of the text. These
should be set before you enter any
text.

An important property is 'Duration':


this determines how long the text
will be displayed on the screen (in Draw textline element
milliseconds, so 1000 = 1 sec).

We want our subjects to be able to


read the instruction for as long as
they want and continue with the
experiment only when a button is
pressed (e.g. space bar).

Entering 'keypress' in the 'Duration'


field will enable this (this is the
default value, so you don’t have to
adjust anything for now). The
instruction text is now displayed
indefinitely. The experiment will
continue only if a (random) key is
pressed.

(Tutorial 1) 39
9)
9) Place the cursor anywhere on the
(black) canvas. We can later adjust
the location of the text, so location
is not important right now.

10) A screen appears that asks you to


enter a text. Enter the following
text:

‘Press the letter m as fast as you can Screen center


with your right index finger
when you see a white circle on the
screen.

Press the space bar to start the


experiment‘

Click ‘OK’ if you entered the correct


text. 10)

Instructions might also have been:


‘press any button to start the
experiment’. But if the subject
presses the Escape key, the
experiment will be aborted (of
course, we do not want that to
happen).

(Tutorial 1) 40
11)
11) Let’s change the location of the text
on the canvas.
Select the pointer.

12) Click the instruction text.


12) 13)
13) Hold down the left mouse button
and move the text to another
location.

14) If you double-click the text with the


pointer option, the textline screen
pops up. You can now adjust the
instructions (if necessary).
Note: OS is very picky in the click
location. It may take you a few
attempts before the textline screen 14) 14a)
opens.

14a) It could happen that the text is not


completely shown. You can see the
whole text by clicking on the ‘Best
fitting zoom level’ icon.

Save the experiment: CTRL+S


(Tutorial 1) 41
15) Now we add a 2-second black screen
15)
after the ‘Instruction’-item.

Adding this screen between the


instruction and first stimulus
ensures that the first stimulus does
not appear immediately after the
instruction, but after a short 2
second interval. 16)
Right click the item 'experiment‘ in
the Overview-window.

16) Add a ‘sketchpad‘-item (right click;


Append item; Append new item;
sketchpad)

17) Rename ‘new_sketchpad' into


‘Break' (right click, Rename).
17)
The result is shown in the overview
window

(Tutorial 1) 42
18) Click the ‘Break’ item. 18)
We want a black screen that is
displayed for 2 seconds. We will use
the ‘Duration’ property to achieve
this.

a) Click the pointer (to make sure only


the canvas is selected).

b) Set the ‘Duration’ at 2000 a)


(2000 ms = 2 sec), and press Enter.

Save the experiment: CTRL+S

b)

(Tutorial 1) 43
III. Creating the Trial structure 1)
1) Now click the 'experiment‘ item in
the Overview-window.

2) We are going to add a 'loop' item to


the experiment.
2)
A loop can repeat an item (a trial) an
x number of times. (For this
experiment we want to repeat the
trial 20 times, but the repetition of
20 trials will be done later in the
tutorial).

Right click ‘experiment’.

Choose Append item; Append new


item; loop. 3)

3) A ‘new_loop‘-item is added to the


‘experiment’- item.
Rename it into ‘Loop’

(Tutorial 1) 44
4) Using the loop item, we want to
repeat a trial an x number of times 4)
(in this case, 20 times, but again,
setting repetitions to 20 will be done
later in the tutorial). A trial is a
sequence of events. In OS, a trial is
therefore referred to as a ‘sequence
item’

Click the ‘sequence’ item (in the


‘items bar’ under ‘commonly
used’).
5)
Hold the left mouse button and
drag the sequence item onto the
‘Loop’ item.

5) A pop-up menu is displayed. Select:


‘Insert into Loop’.

6)
6) Rename the item from
'new_sequence' to 'Trial' (using the
right mouse button – ‘Rename’ –
type ‘Trial’)
Note it is Trial not Trail (a commonly
made mistake)

Save the experiment: CTRL+S

(Tutorial 1) 45
7) Click the ‘Loop’-item. 7) 8)
8) In the Loop-item type an ‘1’ in the cell
under the blue text ‘empty_column’ (in
your OS version it might also be called
‘new_column_1’) and press Enter. This
denotes that we only have 1 unique
trial (which we will repeat for 20 times,
later in the tutorial).

IV. Drawing a stimulus

1) Let’s add the visual stimulus to the trial. 1)


Click the ‘Trial’- item in the Overview-
window.

2) Add a ‘sketchpad‘-item to the Trial


(right click; Append item; Append new
item; sketchpad)
3)
2) 3)

3) You have added the sketchpad to the


'Trial.'
Click ‘new_ sketchpad'.

(Tutorial 1) 46
4) Rename the item ‘new sketchpad' 4)
to 'Stimulus_On‘. Then the click
'Stimulus_On’ item.

5) On the left side of the 'Stimulus_On'


item, the following tools to create a
visual stimulus are shown (you have
already used the first two): the
select tool, the text item, image,
fixation point, line, arrow, square,
circle, oval, Gabor patch (figure with
black-white stripes), noise patch
(figure with black-white dots).
5) 6
)
6) We also see the (black) canvas
(design area), on which the stimulus
can be drawn.

(Tutorial 1) 47
7) Step 7-13 involves drawing a white
circle on the canvas. 7)
Click the circle icon.

8) Before we actually start drawing, we


need to set several parameters
(properties).

a) 'Duration'. This is were you enter


the duration of the stimulus
presentation on the screen.
In this case, we want the stimulus to
be displayed for 100 ms (0.1 sec).

Enter in the ‘duration’ field: 100.

b) We want to use a solid (i.e. filled)


white circle as a stimulus.

Tick 'Fill'. a) b) c)
8)
The circle we are about to draw is
now filled with the selected color
(white).

c) ‘Show if’ is not altered (leave it at


‘always’). ‘Show if’ is a feature that
we will not use in the practicals.

(Tutorial 1) 48
How to draw a circle: Click on the location 9)
on the canvas where you want the center
of your circle to be. After this, hold down
the left mouse button and move the
mouse to the left or right (by doing this,
you increase the circle’s radius). 3

9) Click the cross section of the two


bold gridlines (this is the center of a)
the screen during the experiment). 10) 11)
(if anything goes wrong: see steps 12-13)

10) The radius of the circle will be 3


boxes (grid lines). Drag the mouse 1 2
0
cursor three boxes to the right.
Upon releasing the mouse button,
the circle is created. You see a green
shadow at first, this means that you
can still alter the circle (e.g. its color)
before it is actually drawn. NOTE 2: The standard size of 1
box in the “Grid” is 32 pixels:
11) Click the circle again to actually
draw it.

(Tutorial 1) 49
12) In case of any mistake while 12)
drawing, you can delete the stimulus
by right clicking it and clicking
‘delete’. It is also possible to just
press ‘delete’ on your keyboard.

13) You can move the circle by first


clicking the select tool and then
moving the circle with the mouse.
Just give a try, but make sure that at
the end the circle is in the middle of 13)
the canvas.

Save the experiment: CTRL+S

(Tutorial 1) 50
Practice with drawing, moving and a)
deleting a stimulus

Experience has taught us that many


things can go wrong in creating the circle
(or some other stimulus), which is why
we are going to practice creating and
deleting stimuli.

a) Randomly place a number of


stimuli on the canvas (lines,
squares, arrows,.. In different
colors, knock your socks off!)

b) Move the stimuli and then remove


everything but the circle in the
middle.
b)
Sometimes it is difficult to select and
subsequently remove an item (especially
a line). See the FAQs for an alternative
way to remove a stimulus from the
canvas.

(Tutorial 1) 51
14) Now we add a black screen to the 14)
trial, so the created stimulus
disappears from the screen after
100 ms leaving a black screen. This
screen is made using an empty
sketchpad (i.e. without a stimulus).

Click the item 'Trial‘ in the


Overview-window.

15) Add a new 'sketchpad’ item


15)
(Right click….etc).

16) Rename the ’new_sketchpad' item


into 'Stimulus_Off'.

16)

(Tutorial 1) 52
17) The only purpose of the
'Stimulus_Off‘ item is to ‘remove’ 17)
the visual stimulus with a black
screen. (read NOTE 3 carefully).

Click the ‘Stimulus_Off’ item. Select


the pointer and set the 'Duration' to
0.

Save the experiment: CTRL+S


NOTE 3: The default duration of a sketchpad item is ‘keypress’. This means that
the experiment does not continue until the subject presses a key.

When you set the ‘Duration’ at 0 ms, the screen (black screen in this case)
is displayed, but OpenSesame immediately continues to the next item of
V. Defining a response the Overview-window (in this case the keyboard_response item).

1) In the following steps,


we are going to add a
'keyboard_response' item that
enables us to measure a subject’s 1)
reaction time to the visual stimulus
(i.e. the white circle).

Click the 'Trial'-item in the


Overview-window.

(Tutorial 1) 53
2) Add a new ‘keyboard_response’ 2)
item (right click etc.) to the Trial
item.

3) Click the ‘new keyboard_response’-


item in the Overview-window and
rename it into ‘Answer’. 3)

Subsequently, click the item


‘Answer‘.

(Tutorial 1) 54
4) The property window of ‘Answer' 4)
has three parameters that we can
set. We will be using the ‘m’ key on
the keyboard as a response.

a) 'Correct response': This parameter is a)


important when the subject has to b)
decide between two or more c)
options (e.g. ‘m’ or ‘z’ and only one
is the correct response for a
particular trial: see next tutorial). In
this experiment, the response is the
same for every trial: the ‘m’ key.

Set the correct response to: ‘m’

b) 'Allowed responses': Here you enter NOTE 4:


which keys a subject is allowed to Timeout = infinite. When running the experiment, OpenSesame does
use: in this case, only the ‘m’ key. not proceed to the next item until a subject has given a response.
Again, set this parameter to ‘m’.
Timeout = 1000: If the subject does not respond within 1000 ms (= 1
sec), OpenSesame continues to the next item after 1 sec. If a response is
c) 'Timeout': This parameter reflects faster than 1 sec OpenSesame continues to the next item immediately
the amount of time a subject can after the response (depending on the task difficulty, the value of this
take to respond. Leave this parameter can be set higher or lower).
parameter as is (‘infinite’).
Carefully read NOTE 4.

(Tutorial 1) 55
VI. Add ITI 1)

1) Click the ‘Trial‘ item.


We are going to add the inter trial
interval (ITI). The ITI is the amount of
time between the response and the next
trial.
In simple reaction time tasks, subjects
can anticipate the next stimulus if you 2)
program a constant (non-variable) ITI,
because the time between their response
and the presentation of the next stimulus
is predictable (e.g. if you program an ITI
of 1 second the subject will ‘learn’ after a
few trials that the next stimulus will be
presented after exactly 1 second).
Result: the subject does not actually
respond to the stimulus.
To prevent this, we make the ITI longer
and variable. It makes the timing of the
next stimulus less predictable. Let’s set
the ITI to vary between 2 to 4 seconds.
For this we use the 'advanced delay‘ item.
3)
2) Add an 'advanced_delay’-item to
the ‘Trial’ item.

3) Rename the ‘new_advanced_delay'


into 'ITI'.
(Tutorial 1) 56
4) Click 'ITI’. Three parameters can be
set: see FAQs for more explanation
about the parameters of the 4)
advanced_delay item.

a) 'Duration': the average duration of a)


the ITI. Set it to 3000 ms (= 3 sec). b)
This halfway between 2 and 4
seconds (see also FAQs) c)

b) 'Jitter': the variation size (in ms)


with respect to the average ITI. Set it
to 1000 ms. The ITI will now vary
between 2000 and 4000 ms (3000
ms average plus or minus a
maximum of 1000 ms)

Uniform Std. Dev.


Likelihood of ITI (p)
c) 'Jitter mode': The way in which the
ITI variation is calculated. Choose:
'Uniform'. This means that OS draws
a random number between 2000
and 4000 ms and the likelihood of a
particular ITI being drawn is equal
for every number between 2000 and
4000. 2000 4000 2000 4000
ITI ITI
With the other option ‘Std. Dev.’
(standard deviation), the chance of
drawing an ITI around 3000 ms is
greater than the chance of drawing
one that is close to 2000 or 4000.

(Tutorial 1) 57
VII. Logging RT
1)
1) In this step, we are going to add the
final item of our trial. This item
enables us to save the subject’s
answers (reaction time) in a file: the
‘logger’ item.

Click the‘ Trial‘ item in the


Overview-window.

2) Add the 'logger' item to the Trial. 2)

(Tutorial 1) 58
3) Rename ‘new_logger’ into ‘Logger’.
Click ‘Logger’ in the overview 3)
window.
At the top of this window, you see:
‘Log all variables.’ If this is checked,
OS determines what is saved to the
log file.
However, we want to control this
ourselves. In this experiment, we
only want to save the reaction time.
Therefore, make sure that the ‘Log
all variables’ option is not checked.

4)
4) We want to save the reaction time
(OS calls this ‘response_time’) that is
collected by the item ‘Answer’. Click
the ‘Add custom variable’ button. A
window appears in which we can
type the variable that we want to be
logged. We want to save the
response_time collected by the item
Answer (response_time_Answer).

5) Type ‘response_time_Answer’ 5)
(exactly like this) and click the OK
button.

(Tutorial 1) 59
6) The logger now saves the RT that is 6)
collected by the Answer item during
each trial .

7) OS does not recognize variables that


do not exist (e.g. the variable
‘OS_is_great’). 7)
Variable names are case-sensitive
(e.g. Response_time_Answer -
instead of response_time_Answer -
is not recognized!).

A non-existing variable is denoted as


‘custom’ in the column ‘Source(s)’
and will not be saved. You can
delete a non-existing variable by
clicking the red icon.

Always check whether the variable


actually exists!

(Tutorial 1) 60
8) A major drawback of entering the
variables to be saved by typing them 9)
is that you have to know the exact
name of the variable.
There is an alternative way to store
the variables in the logger.
Beware however, that this
alternative method does not always
work in OS since this feature is still
rather buggy.

9) In the following steps the alternative


way to log variables is shown. Again
we want to save the reaction time
10)
(‘response_time’) that is collected
by the item ‘Answer’. We can find
‘response_time’ in the Variable
inspector. The Variable inspector is
not visible by default.
Click the Variable inspector icon
([…]).

10) The Variable inspector is now visible


on the right side of the screen.
a) You can make the window of the
a)
variable inspector bigger by
dragging the left border to the left.

(Tutorial 1) 61
11 a)
11) a) The two most important columns
in the Variable inspector are
‘Variable’ and ‘Source(s)’.

The Source(s) column indicates the


item to which each variable belongs
to.

We want to save the reaction time


(the variable ‘response_time’) that is
collected by the item ‘Answer’.
11 b)
b) NOTE: the name of the ‘Answer’
item may not yet be updated in the
Variable inspector. If this is the case,
run the experiment (CTRL+R). If the
name is still not updated, you have
encountered the (infamous) bug! 12)

12) Variables are sorted alphabetically


by default. However, it is easier to
organize them by their Source items.
Click Source(s). Now the sources are
alphabetically sorted.

(Tutorial 1) 62
13)
13) Click ‘Logger’ in the overview
window.

Drag the variable


‘response_time_Answer’ to the
logger on the left side.

14) As a result, each reaction time that


is measured by the Answer item will
be saved to a file. 14)
The name of that file with all
reaction times is determined upon
running the experiment.

(Tutorial 1) 63
VIII. End of the experiment
1)
1) Now we have almost finished
programming our experiment.
However, we want to make sure the
experiment ends with a conclusion
screen to inform the subject the
experiment is done.

Note that this screen is not a part of


the trial, but only appears once (i.e.
only at the end of the experiment).

Therefore, we have to add this final


screen to the 'experiment’ item (and
NOT to the ‘Trial’ item)

Click the 'experiment‘ item


in the Overview-window. 2)

2) Add a new ‘sketchpad’ item (to the


‘experiment’ item).

(Tutorial 1) 64
3)
3) Rename the ‘sketchpad’ item into
End_Experiment.

4) Click 'End_Experiment' item:

a) Click the text icon.


4)
b)
b) We want this screen to be displayed
for 2 sec. Enter 2000 in the
'Duration' field.
a)
c) Click the canvas

d) Add the following text: ‘End of the


experiment'. And click OK. c)
c and e) d)
e) Move the text to the middle of the d)
canvas if necessary (click the select
tool first)

(Tutorial 1) 65
5) Save the experiment (CTRL+S). 5)
6) Let’s run the experiment. Click 'run'.

7) OpenSesame requires you to enter a 6) (! Not this one! )


subject number. Enter ‘1’ (i.e. the
first subject)
7)
8) The file name in the next window is
'subject-1.csv'. The subject’s
responses will be saved to this file.

a) Choose the folder in which you want


the data file to be saved (Tutorial1 8)
on your drive).
b) Replace 'subject' by 'SimpleRT‘. The
reaction times will be saved to the
file ‘SimpleRT-1.csv’.
Click 'Save‘ .
The experiment starts
immediately hereafter and
will show one circle (you
respond with the ‘m’ key)
and then the end-text. But a) b)
first read the next page!
(Tutorial 1) 66
Two different things often go
wrong at this point (bugs in
OpenSesame, sometimes it
occurs, sometimes not).

1. OpenSesame seems to freeze the


first time you try to run the
experiment (the program turns light
gray and the mouse sometimes seems
irresponsive). Do the following. Press
the Esc-button on the keyboard and
press q (or click the red cross in the
screen). The experiment will abort. If it
does, just run the experiment again,
this error only occurs on the first try
(bug in OpenSesame).

2. The experiment seems to start but


you don’t see a circle appear (you
only see the instruction and End-
text)? Do the following (also see page
46). Click the Loop-item, then type an
‘1’ in the cell under the blue text
‘empty_column’ (in your OS version it
might be called ‘new_column_1)‘ and
press Enter.

(Tutorial 1) 67
You can abort the experiment while it is
running by pressing the <Esc>-key. 9)

9) After the experiment has ended, the


following window appears.

10) Verify that the data file is stored in 10)


the Tutorial1 folder on your drive.

11) You have noticed that the


experiment is finished after only 1
trial. We need to change this; we
want a trial to be repeated 20 times.
To accomplish this, we use the
‘Loop’ item.
11)
Click the ‘Loop’ Item.

(Tutorial 1) 68
12) In the property window of the ‘Loop'
item, a number of options are 12)
shown. For now, we will only discuss
the ‘repeat’ option (the other
options are discussed in another
tutorial).
b)
a) If you haven’t done this already
(see page 46), type ‘1’ in the upper
Only after you press Enter, the number of
most left cell (first row, first repetitions of the trial will be adjusted and the
column). This denotes that we only summary will be updated.
have 1 (unique) trial.

b) Set 'Repeat' to 20 and press


Enter. This will result in the trial a)
being repeated for 20 times. Note:
the following must be shown after
‘Repeat’: 'each cycle 20.00 x’ (or,
depending on your Windows
settings: 20,00 with a comma).

Note: only after you press Enter, the 13)


trial will be repeated 20 times.

13 a) Save the experiment (CTRL+S).


b) Run the entire experiment once. a) b)
(subject number = 2,
file name = SimpleRT-2)

(Tutorial 1) 69
On some computers (with a monitor with
a high resolution), it might be that when
running the experiment, the experiment
does not fully cover the screen. See the
FAQs for a solution for this problem.

(Tutorial 1) 70
IX. Excel

1) We are now going to process our NOTE 5: Excel is a so-called spreadsheet program. A spreadsheet
data (calculate the mean RT) from program is comparable to a very extensive calculator. You can add,
multiply, divide, etc. Also more intricate (statistical) calculations, like
the experiment in Excel
standard deviation, are possible. Furthermore, Excel allows you to
(read note 5).
create graphs (e.g. line or bar graph etc).

Before we start, you will be given a


short introduction to Excel. data  formulas  outcome  graph
Excel’s advantage is that you can automate calculations by using
If you do not have Excel on your formulas on your data.
computer you can buy it at surfspot:
https://www.surfspot.nl/microsof Internet (via Google and Youtube) provides many useful
manuals/Instructions for Excel.
t-office-2019-for-windows- If you would like a more exhaustive introduction to Excel, consult the
student.html following website:
https://www.youtube.com/playlist?list=PL_iwD7O7FG7jzLQIYm6-
9Gx3hvXVUG7C5

2) Start Excel 2)

(Tutorial 1) 71
3) Select ‘Blank workbook’
3)

(Tutorial 1) 72
4) The elements of the Excel program
are shown with their names. The 4) Title bar
rectangles in the grid are called cells. Toolbar ‘fast access’ System menu

Each cell has a unique name that is Ribbon


derived from the name of the
column and the row it resides in. Formula/function bar

The upper left cell is A1 (column A, Column

row 1). Worksheet


Row
The cells contain the data (one
number in each cel). Sheets Cell Zoom
Status toolbar
Data (the numbers) can either be
inserted manually or imported via a Display toolbar

file that contains the data (like our


data file from the RT experiment).
Cell A1
Let’s type in some data first to
practice.

5) Type Cell B1
in cell B1 the number 3 (and press 5)
Enter),
in cell B2: the number 5,
in cell B3: the number 2,
in cell B4: the number 7,
in cell B5: the number 8.

(Tutorial 1) 73
6) We want the sum of these numbers
to be displayed in cell B6. Instead of 7)
just typing ‘=3+5+2 +7+8’, we are
going to refer to the cells that
contain the numbers. Every
function/formula starts with an ‘=‘
symbol (if you forget to enter ‘= ‘,
Excel does not recognize your input
as a formula, but instead considers it
to be just regular text).
NOTE 7: In Excel, formulas are not applied to the numbers
7) Select cell B6 and type ‘= B1 + B2 + themselves, but to the cells that contain the numbers. The number
in the cell in question is then used in the formula. An example: we
B3 + B4 + B5’. Then press Enter.
want to add up cells B1 and B2. Cell B1 contains the number 3, cell
Notice that the outcome (25) B2 contains the number 5. The formula = B1 + B2. Excel
appears immediately. You might automatically enters the values of the cells (i.e. the numbers) into
think: “this could be done faster the formula: = 3 + 5 (= 8)
using a calculator”. That might be
true for this example. However, the
main advantage of Excel’s formula
function is that outcome of the
formula (in this case the sum) is
automatically recalculated whenever
a cell’s value is changed. Read note
7.
8)

8) Change cell B1’s value to 9 and


press Enter.

(Tutorial 1) 74
9) Notice how the sum automatically
changes from 25 to 31. 9)
10) Excel’s main advantage is that, once you
have defined your formula, the
outcome is automatically recalculated
whenever the value of the cells
included in the formula is changed.

Imagine having 100 values that you


want to add up; do you have to type
every single cell into the formula?
Luckily, you do not; Excel has a useful
option for adding numbers
automatically: SUM. 11)
11) First delete the contents of B6.

Then click the FORMULAS tab.


All formulas/functions, organized in
categories, are displayed. For now, we
only need the AutoSum function.

Select AutoSum. Excel enters the Sum


function and automatically selects the
cells that you want to use for your
calculation; B1 to B5 (B1:B5 means that
Excel uses cell B1 and B5 and all cells in-
between).

SUM(B1:B5) = B1 + B2 + B3 + B4 + B5.
Imagine having not 5 but 100 numbers,
the SUM function (in cell B101) then
becomes: =SUM(B1:B100).

Press Enter to confirm your formula.


(Tutorial 1) 75
12) Next, we are going to calculate the
mean of the five numbers using the 12)
AVERAGE function.

Start by deleting everything in cell B6.


Then click the arrow next to/below
Autosum and select Average.

The function =AVERAGE (B1:B5)


appears in cell B6. Press Enter. The
mean is 6.2.

To make sure it is clear what is


displayed in B6, we type the words
‘Average of 5 numbers’ in cell A6. Press
Enter.

13) The text might not entirely fit in the


cell. We can widen the column to make
sure it does fit.
13)
Place the cursor at the top of the
column, on the demarcation line
between column A and B (the cursor
will change to:  ). Hold the left mouse
button and drag to the right. This
widens the column, making the word fit
in cell A6. You can also double click the
column demarcation line. This way,
Excel automatically adjusts the cell’s
width to fit its contents.

(Tutorial 1) 76
X. Inspect your data
1)
Now that we have learned how to
calculate an average of a number of
values in Excel, let’s import the reaction
times of our experiment into Excel and
calculate the mean reaction time.

1) Open the explorer ( + e ). Go to


the folder in which you have saved
your data. 2)
Double click the latest file with the
20 RTs (SimpleRT-2.csv).

2) .csv files are linked to Excel by


default. Excel is automatically
started and the data is imported.
You can see the column containing
the reaction times for each of the 20
trials.

(Tutorial 1) 77
We are now going to calculate the
average RT in Excel. 3)
3) We want the average RT to not be all
the way at the bottom of the
column, but somewhere on top, so
we can instantly see it without
having to scroll down.
a)
Type in cell D1: ‘Average RT‘

4) Notice how the variable name 4)


‘Average RT' does not fit in the
column.

a) Double click the demarcation line


between D and E. The cell width will
automatically be adjusted to the
width of the text.

(Tutorial 1) 78
5) We want the average RT to be 5)
displayed in Cell E1.

Select cell E1.

6) Select the ‘FORMULAS‘ tab. 6)


Then click the arrow below the
AutoSum icon and select Average.

(Tutorial 1) 79
7) As shown here, Excel does not 7)
automatically enter the correct cells
this time. The reason for this is that
we do not want to calculate the
mean in a cell that is located
directly below the column that
contains the values. Instead, we now
have to manually enter de cells we
want to use for the AVERAGE
function.

The RT’s are located in cells A2 to


A21 (A2:A21). Type ‘A2:A21’
between the parentheses () in the
function. Then press Enter.

8) The average RT for this particular


subject) is calculated (117.55 ms). 8)

Note, the RT is measured from the ‘offset’


(end) of the stimulus. Because the stimulus is
presented for 100 ms, we have to add 100
ms to the RT, to get the actual reaction time
from the start (‘onset’) of the stimulus
presentation. You do not have to do this now.

(Tutorial 1) 80
9) Save your file as an Excel 9)
Workbook, name it: SimpleRT-2.xlsx
and store it in the folder ‘Tutorial 1’
located on your drive.

File  Save As  Browse to


Tutorial 1 folder  Insert file name:
SimpleRT-2.xlsx  Save as type:
Excel Workbook (*.xlsx)

10) Verify that your file has been saved


to the ‘Tutorial 1’ folder on your
drive. Depending on your Windows
settings, the extension (.xlsx) may 10)
not show in the explorer. As long as
it says ‘Excel Workbook’ under
‘Type’ it is fine. Do not add the
extension in Windows explorer.

(Tutorial 1) 81
Report question 1.1

In your report, place a screendump of your


Excel file with the Average RT.

Screendumps are easily made using the


Snipping tool:
StartAll ProgramsAccessories
Snipping Tool

Depending on your Windows version the


Snipping tool may be here: StartWindows
Accessories Snipping Tool
(But then you may also have the Snip &
Sketch tool, the more advanced version of
the Snipping tool. StartSnip & Sketch or
 + Shift + S )

You will be using the Snipping tool very


often during the course.
See YouTube for some excellent instructions
on using the Snipping tool.

Put the screen dump at the designated


location in the report document that you
have downloaded from Canvas earlier.

Place your answers to the report questions


directly in this document.

(Tutorial 1) 82
Report question 1.2

Imagine you would want to adjust the ITI


(inter trial interval) in your experiment.
The new ITI is random and varies
between 500 and 1500 ms. What would
you enter in the Duration and Jitter boxes
of the Advanced delay item? (see also
FAQs)

Report question 1.3

What would happen if you would leave


the duration of your ‘Stimulus_On’ item
on ‘keypress’.
A) For how long is the stimulus
presented?
B) How many times do you have to
press a key to move on to the next
trial?

Do not forget to save the report


document.
Do not hand in the report right now.
Only hand in the report if you did all
the tutorials and if all questions are
answered.

(Tutorial 1) 83
Congratulations! You have now built your first
experiment in OpenSesame!

(Tutorial 1) 84
Tutorial 2

Priming Experiment (PE)

85
Priming Experiment

Watch this short video clip about the Priming


Experiment

(Tutorial 2) 86
What is priming?

Priming occurs when the response to a certain stimulus is


influenced by another stimulus that was previously
presented.

Different types of priming exist (e.g. repetition, semantic,


associative).

In this tutorial we will discuss:


• Associative-priming: increase in performance (lower
RT) if two words are associated. Fir example, the
response to the word ‘egg’ is faster if it is preceded by
the word ‘CHICKEN’ compared to the word ‘CHAIR’.

(Tutorial 2) 87
Priming Experiment (PE)
• In a Priming Experiment (PE), two words are presented (first the prime,
then the target), with a short interval in between the two.
• The PRIME is a word with no task involved, the subject just looks at it.
• The target can be a non-word or an existing word. The existing word can
be ‘related’ or ‘unrelated’ to the prime.

eg: PRIME-target
CHICKEN-rolp target = non-word
CHICKEN-egg target = existing word; related to prime
CHICKEN-hat target = existing word; unrelated to prime
• The subject’s task is to decide as quickly as possible whether the target is
a word or a non-word (two-alternative forced-choice RT task).
• The expectation is that subjects respond faster to related words compared
to unrelated words = PRIMING EFFECT.

(Tutorial 2) 88
Priming Experiment (PE)
3 Categories:

Associated
word
Not-associated
word
Non-word Priming Effect:

PRIME CHICKEN CHICKEN CHICKEN Associated =


Faster RT

(Black screen)

Not-associated
= Slower RT
Target egg hat rolp

Word Word Non-word

Subjects’ TASK =
(Tutorial 2)
word/non-word? 89
Why this specific task?
Why ‘word’ vs ‘non-word’ instead of ‘related’ vs ‘unrelated’?

1. We need a task that has nothing to do with the prime to avoid


possible interference with the priming effect

2. We want subjects to use the same button when responding to related


and unrelated words (note though: different button for word vs. non-
word)

Why do we need a Non-word category?

1. We don’t want subjects to use the same button for every correct
answer during the entire experiment

(Tutorial 2) 90
Overview Priming-Experiment
Experiment-Structure Trial-Structure What is happening?

Prime-stimulus
Instruction-text Prime_On (200 ms) CHICKEN

Prime_Off (Black screen; 0 ms)


Break (1000 ms)

Trial-loop: Interval (300 ms)


12 trials

Target-stimulus
Target_On egg
(0 ms)

'z' = non-word
Answer 'm' = word

Target_Off (Black screen; 0 ms)


End-text
(1000 ms)

(12 trials)
ITI (3000 +/- 1000 ms)

Logger (save data; 0 ms)


(Tutorial 2) 91
Variable stimulus: every trial is different
We will put the stimuli in a so-called loop scheme, separately for each trial. In the
sketchpad we refer to the stimuli in the loop scheme via a variable [Prime].
Opensesame retrieves the content of the variable from the loop scheme and the
subject sees the words. Watch this short video clip for more explanation.

Loop scheme Reference in sketchpad Visible during experiment

CHICKEN
Trial 1
Trial 2 BLACK
Trial 3
BIG

Each time OS is confronted with double brackets [xx], the


program searches the loopscheme and retreives the value for the
variable within brackets for the current trial.

e.g. The sketchpad-reference [Prime] results in a search in the


column “Prime”, which in case of trial one results in the
presentation of the text ‘CHICKEN’ on the screen.
(Tutorial 2) 92
What’s new?
Tutorial 1 Tutorial 2

OpenSesame OpenSesame
• Stimulus is a geometrical figure. • Stimulus is text.
• Same stimulus during each trial • Different stimulus for each trial
(Stimulus is fixed) (Stimulus is variable)
• ‘Single-choice’ task • Two-choice alternative task
(stimulus detection: 1 button). (word or non-word: 2 buttons).

Excel Excel
• Average RT for single stimulus. • Average RT separately for associated
and not-associated words:
Conditional average.

(Tutorial 2) 93
Priming Experiment
What are we going to do today?
I. Build the experiment’s structure
II. Modify Content, Instruction, Break, End
III. Build the Trial-structure
IV. Modify the Content of the Trial-Structure
V. Create a Variable-scheme
VI. Insert variable references
VII. Define datafile
VIII. Calculate average RT in Excel
IX. Assignment

(Tutorial 2) 94
I. Build the experiment’s structure
1. When you launch OpenSesame, the 1)
program asks how you’d like to get
started (template or existing
experiment).
Double click 'Default template'.

2) Note: We are going to save the


experiment under a different name
first.
Save the experiment and choose a
folder named ‘Tutorial 2’ on your
own (network) drive and name the
experiment :
2)
‘Priming_Studentnumber‘
(In which ‘Studentnumber’ is your
own student number)

NOTE! Regularly save your work to


prevent loss of data
due to unexpected bugs
(CTRL+S after each step)

(Tutorial 2) 95
Adjust background color:
In our experiment, white words will be
projected on a black background. The
‘general properties’ in the item ‘New
experiment’ are set correctly, so we do
not have to change anything.
Back-end is xpyriment.

(Tutorial 2) 96
3) First, clear the experiment.
3)
Remove the ‘getting_started’-item using
[Shift+Del] or:

- Right click the item in the Overview-


window.
- Click ‘Permanently delete..‘.

Remove the ‘welcome’-item using the


same method.

You now have an empty experiment.

Save your experiment (CTRL+S).

(Tutorial 2) 97
Now we are going to build the main Experiment-Structure:
structure of the experiment

Instruction-text
The Experiment-structure consists of:
- Instruction-text
- Break (1000 ms) Break (1000 ms)
- Trial-loop
- End-text (1000 ms)
Trial-loop:
X number of trials

End-text
(1000 ms)

(Tutorial 2) 98
4) First, create the Instruction, Break, a)
Loop and End items.

a) Select the 'experiment’ item in the


Overview-window and add a
‘sketchpad' (right click ‘experiment’-
item, ‘Append item’; ‘Append new
item’; ‘sketchpad’)

b) Rename the new_sketchpad item


into 'Instruction’ (right-click, b)
Rename)

c) Add the following items using the


same method:
1. ‘sketchpad'  rename into ‘Break’
2. ‘new_loop'  rename into ‘Loop’
3. ‘sketchpad ‘  rename into ‘End’

c)

(Tutorial 2) 99
5) Verify that your Overview-window is 5)
identical to the one displayed here.

6) Follow these steps on this page only if


your items are not in the right order:

Select the ‘experiment’-item.

The used items are displayed in the panel


on the right. You can move items by
dragging them to their desired location

Click an item and hold the left mouse 6)


button and move your cursor up or
down to move that item to its correct
location. The green line represents the
new position of the item.

(Tutorial 2) 100
II. Adjust the Instruction, Break, End item 1)
content

Save your experiment (CTRL+S).

Instruction
1) Now we are going to add some text
to the instruction item.
Select the ‘Instruction’-item in the
Overview-window.

a) Select the ‘A’-icon.


b) Click on the center of the canvas. a)
c) Add the text as displayed here.
Alternatively, you can also copy +
paste the text from the file:
‘PR2_LoopList_InstructionText.xls’
which can be downloaded from the c) b)
Experimental Skills folder on Canvas

(Tutorial 2) 101
Break 2)
2) Now let’s adjust the Break item
(black screen) . Click the ‘Break’-
item in the Overview-window. Set
‘Duration’ to 1000 (the break screen
will now be displayed for 1000 ms =
1 sec). Do you remember why we
insert this break here?

3)
Loop
3) We are going to adjust the loop item
later on.

(Tutorial 2) 102
End
4)
4) First, we are going to modify the
End-item. Select the ‘End’-item in
the Overview-window.
a) Set the ‘Duration’ to 1000
b) Enter the following text (without
the quotation marks):
a)
“This is the end of the experiment”

b)

(Tutorial 2) 103
a)
5) In the ‘Loop’-item, a new ‘sequence’
has to be added.

a) Drag a new ‘sequence’-item to the


‘Loop’-item in the Overview-
window.

b) Then select ‘Insert into Loop’.


b)

c) Rename the new ‘sequence’- item


into ‘Trial’ .
c)

(Tutorial 2) 104
III. Building the trial structure
(Save the experiment. Shortcut : Ctrl+s)

Now let’s add the trial content.


a)
1) Right click the ‘Trial’-item in the
Overview-window
a) Add a ‘sketchpad’ using ‘Append b)
item’
- Rename into 'Prime_On‘

b) Select the ‘Trial’-item again. Now c)


add another ‘sketchpad’ and
rename this one into 'Prime_Off'

c) Using the same method, add the


following items:
- ‘advanced_delay’,
- ‘sketchpad’,
- ‘keyboard_response’,
- ‘sketchpad’
- ‘advanced_delay
- ‘logger’

(Tutorial 2) 105
2) Rename the items into the names 2)
displayed on the right.
Verify that all the required items are
included in your trial-sequence, in
the same order as the example on
the right 

If they are not in the right order,


select the ‘Trial’ item in the
Overview-window to move/drag the
items into the correct order.

(Save the experiment: CTRL+S)

(Tutorial 2) 106
IV. Adjust the Trial-Structure content
We will now adjust the content
of the following items:

• ‘Prime_On’
• ‘Prime_Off’
• ‘Interval’
• ‘Target_On’
• ‘Answer’
• ‘Target_Off’
• ‘ITI’

Prime_On
1) Select the ‘Prime_On’ item in the
Overview-window

a) We want the prime to be visible for


200 ms. Change ‘Duration’ to 200.

b) We want to use text for the


stimulus. Select the Text-icon in the
sketchpad ('A').

c) You can also change the color, Font


family and Font size of your text.
Change the Font size to 30 px.

(Tutorial 2) 107
2) Now let’s add the actual text.

a) Click the intersection of the green


horizontal and vertical bold
gridlines (i.e. the center of the
canvas).

b) A window appears where you can


type your text. Type the word
a) b)
CHICKEN (in capital letters) and
click 'OK'.

c) The word ‘CHICKEN’ is now


displayed on the screen in font size
30.

c)

(Tutorial 2) 108
Prime_Off NOTE 1:
3) Next up is adjusting the duration of A new sketchpad’s ‘Duration’ has ‘keypress’ as its default setting.
the ‘Prime_Off’-item. This means that the experiment does not continue unless the subject
presses a button on the keyboard.
We want the Prime_Off item to be
visible for a very short amount of A ‘Duration’ of 0 ms means that the screen (black screen in our
time (a black screen just to close off experiment) is visible, but OpenSesame immediately continues to the
the Prime_On stimulus) so that the next item in the overview window.
experiment immediately moves onto
the next item in the Overview-
window (which is the Interval-item).

We can realize this by setting the


duration to 0.
(see NOTE 1 but also check the
FAQs).
a)
Select the ‘Prime_Off’-item in the
Overview-window.

a) Change ‘Duration’ to 0.

(Tutorial 2) 109
Interval
4) Next up is setting the ‘Interval’-item 4)
after the Prime.
We want a 300-ms interval between
the offset of the prime and
appearance of the target.

Select the ‘Interval’-item in the


Overview-window.

Set the ‘Duration’ to 300 ms

(Save the experiment: CTRL+S)

e) d)

(Tutorial 2) 110
Target_On
5) Now we adjust the 'Target_On‘- 5) a)
item.
Select the ‘Target_On’-item in the
Overview-window.
c)
a) Set the ‘Duration’ to '0' b)
This way, OpenSesame immediately
moves on to the next item in the
trial structure (which in this case is
the ‘Answer’ item).
Note that the keyboard response
item Answer just waits for the
subject to enter a key. Answer does
not show anything on screen, so the d)
target will remain visible while the
program waits for an answer.

b) Select the Text-icon ('A') in the


sketchpad.
c) Change the Font Size to 30 px. NOTE 2:
As you may have noticed, in this experiment, the prime is written in
d) Click the intersection of the two
capital letters and the target in regular letters. The reason for this is that
green gridlines.
we want the subject to be able to discriminate the target from the prime
Type the word 'egg' (non-capital in each consecutive trial; they only have to respond (word/non-word)
letters) and click 'OK'. whenever they see a word in regular letters (i.e. a target).
The word ‘egg’ is now displayed in
the center of the screen (in font size
30). (read Note 2)

(Tutorial 2) the experiment. Shortcut: Ctrl+s) 111


(Save
Answer
6) Subjects are allowed to press 2 keys
6)
to select their answer:

'm' or 'z'.

Select the ‘Answer’-item in the


Overview-window

Set ‘Allowed responses’ to:


m;z (seperate the two using a
semicolon, read NOTE 3, also see
FAQs).

NOTE 3: If subjects are allowed to use multiple keys to select their response,
insert the specific keys in the ‘Allowed responses’ box and separate
them using a semicolon (‘;’).

E.g.: 1;2;3;4;5 or m;z

If subjects use a different button than the allowed ones, Opensesame


will not not register those responses.

(Tutorial 2) 112
Target_Off
7) As soon as the subject presses a key, 7)
we want a black screen to appear
(so the target-word will disappear)
Set the ‘Target_Off’- item ‘Duration’
to 0. As mentioned earlier, by doing
this, the previous screen with the
target will be substituted by a black
screen and OpenSesame will
immediately move on to the next
item in the Overview window.

ITI (Inter Trial Interval)


8) After a response is collected from
the subject, we want the next trial
to start after a variable inter trial
interval (ITI): between 2 and 4
seconds. 8)
Set the duration of the ITI item to
3000 ms, with a Jitter (+/- range) of
1000 ms.

Select the ‘ITI’-item.


Set Duration to 3000 ms.
Set Jitter to 1000 ms.
Set ‘Jitter mode’ to Uniform (see
Tutorial 1 and FAQs for explanation).

(Tutorial 2) 113
9) Save the experiment (NOTE 4) and
run het experiment to verify that 9)
your experiment is working (insert a
random subject number): NOTE 4: ALWAYS save your experiment before running it. If you do not
a) Click ‘Save’ (of Crtl +s ) save before running, recent changes might not be applied.
b) Click ‘Run’. Pay attention! If you run
the experiment in the Cube building
at the university, the experiment
may ‘freeze’ the first time (solution:
press <Esc> and then 'q') or only
show the instruction and final text
(see page 67 for the solution of this
bug)!

9b) Some students report that the stimuli


(CHICKEN egg) are not shown (BTW we cannot
You may notice that the experiment
consists of only one trial.
replicate this problem).
In the next step we will explain how to It might be that OS doesn’t ‘like’ that there is
insert multiple different trials (different nothing in the loop-scheme. Try this: type a 1
prime-target combinations) by using the
Loop item.
in the cell under empty_column.

(Tutorial 2) 114
V. Create a Variable-scheme NOTE 5: Variables can change in value during an experiment.
4 variables are used in this
experiment: e.g.: The Prime-word in this experiment will be different in
- Prime (x different words) every trial. Therefore, ‘Prime’ is a variable. Its value (i.e. the
- Target (x different words/non- word) can vary during the experiment; CHICKEN, BLACK, etc.
words)
In OpenSesame, you can define the value of a specific
- CorrectAnswer (m or z)
variable for each trial in the ‘Loop’- item.
- Category (related [i.e. prime and
target are related]; unrelated [i.e. In the ‘loop’-item, variables names are displayed at the top
prime and target are unrelated]; of the columns while their specific value for each trial is
nonword) displayed in the rows below(Column 1 = Variable 1, row 1 =
specific value for each Variable during trial 1 etc.).
Within the scheme’s ‘Loop’-item,
the different variables and possible
values of these variables can be
entered.
Carefully read NOTE 5 (also see
FAQs). 1)

1) Select the ‘Loop’-item in the


Overview-window a) b)

a) Double click the word


‘empty_column’

b) Type ‘Prime’

(Tutorial 2) 115
2) In the same way, create the variables
'Target’, 'CorrectAnswer’ and 2 a)
'Category' (see NOTE 6).

a) Verify that your loop-scheme contains 4


variables (i.e. 4 columns).

Now let’s see how many unique trials


(i.e. cycles, or number of rows) we
have...

b) In the loop scheme each row denotes a


unique trial. The experiment will consist Cycle 1 ( = Trial 1)
of 12 different trials so eventually we b) Cycle 2 ( = Trial 2)
will need enter values for 12 trials, i.e. Cycle 3 ( = Trial 3)
12 rows. Cycle 4 ( = Trial 4)
c) Set ‘Repeat‘ to 1: each cycle 1,00
time(s).
This means that each of the 12 unique
trials will be presented 1 time. In total,
the experiment will consist of 12 trials.
Since each unique trial is only
presented once, each trial will be c)
unique.

Report question 2.1


How many trials in total are administered if NOTE 6: The ‘Category’-variable is added to make the variable-scheme
you would set ‘Repeat’ to 5? And would this (and ultimately the data-analysis) less complicated. The Category
change the Priming effect? variable makes sure we can identify the ‘Related’, ‘Unrelated’ or
Priming Effect (=faster RTs on related trials ‘NonWord’ trials.
compared to unrelated trials)
(Tutorial 2) 116
3) The next step involves entering the
different variable values (i.e.: the different
Prime words, Target words and
3)
corresponding CorrectAnswer and
Category). a)
a) Click the cell below ‘Prime’ and next to ‘1’
in the first row. The cell turns blue and is
now editable.
Enter the word ‘CHICKEN’ (in capital
letters) and press ENTER.
NOTE! You can copy+paste the scheme’s
content from the file
‘PR2_LoopList_InstructionText.xls’ , which is
located in the Tutorial 2 folder on
Blackboard, so you don’t have to enter
everything manually!
Complete the scheme as illustrated here

In the upper six rows, the target is an


existing word (Related or Unrelated), and
the correct answer would be ‘m’. In the
lower six rows, the target is a non-word,
making the correct answer ‘z’ (according to
the task for the subject).

b) If you have too many rows (or columns),


you must delete the obsolete row(s) (or
b)
column) by selecting a cell and right click.

c) We don’t want these 12 trials to be played


in this predictable order.
Instead, we want to present the trials in a
random order.
Set the order of the trials to ‘random’.
c)

(Tutorial 2) 117
VI. Insert variable references
NOTE 7:
Next, we are going to add references The ‘loop’ scheme defines which Prime and Target are
presented, what the correct answer is for each trial and to what
to the variables in the experiment, to category each trial belongs to.
let OpenSesame ‘know’ which prime - e.g.: For a specific trial, the Prime is ‘CHICKEN’, the target is
and target it has to present during ‘egg’, the CorrectAnswer ‘m’, and the category is ‘Related’.
each trial and what the correct answer
is. References to variables can be placed in sketchpad items by
placing the variable name between brackets.
- e.g.: a reference to the variable 'Prime' will be [Prime]
In other words: in order to be able to
present different words during each Each time OpenSesame encounters a variable name enclosed in
trial, the words that are currently brackets during the experiment in the sketchpad OS looks up the
value for that specific variable for the current trial in the ‘loop’
shown in the Prime and the Target
scheme. The value from the loop scheme is inserted in the
item (i.e. CHICKEN and egg), have to reference in the sketchpad.
become ‘variable’. - e.g.: if [Prime] is entered in the sketchpad and CHICKEN is the
value for the variable Prime for that particular trial, OpenSesame
fills in CHICKEN. As a result, the word CHICKEN is shown on the
The values of Prime and Target are screen.
taken from the variables in the (‘loop’)
scheme. REMEMBER: OpenSesame is case sensitive!
- e.g.: the reference [prime] will cause an error if the variable
name in the ‘loop’ scheme is ‘Prime’.
Carefully read NOTE 7.

Make sure you understand the


concept ‘variable’, the loop scheme
and the references, because these will
return in the upcoming tutorials.

(Tutorial 2) 118
1) a)
1) Select the ‘Prime-On’ item in the
Overview-window

a) Click the pointer button

b) Double click on the word ‘CHICKEN’


to open the text editor
This requires clicking exactly on the
text and it may take a few attempts

c) Change the word ‘CHICKEN’ into


‘[Prime]’ (with square brackets) and b)
click OK
b)
d) The textline should now look like
this: [Prime]

c)

d)

(Tutorial 2) 119
2) Use the same method in order to 2)
make the target (egg) variable.

Apply the steps from the previous


slide to the Target_On item and
change the word ‘egg’ to ‘[Target]’.

(Tutorial 2) 120
Now we are going to enter the references
to the correct answer. 3)

3) Select the ‘Answer’-item in the


Overview-window. Set Correct
response to: [CorrectAnswer] and
press Enter.

Click somewhere in the Overview-


window and save the experiment.

Read Note 8 part 1 & 2.


NOTE 8 part 1:
A subject’s answer will be saved automatically by OS in a new
Report question 2.2: variable ‘response_Answer’ (m or z).
Imagine that, during the experiment, a
trial is presented with Prime ‘BLACK’ and The correct answer for every trial was already saved in the Loop item
under the variable ‘CorrectAnswer’ (each trial m or z).
Target ‘white’, and the subject’s response
is incorrect (z = non-word). What will the When something is entered in the Answer item’s ‘Correct response’
value of the following variables be? box, OS will automatically compare the subject’s answer (m or z) in a
• [response_Answer] trial to the value that is entered here. This is then saved to the
• [CorrectAnswer] variable ‘correct’. When a subject’s answer is correct (i.e. the subject’s
answer corresponds with the value in the ‘Correct response’ box), the
• [correct] variable ‘correct’ will have a value of 1. In case of an incorrect
answer, the value of the variable ‘correct’ will be 0.

(Tutorial 2) 121
NOTE 8 part2:
Watch this short clip
about the registration of Prime Target OpenSesame reads the value
of the variable ‘Correct answer’
(in)correct answers. CHICKEN egg from the Loop scheme :
For this trial = ‘m’ (target is a
word)

Loop scheme: CorrectAnswer = m

Subject answer: ‘m’ Subject answer : ‘z’

OpenSesame compares the subject’s response


to the correct answer for this particular trial

Subject answer = CorrectAnswer Subject answer ≠ CorrectAnswer


The value of the variable ‘correct’ is set accordingly,
the logger item saves its value (1 or 0) to the data file.

correct = 1 correct = 0

(Tutorial 2) 122
Save the experiment and run a
number of test trials to verify that
the experiment runs without
causing any errors (stop the
experiment by using <ESC>).

(Tutorial 2) 123
VII. Defining a data file
The ‘logger’-item defines which variables are saved 1)
in the datafile. (see also FAQs)
a)
Open the ‘Logger’-item.
a) Firstly, uncheck ‘Log all variables’.
b) Open the ‘Variable inspector’-window
by clicking the […] icon in the task bar. A list of
variables that can be saved in the datafile is
shown.
b)
We want OS to save the following variables
(and their values for each trial):

‘Loop’-item (column 'Source(s)'):


- ‘Category’
- ‘CorrectAnswer’
c)
- ‘Prime’
- ‘Target’
‘Answer’-item (column 'Source(s)'):
- ‘response_time_Answer’
- ‘response_Answer’
- ‘correct’

c) Drag the variables one-by-one from the


‘Variable inspector’-window to the ‘logger’-item

d) If a variable seems missing in the variable


inspector: run the experiment (a couple of trials)
and then click on the red cross at the top op the d)
variable inspector. Still not visible? Use the ‘Add
custom variable‘ button and enter the names of
the variables manually (Note, OpenSesame is
124
case sensitive!)
This is what you end up with:

2) Click somewhere in the Overview-


window.
2)
Save and Run the entire experiment
(12 trials).

3)
3) Enter a subject number: 1, and click
OK.

4) Name your datafile:


'Priming-subject-1’ and click Save

ATTENTION! Make sure you give at 4)


least one incorrect response!

(Tutorial 2) 125
VIII. Calculate the mean RT in Excel
1)
After completing the experiment, we are
going to calculate the average RT for each
category (‘Related’, ‘Unrelated’ and
‘NonWord’).

1) Open the explorer ( + e) and


navigate to the folder containing the First, select column A
data file (the folder in which you
2)
saved the experiment: Tutorial2).
Double click the most recent data
file, this automatically starts Excel.

2) All data, separated by comma’s is


placed in a single column (A) each
row contains the data from one trial.
We now want to arrange that each
variable has its own separate
column.

Select column A by clicking ‘A’.


(Note, this the first necessary step,
but is often forgotten!)

NOTE! It is possible that your data have


already been organized into separate
columns. If (and only if) that is the case,
you can skip steps 2-6.
(Tutorial 2) 126
3)
3) Open the ‘Data’ tab and select ‘Text
to Columns’.

4) The ‘Text to Columns Wizard’ will


now open. You do not have to
change anything in this window.
Click ‘Next’.
4)

(Tutorial 2) 127
5) The next window requires you to 5)
instruct how columns are separated
in your data file.
In this case, it is by a comma.
a) Check ‘Comma’ and make sure all
the other boxes are unchecked.
b) Now click ‘Next’. a)

b)

(Tutorial 2) 128
6) The next window allows you to 6)
define the data-format (e.g. text or
numeric). We will leave this as is.
Click ‘Finish’.

On some computers the decimal


sepatator is a comma (,) and not a
period (.). If this is the case the
reaction times are not displayed
correcly. For example the RT of
355.230799876153 is then displayed
as 35.523.079.987.615.300. See FAQs
for a solution.

(Tutorial 2) 129
7) Your data are now imported into 7)
Excel. You can see the 7 variables
that we entered in the ‘logger’-item
in OpenSesame.

Each row contains data of 1 trial


(12 RTs in total).

We need 3 variables in order to


calculate the average RT for each
category:
1. ‘response_time_Answer’
This is the reaction time (RT)

2. ‘Category’
Related, Unrelated and NonWord

3. ‘correct ‘
A ‘1’ means that the subject’s
response was correct.
A ‘0’ means that the subject’s

!
response was incorrect.
Always save a datafile as
TIP: You can adjust the column width of Excel Workbook (.xlsx) if
all columns to their content at once by you use formulas to
selecting everything (button above ‘1’ or
next to ‘A’) and then double clicking the
analyze the data. If you
demarcation line between A and B. forget to do this (and save
it as a .csv file instead),
ATTENTION! Save your datafile as an your formulas will NOT be
Excel Workbook
(‘Save as’  ‘Save as type’: Excel
saved! (this happens a lot
Workbook) each year)
(Tutorial 2) 130
8) Type the text as shown on the right 8)
in cells J1-J4 and K1:

We are now going to calculate the


average RT over the ‘Related’ trials first
(in cell K2).

In other words, we only want to calculate


the average of the RTs from the trials in
which the prime and target were related:
Category (Column A) = Related
9)
The ‘AVERAGEIFS’ formula enables you to
calculate the average value depending on
the value of a certain variable in another
column a)
(in this case: IF variable Category in
column A = Related)

9) Click in cell K2
a) Open the ‘Formulas’ tab.
b) Then click the icon ‘More
Functions’.

b)

(Tutorial 2) 131
10) Select ‘Statistical’ and then select
‘AVERAGEIFS’. 10)

NOTE!! Use the “AVERAGEIFS” function,


not “AVERAGEIF (without the s, which can
only manage one criterium: we need
more)”.

11)
11) Now this window appears.

(Tutorial 2) 132
12) The Average_range refers to the
range of cells containing the NOTE 9: In tutorial 1 we selected the cells containing the RTs by
numbers you want to know the a combination of the column name and row number, for
average of (in this case all the RT’s in example G2:G13. A simpler notation is G:G. This selects the
column G): entire column G. Excel is ‘smart’ enough to exclude to the
empty cells (row 14 and below) and the first cell (G1)
Fill out column ‘G:G’ by selecting
containing the variable name response_time_Answer. Only
the whole column; clicking “G” on
top. First read NOTE 9. cells containing numbers are included in the formula.

12)
13) Criteria_range1 are the cells that
contain the criterium-variable
‘Category’. Fill in ‘A:A’ (by clicking
the “A” at the top of Column A).

14) A new field in which you can enter 13)


cell names appears (‘Criteria1’). In
this field we fill in the value that
Criteria_range1 has to contain in
order for the value in column G to
be used for the average RT.
Since we only want to average the 14)
RTs of the ‘Related’ trials, we have to
enter ‘Related’ here. Do this by
typing Related. Do not type the
quotation marks. The double
quotes – as shown in the picture on
the right – are added automatically
(Tutorial 2) by Excel. 133
15) Check whether Excel already 15)
displays an average RT in the
AVERAGEIFS window (if it does not,
something went wrong during one
of the previous steps). Click ‘OK’

NOTE 10: in order to use the AVERAGEIFS function,


you need three elements: see also FAQs

1. Average_range: the column that contains the


numbers of which you want to calculate the
average
(here: the column containing the RTs: G:G)
2. Criteria_range1: This is where we instruct in
which column the criterion is located (here:
column A:A, which contains all categories)
3. Criteria1: In this box, we enter which RTs
should actually be used in calculating the
average: only the related trials: Related. 16)

16) The (conditional) average RT across


all related trials appears in K2.
You will have a different average
because you have recorded different
response times.
(Tutorial 2) 134
17) Click cell K2 again. A formula-bar
appears on top of the screen that
17)
contains the formula that was
entered. If you want to adjust it,
click “fx” to return to the ‘formula
window’.

Make sure you understand the formula!


The AVERAGEIFS formula will frequently
return in the upcoming tutorials in a
more complicated form!
Click here to watch a short video about
the AVERAGEIFS formula.

18) Click cell K3 and, using the same 18)


method, calculate the average RT
for the ‘Unrelated’ condition.

Do the same for the average RT of


the ‘NonWord’ trials in cell K4.

(Tutorial 2) 135
We have used the RTs for trials in which
the person gave a correct response as 19)
well as those in which the subject’s
answer was incorrect (‘correct’= 0). In an
experiment like this, you shouldn’t
include RTs from incorrect trials in your
calculations, because the subject
probably wasn’t paying attention during
these trials.

Let’s calculate the RTs again for each


category, but now we only want to use 20)
RTs from the correct trials.
The formule ‘AVERAGEIFS’ enables you to
calculate an average depending on
multiple variables (in this case the
variables ‘Category’ and ‘correct’).

19) Select cell L1 and type the text


displayed here.
20) Select cell L2 and type a ‘=‘ 21)
21) See how Excel shows the most
recently used function in the top left
box. Click ‘AVERAGEIFS’ to open the
function.

(Tutorial 2) 136
22) Enter the AVERAGEIFS-function like
you did before, but now add a second 22)
criterion:

Criteria_range2: E:E
Criteria2: 1

You now have ‘instructed’ Excel to only


include the RTs from trials that are both
‘Related’ (Related in column A)
and correct ( ‘1’ in column E).

This way, only the RTs of the Related trials in


which the subject gave a correct response
are included in the calculation of the
average RT.
23)
23) Click OK

24) Repeat this for the other 2 categories:

‘Unrelated’ in cell L3
‘NonWord’ in cell L4
24)

(Tutorial 2) 137
25) Calculate the Priming effect in cell L6
using the following function: 25)
“Unrelated” (cell L3)
minus “Related” (cell L2).

Type in cell L6: ‘= L3 - L2’. (Remember, a


formula always start with a = sign)

The results of the subject in the example


support our hypothesis.

Our subject responded ~36 ms faster in case


of a related prime and target compared to an
unrelated prime-target couple (= Priming
Effect).

Save the Excel file (Excel workbook format).


ATTENTION!
Report question 2.3
a) How big was your Priming Effect?
PRIMING EFFECT = Subjects respond faster during
(Note, we only used 12 trials. So the outcome
of the experiment is not reliable. In fact, it related target-prime trials compared to unrelated
could well be that you have no priming effect target-prime trials.
and the RT for Related words is higher than
for Unrelated words).

b) Would it make a difference if you


calculated the priming effect across all trials,
instead of across only the correct trials? If so,
explain why.

(Tutorial 2) 138
Report question 2.4

Imagine you would want to build a priming


experiment, but instead of 3 categories
(unrelated, related, nonword), you have 4
(related, repetition, unrelated, nonword).

Repetition example:
prime = cat; target = cat

Answer questions a, b, and c with the aid of


the information about the experiment below.

i. For each of the word-categories (the


related, repetition and unrelated), we
have 3 different prime-target
combinations.

ii. Half of the total amount of trials is


from the nonword category (the
experiment contains the same amount
of word and non-word targets).

iii. Every unique trial is presented 5 times.

Question a: How many “cycles” (unique


trials: rows in the loop scheme) do we
need?
Question b: How many “repeat” do we
need?
Question c: What is the total amount of
trials a subject has to perform?

Place your answers in the report.

(Tutorial 2) 139
Tutorial 3

Flanker experiment

140
THE ERIKSEN FLANKER EXPERIMENT
• In tutorial 3, you will design an experiment based on a general description of the method. In
contrast to previous tutorials, this tutorial does not include a step-by-step guide explaining every
single step in OpenSesame and Excel. Instead, you will have to build upon the knowledge and skills
you acquired from previous tutorials.

• The Eriksen Flanker task is a two-alternative forced-choice reaction time (RT) task in which subjects
must correctly identify a centrally presented target stimulus that is flanked by two or more
distracting stimuli. The target is either ‘>’ or ‘<’. The distractors can either be Neutral (--<--),
Congruent (<<<<<) or Incongruent (>><>>) (distractors depicted in red just for illustration
purposes).
distractor target

• Subjects have to respond with their left hand if a target ‘<’ is presented and with their right hand if
the target is ‘>’. RT’s for targets flanked by incongruent distractors are expected to be slower
compared to RT’s for targets flanked by congruent distractors because incongruent distractors are
assumed to interfere with the correct response because incongruent distractors automatically
activate motor-responses in the opposing hand. Additional time is needed to resolve this ‘response-
conflict’, which in turn leads to slower RTs.

• Watch this short video clip about the Flanker Experiment (Note that we used an old version of OS
for demonstrating the Flanker experiment in the video. Two things in the video are bit different
compared to your Flanker experiment: the instruction text and the fixation point (there used to be
a separate fixation item, now the fixation is part of the sketchpad))
(Tutorial 3) 141
Design

(Tutorial 3)
Example of an Incongruent Target-Distractor trial 142
Method information

Stimuli:
• Target-Distractor stimuli (6 possible combinations):
--<-- (= Neutral condition)
-->-- (= Neutral condition)
<<<<< (= Congruent condition)
>>>>> (= Congruent condition)
>><>> (= Incongruent condition)
<<><< (= Incongruent condition)
• Stimulus-color: White on a black background
• Stimulus-location: At the center of the screen
• Stimulus-dimensions: Fontsize 30 px.
• Stimulus-duration: 0 (to ensure OpenSesame
immediately continues to the next
item, in this case the ‘Answer-item’).

(Tutorial 3) 143
Method information

Design:
 Three variables in the loop-scheme:
• Stimulus (with six rows: the six Target-Distractor stimuli
combinations: zie vorige pagina)
– Use the ‘-‘, ‘<’ and ‘>’ keys on your keyboard to the
insert the stimulus combinations in the loop-scheme
(e.g. >><>>) see also red instruction on next page
• CorrectAnswer (‘z’ if target is ‘<’; ‘m’ if target is ‘>’)
• Congruency (Congruent, Incongruent, or Neutral)

Every unique Target-Distractor combination has to be repeated


15 times (i.e. 6 × 15 = 90 randomized trials in total).

(Tutorial 3) 144
Method information

Trial-procedure:
1. Each trial starts with a fixation dot at the center of the screen for a duration of 750
ms. Use in the sketchpad as the fixation dot.
2. Then, the Target-Distractor stimulus is shown for 0 ms (use the text-icon of the
sketchpad). Consult the FAQs if do not understand why here the duration is 0 ms.
Before placing the text, you need to uncheck ‘HTML’ (otherwise the stimuli won’t
be shown correctly).

Use the correct variable:

3. The next item is the Answer-item (fill out all input fields correclty) .
4. Then, the screen turns black (sketchpad: duration is 0).
5. Next, there is an ITI between 2 to 4 sec (advanced delay item).
6. Log the variables.

(Tutorial 3) 145
Method information

• Subject instructions:
– Decide, as quickly as possible whether you see a < or > in the center of
the stimulus (press ‘z’ if target is <; press ‘m’ if target is >).
The < will not be correctly displayed (because of HTML code) in the intro
text. Change < in &#60; (including the ‘ ; ‘). For the instruction only, HTML
button should be checked. So the instruction could look like this:

Decide, as quickly as possible whether you see a &#60; or > in the center
of the stimulus (Press z if target is &#60; Press m if target is >).

• Analysis:
– Reaction time (RT) for each Congruency condition (Neutral, Congruent,
Incongruent). Use only the correct trials for calculating the average RT
per condition.

(Tutorial 3) 146
Things to consider (common issues)

• Know how to make a loop of sequences (trials) (see tutorial 2 and


FAQs)
• Check the loop scheme: 3 variables (columns); 6 unique trials (rows).
• Check the ‘repeat’ in the loop scheme (is it on 15?)
• Check the timings of the experiment (if you do not understand why
duration of the stimulus is 0, check FAQs).
• Know and understand how you can make the presentation of the
stimulus variable (see tutorial 2)
• Check whether the stimulus is correctly presented when the experiment
is running (if not: check FAQs)
• For the keyboard response item: check (and understand) whether
‘Correct response’ and ‘Allowed responses’ are filled out correctly (see
tutorial 2 and FAQs)

(Tutorial 3) 147
Things to consider (common issues)
• For the Logger item: what variables should be saved in order to perform
the analysis in Excel?
– At least save the Congruency variable that you made in the loop scheme (better save
all three loop scheme variables!): Congruency
– The reaction time of the keyboard response item Answer: response_time_Answer
– The variable ‘correct’ (understand what ‘correct’ represents and why you need it, see
tutorial 2): correct

• Did you also made a sketchpad item at the end of the experiment in
which the end of the experiment is declared?

• In Excel, use the same procedures (averageifs) as in tutorial 2 (the only


difference is that now we separately average across different
categories: Congruent, Incongruent, Neutral).

• In Excel, save the data as an Excel workbook file.


(Tutorial 3) 148
Assignment
Program the experiment.
1) Make up a suitable text as instruction.
2) Make sure the logger-item stores the required variables
• The dependent variables are: Reaction Time (the variable
‘response_time_Answer’ [if you renamed the keyboard
response item to Answer]) and Accuracy (the variable ‘correct’)
• The independent variable is: ‘Congruency’
3) Run the full experiment once (= 1 x 90 trials).
4) Calculate in Excel the average RT for the Neutral, Congruent and
Incongruent conditions. Only include correct trials in the
AVERAGEIFS function Excel (see tutorial 2).

(Tutorial 3) 149
Assignment

Report Question 3.1:


A. Add a screenshot of OpenSesame in which both the Overview-
window and the Loop-scheme are displayed.

B. Add a screenshot of your Excel-sheet in which the following items


are displayed:
- Raw data (or at least partially)
- Average RT for each condition (Neutral, Congruent, Incongruent)
- Note: Before you make the screenshot of your Excel-sheet, make
sure you select the cell that contains the average RT for the
Incongruent condition (this way, the formula you used is shown in
the formula bar).

(Tutorial 3) 150
Tutorial 4

Practice session and Data analysis

151
Practice session and Data analysis
What will we be doing in this tutorial?
I. Subject info
II. Practice block
III. Average RT of a group of subjects
IV. Average accuracy of a group of subjects
V. Figures/graphs

(Tutorial 4) 152
The flanker experiment we’ve made in tutorial 3 can be readily used for
gathering data. Still, in tutorial 4 we are going to add some extra elements that
are often used in experiments.

Subject info (demographics)


Regularly, different groups of subjects are tested, e.g. women vs. men or
different age groups. In order to distinguish these groups from one another in a
datafile, we are going to add several items in which subjects are asked to enter
some data about themselves at the start of the experiment. The data are saved
to the datafile alongside RT and/or Accuracy etc.

Practice session
Almost all experiments start with a practice session. This consists of a couple of
trials to acquaint the subject with the task. We will be building such a practice
session today.

(Tutorial 4) 153
I. Subject data
1)
We want subjects to enter some
demographic info at the start:
subject number, gender, age,
hand preference and date of the
experiment. We use the
form_text_input item for this.

1) Open the flanker experiment of


the previous tutorial. Click the
‘experiment‘ item and add a
‘form_text_input’-item. Pay
attention since the names of
several OS items are quite
similar!

Rename the form_text_input


item into ‘Subject'.

(Tutorial 4) 154
Now let’s place ‘Subject’ in front of 2)
the ‘Instructions’.

2) Click the ‘Subject’-item in the


overview window. Drag ‘Subject’
until it’s positioned above the
‘Instruction’ item.

(Tutorial 4) 155
3) Click the Subject item,
- In the ‘Form title’ section, enter:
3) 4)
‘Question 1’
- In the ‘Response variabele’
section, enter: ‘response_Subject’
(this is the name of the variable
under which the subjects answer
to the question will be saved).
- In the ‘Your Question’-window
enther this text: ‘Subject number:’
This is what the subject sees. The
subject can enter the subject
number and this is then stored in 5)
‘response_Subject’.

4) Using the same steps (step 1-3),


now add an ‘Age’ ,‘Gender’,
‘Hand’ and ‘Date’ item (all
‘form_text_input’ items).

5) Complete the new items’ input


(‘Form title’, ‘Response variabele’
and ‘Your question’) like done
here 

(Tutorial 4) 156
6) Logger: The answers entered by
the subject will now be saved in 6)
the variables:
- response_Subject
- response_Gender
- response_Age
- response_Handedness
- response_Date

Add these variables to the logger


item (run the experiment for a
few trials if the variables are not
in the variable inspector).

7) Click somewhere in the overview


window and save the
experiment.

8) Do not forget to save the


experiment.

9) Test whether the experiment


works properly. Abort after a
couple of trials using <Esc> and q.

(Tutorial 4) 157
II. Creating a practice session
We want our subjects to be able to practice 1)
the task before actually starting the
experiment. Therefore, we create a short
version of the existing experiment as a
practice session

1) Click ‘Save as’ in the File-menu


2) Add “PRACTICE_” in front of the
experiment name.

3) Make sure that each of the 6 trials is 2)


presented 1 time (set ‘repeat’ to 1 in
the Loop-item)

4) Add this line to the text in the


‘instruction’-item: “Let’s practice first”

5) Change the text in the ‘End’-item to: 3)


‘This is the end of the practice run, the
experiment will start shortly!’

6) Delete the Subject, Age, Gender, Hand


and Date items. Uncheck the logger for
all these items.
NOTE: If you followed the instruction correctly, you now got 2
We don’t need this data in the practice
session. separate OS experiments with different names. One, with
all the demographic questions and the full experiment with
7) Save the practice session again (first,
all 90 trials. The other, without the demographic questions
click the overview window)! and just a few trials.

(Tutorial 4) 158
Data analysis

III. Average per subject and across a


group of subjects

Now we’re going to calculate the


average RT of 5 subjects of the flanker
experiment. First, download the
datafiles from Canvas.

1) Create a folder on your drive for


tutorial 4, and call it ‘Tutorial 4’.
• Open Explorer using  + e
• In Explorer: right click > new >
folder.
• In your Tutorial 4 folder, create a
new folder ‘Data’ (right click >
new > folder).
• Download from Canvas
(Experimental Skills; Data files)
the 5 data files belonging to the
flanker task, and place them in
your new ‘Data’ folder (make
sure there’s nothing else in this
Data folder!)

(Tutorial 4) 159
We will be merging these 5 files first.
Then we perform the calculations on
2)
the merged datafile.
OpenSesame has a handy tool that lets
you merge multiple datafiles of
different subjects: Datamerger.exe.

Because you can’t download this tool


at the university, we uploaded it on 3)
Canvas.
2) On Canvas, navigate to:
Experimental Skills;
Datamerger.exe. Click it.
3) On the left bottom part of the 4)
screen, the downloaded file
appears. Click ‘datamerger.exe’
4) Depending on the security setting
of Windows 10 you might first get
a security warning. If so, click
‘More info’ and subsequently
‘Run anyway’.

(Tutorial 4) 160
5) In ‘Source folder’, select the
location of the files that you want 5a)
to merge. (a) Click ‘Select’ and
browse to the Data folder and (b)
click on ‘Select Folder’. (Note: you
select ‘the folder’ in which the
files can be found using ‘Select
Folder’ but you do NOT see the
data files themselves!

6) We want to save the merged


datafile (the merged file contains
the 5 separate files that are joined
in 1 file). Click the ‘Save as’
button in the Output file section.
5b)
7) Browse to the tutorial 4 folder 6)
and name the Output file:
“Flanker_subjects1-5.xlsx”

Note: 7)
- Use the “.xlsx” extention in order
to easily import the data into Excel
later.
- In the output data file, do NOT
choose the Data folder that
contain your 5 separate files, but
the ‘Tutorial 4’ folder!

(Tutorial 4) 161
8)
8) Click ‘Merge’ to start the
merging. (Remember we do not
see the actual 5 data sets).

9) Data merger now displays which 9)


files are merged and if this was
done without any erros. Make
sure to check for errors!
Close datamerger if no errors
occurred.

In this short video clip the use of the


Data merger is demonstrated once
again.

(Tutorial 4) 162
10)
10) In Explorer, navigate to the
‘Tutorial 4’-folder on your drive
( + e) and see that a new file
has been added; the merged
datafile. Double click the
Flanker_subjects1-5.xlsx file.

11) Because the merged file is an 11)


Excel file, Excel is automatically
started and the data are
imported. Adjust the width of all
colums to its content by clicking
in the left top of the sheet next
to Column A and then clicking
the demarcation between A and
B.

Your columns may be organized in another order than


the ones in this example. This depends on the settings
of Excel on your computer.

(Tutorial 4) 163
a)
12)
a) We want to calculate the mean 12)
reaction times for congruent,
neutral and incongruent stimuli b)
(first per subject, and
subsequently across subjects)
Create the following headers in
Excel.
i. RT in cell R1
ii. Subject in cell Q2
iii. Congruent in cell R2
iv. Neutral in cell S2
v. Incongruent in cell T2

b) Add the 5 subject numbers to the


column Q (Q3-Q7). Subject
numbers in this file are 1, 2, 3, 4
and 5. See column F:
‘response_Subject’. 13)

13) Let’s calculate the average RT for


the congruent trials for the first
subject (1). Click cell R3.

(Tutorial 4) 164
Again, we’ll be using the
AVERAGIFS function just as you
14)
ALL RT’s used for the average in column K
did earlier for data of one subject
for the Flanker experiment (see
also data analysis of the Priming Only correct responses in column J
experiment). We add a new
criterium: subject number, Only congruent trials in column H
because we want the average RT
for only subject 1.
! Subject numbers in column F
Subject 1 (number 1 in cell Q3)

14) Set the parameters for


AVERAGEIFS to congruent,
correct trials like displayed here: The reason for the reference to
New is criterion 3: the cell with subject number
‘Criteria_range3’ = F:F (Column F
(Q3) and not the number itself
with subject numbers) ‘Criteria3’
= Q3 (only the average of the first (1) will be explained later.
subject; cell Q3 contains only info
on subject 1).
Doing this will allow you to
calculate the average RT for
subject 1 only. Excel will only take If in your datafile the order of the columns differ from
into account the RTs of subject 1. this example, you should enter different columns in the
formula. E.g. if your RTs are in columns J instead of K
the Average_range is J:J and not K:K.

(Tutorial 4) 165
15) Average RT for subject 1 is 15)
calculated. Check whether the
result is 492.7 ms.

Now we have to do the same for the NOTE 1: A handy Excel feature is that we can drag a formula to
other subjects. If you test a large other cells, applying the same formula to multiple different
number of subjects, don’t try to cells. Later, we are now going to drag the formula for subject
manually enter the AVERAGEIFS 1 (R3) to other subjects (in cells R4, R5, R6, and R7).
function for each subject separately. When you drag the formula from R3 to R4, the cell
We instruct Excel to do this references in the formula are automatically updated in a
automatically by dragging the formula similar way(i.e. increase the reference to the row with 1):
to the other subjects.
Carefully read Note 1 and watch this
short video clip. Cel R3:

Cel R4:

The reference in the formula to the subject number (cell Q3)


will change to the cell you dragged the formula to (move one
cell to Q4). This way, Excel automatically calculates the
average RT for the second subject, since Q4 contains the
number ‘2’.
This method also allows you to drag the function to subject 3
(and even subjects 4 to 100?).
(Tutorial 4) 166
16) Click cell R3.
a) Click the small square in the right
16)
lower corner.
b) Using the left mouse, drag the
a)
formula (hold the left mouse
b)
button pressed) to the other
subjects (cells R4 t/m R7). Excel Cell R7
automatically calculates the
average RT of subject 2 to 5.
17)

17) See the results here. Check


whether your RTs are the same.

Because we dragged the function to


the cells below, the row of the cells in
the formula is automatically adjusted
(Q3; Q4; Q5; Q6; Q7). Dragging the
formula thus automatically selects the
right subject in the formula.

(Tutorial 4) 167
Now let’s do the same for the Neutral
trials. 18)

18) Click cell S3 and, in this cell,


calculate the average RT for the
neutral trials, using the
AVERAGEIFS function (repeat
step 14 for neutral or read
below).

A faster way to calculate the


average RTs of neutral trials is to
copy (not drag) the entire formula 19)
or R3 from the function bar (next
to ‘fx’ symbol) and replace
Congruent with Neutral. (See
FAQs for correctly copying a
formula).

19) Drag the function to the other


subjects to calculate their
average RTs (check whether your
results correspond with ours). 20)

20) Repeat the same process for the


incongruent stimuli.

(Tutorial 4) 168
21) Next up is creating a figure of the 21)
average RT of congruent and
incongruent trials per subject (in
one figure). Select the cells like
done here (R2-T7). Make sure that
you do it exactly like this, otherwise
the graph will be displayed
incorrectly.
21)
22) Choose 2-D Column (Insert  2-D
Column).

23) Chart Title


23) The results are shown here. An
important step in the data analysis is 900
inspecting the individual means. This 800
provides insight into how many 700
subjects show the expected effect; 600
whether the effect is large or small; 500
or if some subjects display 400
something completely different, etc. 300
Which subjects show the flanker 200
effect (RT congruent < RT 100
incongruent)? 0
(do not put this answer in your 1 2 3 4 5
report)
Congruent Neutral Incongruent

When in the figure the data are not grouped per subject
(as shown here) check FAQs for a solution. 169
(Tutorial 4)
Now let’s calculate the average across
all subjects for the congruent, neutral
25)
and incongruent condition separately.

25) Create new headings in cells R9;


S9 and T9 (see figure on the
right). After that click cell R10.

26) In the ‘Formula tab’, select:


‘More Functions; ‘Statistical’; 26)
‘AVERAGE’.

27) We want Excel to calculate the


average of the five subjects, so of
cell R3 to R7 (for congruent trials). 27)
In the field after Number1, enter:
‘R3:R7’. Then click ‘OK’.

(Tutorial 4) 170
28) The formula from R10 can also be 28)
dragged to S10 and T10 in order
to calculate the overall average
for the neutral and incongruent
condition. Drag formula from cell
R10 to T10. (If you drag a formula
from left to right the references to
columns are increased in the
formula). Result 

NOTE: Column R is replaced with S and T when you drag to the


right! So, when you drag a formula to the right this increases the
reference to the column with 1.

29) Now let’s create a figure of the 29)


average RTs across all subjects.
-Select the cells with the headers
and the averages.

(Tutorial 4) 171
30) Select a 2-D Column via ‘Insert’;
‘Column’. 30)
You can adjust the figure by using the
‘Layout’ icons on the right of the figure
(visible as soon as you click the figure).

31) It is important that the figure has a title.


Click on the title ‘Chart Title’ and type
in the formula bar (to the right of fx):
“RT all subjects”. Press <Enter> .

32) It is important that the figure also has a


title for the vertical y-axis: ‘RT (ms)’. 31-34)
Now we add the title. Click on the
plus(+)icon and check ‘Axis Titles’.

33) Change the Axis title of the y-axis into


RT(ms). Click on the Axis Title in the
graph and type in the formula bar (on
the right of fx): “RT (ms)”. Press
<Enter>. Now you see the axis title
appear in the figure.

34) Change in the same way the Axis title of


the x-as into Congruency. Click on the 35)
Axis Title in the graph and type in the
formula bar: ’Congruency’.

35) Delete the horizontal lines in the figure


by clicking one of these and then press
the Delete-button.

(Tutorial 4) 172
35) The different conditions are
better defined if the bars are in 35)
different colors. We will make the
Incongruent bar red. Click on the
Incongruent bar and do this again
after 2 seconds until you see that
only the incongruent bar has
been selected.

36) Double click on this bar now.


Click in the window on the right 36)
on the ‘Fill & Line’ icon, choose
the ‘Solid Fill’ option under ‘Fill”.
Choose a red color.

(Tutorial 4) 173
37) Make the Congruent bar green in 37)
the same way. We also drew a y-
RT all subjects
axis (find out for yourself how to
700
do this).
600

500

400

RT(ms)
300

200

100

0
Congruent Neutral Incongruent
Congruency

38)
38) Save the file by using ‘Save as’.
Choose a relevant filename and
select at ‘Save as type’: Excel
Workbook (*.xlsx).

(Tutorial 4) 174
IV. Outliers 1)

The RT data might contain outliers (i.e.


an abnormally high or low RT).
Subjects can display high RTs for a
number of reasons (e.g. couldn’t find
the button, distraction, loss of focus).
An abnormally low RT ( < 150 ms) can
be the result of the subject
anticipating the stimulus. These
outliers can blur your average RT and
do not reflect what you want to
measure. Outliers therefore should be
removed.
An easy way to check for outliers in 2)
your data is to make a graph of the
‘raw RTs’.

1) Select the column that contains


all RTs: column K.
3)
2) Now click the ‘Scatter’ icon in
the ‘Insert’ menu.

3) Then click the left icon (Scatter).

(Tutorial 4) 175
4) The figure shows the RTs as dots 4) response_time_Answer
for all trials. You immediately see
that this dataset contains 3 7000

outliers. 6000

5000
Read Note 2.
4000

3000

2000

1000

0
0 100 200 300 400 500

NOTE 2: How do you assess whether an RT is an abnormal RT


(outlier) or a normal RT? Different methods are
available, each with its own pros and cons. A common
way to remove outliers (i.e. do not use them when
calculating the average) is to choose a criterion that an
RT should meet to be ‘normal’. Determining that an RT
cannot be higher or lower than a particular value to be
normal is a simple method. We know it’s physiologically
impossible for RTs to be shorter than ±150 ms, so the
lower border should be 150 ms. The criterion for RTs that
are too slow (i.e. too high) depends on the task. In a
simple RT, an RT of 1000 ms is abnormally high. But in
case of a complex choice-reaction time task, 1000 ms
can be a normal RT. We should therefore first check the
raw RTs to determine what the upper limit should be.
(Tutorial 4) 176
For this dataset, 1500 ms looks like an
adequate upper limit. The lower limit
will be 150 ms. In the AVERAGEIFS 5)
function, we can enter an upper and
lower limit so that: 150 < RT < 1500.
Read Note 3 (check also FAQs).

5) Click cell R3 and subsequently on Quotes are added automatically by Excel


the ‘Fx’ symbol in the formula
bar. 6) Only if RT (in column K) > 150

Only if RT (in column K) < 1500


6) We calculate the average RT for
congruent, correct trials of
subject 1 in cell R3. We are now
adding two criteria to the already NOTE 3: The formula calculates the average RT for
entered criteria in AVERAGEIFS. congruent, correct trials, but only if the RT is higher than
Criteria 4: RT (in K:K) > 150 150 ms ánd lower than 1500 ms.
Criteria 5: RT (in K:K) < 1500 SUBNOTE 3a: Remember, a criterion in Excel consists of two
Complete the function as shown parts. First you have to define a criterion range (to what
here and click ‘OK’. column is the criterion applied): now it is the column of
the reaction times. You have to do this both for the
upper and lower limit. Then you have to insert the actual
criterion.
SUBNOTE 3b: A mistake that is often made is to insert the
following criteria: < 150 and > 1500 (instead of > 150
and < 1500). This means that you average the RT just for
(Tutorial 4) the outliers (= not good)!! 177
7) Drag the formula to the other
7)
subjects for congruent trials.

8) Copy (don’t drag) the formula in


formula bar from the first subject
(cell R3) to S3 (first subject,
neutral trials) and replace
Congruent in the formula with
8)
Neutral.

9) a) Drag the formula for the


neutral trials to the other 9) a) b)
subjects.
b) Repeat the same procedure for
incongruent trials.

10) By removing the outlier(s), the


average RT of all subjects and its 10)
figure change automatically.
Check if the numbers in your file
correspond with ours (if they
don’t, something went wrong).

(Tutorial 4) 178
V. Average accuracy per subject and
Example: The participant below gave 1 incorrect response in
across subjects
the Congruent condition (1x a 0 in the column “Correct”),
and 3 incorrect responses in the Incongruent condition.
A participant’s accuracy (ACC) (3x a 0 in the column “Correct”)
indicates how many trials the
participant has answered correctly
(proportion correct). The ACC is always Subject Congruency Correct Accuracy
1 Congruent 1 Congruent 0,90
a number between 0 (all answers
1 Congruent 1 Incongruent 0,70
incorrect) and 1 (all correct). For 1 Congruent 1
example an ACC of .91 indicates that a 1 Congruent 1
participant answered correctly on 91% 1 Congruent 1
of the trials. 1 Congruent 1
1 Congruent 1
1 Congruent 1
The average accuracy can be 1 Congruent 0
calculated by the AVERAGEIFS function 1 Congruent 1
by calculating the average of the 1 Incongruent 1
1 Incongruent 0
‘correct’-column (in this column 0
1 Incongruent 1
means for that particular trial that the 1 Incongruent 0
answer was incorrect) and 1 means 1 Incongruent 1
that the answer was correct. For 1 Incongruent 0
example, if we calculate the ACC over 1 Incongruent 1
10 trials in which 2 answers were 1 Incongruent 1
1 Incongruent 1
wrong (2x a “0”) and 8 were correct
1 Incongruent 1
(8x a “1”), the ACC will be 0.8.

See the example on the right. The Accuracy (=the average over the column “Correct”) is .9
for the Congruent condition (=90% of the trials is correct, 9
out of 10 trials correct) and .7 for the Incongruent condition
(= 70% of the trials correct, 7 out of 10 trials correct).

(Tutorial 4) 179
1)
We’re going to calculate the accuracy
(ACC) per subject and then the overall
accuracy of our group of subjects.

1) Create headers for Accuracy in


the same cells as the figure

2) Click cell V3. Use =AVERAGEIFS to


calculate the average accuracy of
congruent trials for the first
subject. Accuracy (correct/incorrect) in column J
Set the parameters in the 2)
function as shown here. Make
sure that you clearly understand
the function.
Only congruent trials in
column H

Subjects are in column F, our


target subject is Q3 (=1)

The proportion correct (=accuracy) of subject 1 = 1 (i.e.


100% correct).

(Tutorial 4) 180
3) Have Excel also calculate the ACC for
3)
the rest of the subjects. Drag the
formula from cell V3 to the other
subjects (and check the numbers).

4) In cell W3 and X3, calculate the ACC


for the neutral and incongruent
trials, respectively (repeat step two 4)
for neutral or copy the formula
from V3 to W3 and change
Congruent to Neutral in the
formula). After this, repeat the
procedure for the Incongruent
condition

5) Drag the formula to the other 5)


subjects (and check the numbers) so
that Excel automatically calculates
the accuracy for the other 4
subjects.

(Tutorial 4) 181
6) Click cell T10 and drag the 6)
AVERAGE formula to cell X10.
Excel calculates the average
accuracy of all subjects. Again,
check the numbers. Delete the
content of cell U10 (#DIV/0!)

(Tutorial 4) 182
7) Create a graph of the average 7)
ACC (accuracy) per subject (select Chart Title
cells V2 to X7: headers + 800
700
averages). 600
500
400
300

8) Adjust the graph like shown here. 200


100
Adjust: 0

- Figure title : Accuracy per subject 1 2 3 4 5

Congruent Neutral Incongruent


X-axis title: Subject (click on the
figure, next click on the + next to
the figure and choose Axis-Titles).
8)
- Y-axis title: Proportion correct
-Move legend to the right: double Accuracy per subject
click and then choose for “Right” 1
in the options of Legend Position
Proportion correct

Y-axis range: from 0 to a 0,75

maximum of 1 double click and


0,5 Congruent
adjust in the right screen:
Neutral
 axis-options 0,25 Incongruent

0
1 2 3 4 5
Subject

(Tutorial 4) 183
9) Create a figure of the overall
accuracy of the group of subjects
9)
(=overall accuracy). Select the cell
with the headers and the Chart Title
averages across the subjects and 1.02
create a bar chart. 1
0.98
0.96
0.94
0.92
0.9
0.88
0.86
0.84
0.82
0.8
Congruent Neutral Incongruent
10) Again, adjust the graph.

10)
Accuracy all subjects
1
Proportion correct

0,75

0,5
11) Save the Excel file.
0,25

0
Congruent Neutral Incongruent

(Tutorial 4) 184
Report question 4.1

a) First, calculate the Flanker Effect for


each subject in Excel (= RT
Incongruent – RT Congruent: see also
tutorial 2 where you calculated the
Priming effect).
b) Then calculate the Overall Flanker
effect (average across all subjects).
c) Place a screendump in the report of
your calculations and the figures you
made in this tutorial in the report (i.e.
averages of RT and ACC, and the
Flanker effect per subject and across
subjects).

(Tutorial 4) 185
Intermission

Before the next tutorial, check whether:


1) Your design of the Flanker experiment is
correct
2) You really understand how you can use
variables to change the content of each trial
3) You really understand what is needed to
calculate average RTs and accuracy from the
subject

(Tutorial 4) 186
CHECK! Design Flanker Experiment
Subject info (5x)

Introduction Sketchpad (750 ms)

Break <<<<<< Sketchpad (0 ms); [Stimulus]

Trial Loop Answer Keyboard_response-item (z;m); [CorrectAnswer]


Sequence Sketchpad (0 ms);

End ITI Advanced-delay (3000 +/-1000 ms)

Logger Logger-item
LOOP scheme:
• 3 variables (columns): Stimulus, Congruency and CorrectAnswer
• 6 possible Target-Distractor combinations (6 cycles = 6 rows)
• Every unique Target-Distractor combination has to be repeated 15 times
(i.e. 6 × 15 = 90 randomized trials in total).

(Tutorial 4) 187
Loopscheme and variables
Loopscheme Sketchpad Presented to subject

(Tutorial 4) 188
Loopscheme and variables
Loopscheme Sketchpad Presented to subject

--<--

(Tutorial 4) 189
Loopscheme and variables
Loopscheme Sketchpad Presented to subject

-->--

(Tutorial 4) 190
Loopscheme and variables
Loopscheme Sketchpad Presented to subject

<<<<<

(Tutorial 4) 191
Accuracy
Loopscheme

To determine the average accuracy, we need 3 things:

1. In the Loopscheme: a variable indicating the correct answer for each trial

(Tutorial 4) 192
Accuracy
Loopscheme

To determine the average accuracy, we need 3 things:

1. In the Loopscheme: a variable indicating the correct answer for each trial
2. In the ‘Correct response’ field of the Keyboard Response item: a reference to the
variable in the loop scheme containing the correct answer

(Tutorial 4) 193
Accuracy
Note that the variable CorrectAnswer in the keyboard response item
is identical to the variable CorrectAnswer you have defined in the loop scheme.
Do not forget the brackets [ ]
Loopscheme

To determine the average accuracy, we need 3 things:

1. In the Loopscheme: a variable indicating the correct answer for each trial
2. In the ‘Correct response’ field of the Keyboard Response item: a reference to the
variable in the loop scheme containing the correct answer

(Tutorial 4) 194
Accuracy
Loopscheme logger

To determine the average accuracy, we need 3 things:

1. In the Loopscheme: a variable indicating the correct answer for each trial
2. In the ‘Correct response’ field of the Keyboard Response item: a reference to the
variable in the loop scheme containing the correct answer
3. In the Logger-item: add the ‘correct’ variable of the Keyboard Response item (here
renamed to Answer) to log whether the response for each trial was correct (=1) or
incorrect (=0)

(Tutorial 4) 195
Accuracy
<<><<

(Tutorial 4) 196
Accuracy
<<><<

(Tutorial 4) 197
Accuracy
OpenSesame compares the
subject’s response with the correct
<<><< response in the loopscheme

(Tutorial 4) 198
Accuracy
OpenSesame compares the
subject’s response with the correct
<<><< response in the loopscheme

Subject’s response = CorrectAnswer Subject’s response ≠ CorrectAnswer


(m = m) (z ≠ m)

(Tutorial 4) 199
Accuracy
OpenSesame compares the
subject’s response with the correct
<<><< response in the loopscheme

Subject’s response = CorrectAnswer Subject’s response ≠ CorrectAnswer


(m = m) (z ≠ m)

Variable ‘correct’ in Logger item

(Tutorial 4) 200
Accuracy
OpenSesame compares the
subject’s response with the correct
<<><< response in the loopscheme

Subject’s response = CorrectAnswer Subject’s response ≠ CorrectAnswer


(m = m) (z ≠ m)

Variable ‘correct’ in Logger item

correct = 1 correct = 0

(Tutorial 4) 201
Tutorial 5

VARIATIONS ON THE
ERIKSEN FLANKER EXPERIMENT

202
VARIATIONS ON THE ERIKSEN FLANKER
EXPERIMENT
• In tutorial 5, you will design a variation on the Eriksen
Flanker Experiment that you programmed in tutorial 3
You choose one of two variations. The first one is
easier than the second variation. You can reuse the
Flanker experiment of tutorial 3 (the version with the
demographics at the start of the experiment).

• Once you have finished programming the experiment,


you will run it on 5 subjects. The data you acquire from
these subjects will be processed and analyzed in
tutorial 6. The results of this experiment will be part of
your final report.

(Tutorial 5) 203
Two possible variations on the Flanker
Experiment
1. * Does the Flanker effect decrease if the distance between the target and
distractors increases?
<<><< vs << > << vs << > <<

2. ** Does the Flanker effect depend on the timing between the distractor and
target?
*= easy ** = more challenging

<< << << << << <<

0 ms 50 ms 100 ms

<<><< <<><< <<><<

(Tutorial 5) 204
Instructions for distance variation
Does the Flanker effect decrease if the distance between the target and distractors increases?

• Vary the distance between the target and distractor:

• Add new stimuli under the variable Stimulus in the loop-scheme (you will end up with 3
(congruent, neutral, incongruent) x 2 (target pointing left, target pointing right) x 3 (distance
1, 2, 3) = 18 unique trials.

• Example of incongruent target-distractor stimuli with three different distances (no space; 1
space; 2 spaces between target and distractors):
<<><<
<< > <<
<< > <<

• Create a new variable in the loop-scheme (e.g. ‘DistanceDistractors’) with three possible
values (1, 2, or 3 for the three distances). We need this variable for data analysis in Excel. So if
there is no distance between target and distractors DistanceDistractors will have value 1, if
there is one space between target and distractors DistanceDistractors will have value 2,
etc….. Do not forget to add the variable DistanceDistractors to the logger!

(Tutorial 5) 205
Instructions for timing variation

Does the Flanker effect depend on the timing of the distractor and target?
• Vary the amount of time between the distractors and the target; present the
distractors slightly earlier than the target.

• Add the following 2 variables to the loop-scheme: DistractorStimulus and SOA

1) DistractorStimulus:
-- -- or << << or >> >>
Note: a space is inserted where normally the target is located!

2) SOA:
0 or 50 or 100
• The SOA (Stimulus Onset Asynchrony) represents the time in milliseconds between
the start of the distractor stimulus and the target+distractor stimulus.

• You will end up with 3 (congruent, neutral, incongruent) x 2 (target pointing left,
target pointing right) x 3 (SOA 0, 50, 100) = 18 unique trials

(Tutorial 5) 206
Instructions for timing variation

• Add a sketch-pad item to the Trial-sequence and rename it to ‘Distractor’

• In the Distractor item, type: [DistractorStimulus] in the center of the


sketch-pad, and set the duration to [SOA]. The DistractorStimulus will now
be presented for a duration 0, 50 or 100 ms before the targetstimulus (+
the distractors) is shown. The size of the DistractorStimulus should match
the Stimulus in the Stimulus_On item. Uncheck HTML.

(Tutorial 5) 207
General instructions

Please keep the following points in mind when programming the experiment:

• In order to obtain reliable average RTs, every condition (18 unique


trials) has to be repeated at least 8 times. So the experiment consists
of a total of 8 x 18 = 144 trials.
• Make sure you are consistent and descriptive in naming and organizing
your data files, (e.g. Flanker_Distance_subject1,
Flanker_Distance_subject2, etc.)
• Make sure that all demographics are filled out correctly (use for
subject number: 1, 2, 3, 4, 5)
• Make sure that all necessary variables are added in the logger-item.
Hint: run the experiment for a couple of trials, press ‘Esc’ to abort and
check your Excel data file to see if all variables needed for your final
data-analysis are present.

(Tutorial 5) 208
General instructions
Please keep the following points in mind when programming the experiment:

• Create a separate practice session (containing 18 trials: set repeat to 1) to


familiarize your subjects with the task (see tutorial 3). For the practice session you
may delete the questions about demographics. Save the practice session
experiment under another name, e.g. Practice_Flanker_SOA or
Practice_Flanker_Distance. We will not use the data of the practice session (just to
practice). The data files of the practice session should named differently than the
data files of the actual experiment.

• Before you run the experiment on your first subject, run the entire experiment
once (i.e. on yourself) and calculate the average RT and ACC for each condition
(only include correct trials, without outliers). Note: Only proceed with testing if
this initial data analysis is in order!

• When you have completed data collection from 5 subjects, merge your data files
using the data merger (see tutorial 4). Note: Make sure your merged data file does
not include data from practice blocks!

(Tutorial 5) 209
General instructions
Please keep the following points in mind when programming the experiment:

• After you ran the experiment on 5 subjects you end up with 10 data
files:
• 5 practice session data files
• 5 experimental data files

• Make a back-up of all data files and make sure that only the 5
experimental data files are in one (data) folder (which should not
contain any other files because then the process of merging the data
will fail)

• Delete the 5 practice session data files

• Do not open these csv files in Excel and do not save these individual
files in Excel (because if you do, the data cannot be merged by the
datamerger)
(Tutorial 5) 210
Tutorial 6

Data analysis of your own


experiment

211
To do List

1) You should have gathered data of 5 subjects


by now
2) Merge your data using the Datamerger
3) Calculate conditional averages per subject
and subsequently across subjects in Excel
4) Create appropriate figures
5) Work on the report
6) When finished hand in the report via Canvas
(Tutorial 6) 212
Datamerger
1. Create a new subfolder inside your Tutorial 6 folder (e.g. Tutorial 6/Data)
2. Place the 5 “.csv” files (from the actual experiment) inside this folder AND NOTHING ELSE!
3. Use the link on Canvas to open the datamerger (see tutorial 4)
4. Select the ‘Source folder’ (i.e. the folder containing the 5 .csv files. Remember, you do not
see the actual data files)
5. Save your ‘Output file’ to the main folder (e.g. Tutorial 6). Create an approriate name for
the merged file: Flanker_Distance_subjects_1-5.xlsx or Flanker_SOA_subjects_1-5.xlsx
6. Select ‘Merge’ to merge all .csv files into a single data file
7. Browse to your Tutorial 6 folder and open the new merged data file with Excel

4
Note! Make sure you save the merged
file as an excel workbook in Excel right 5
away to prevent losing all your formulas!

6
(Tutorial 6) 213
Data analysis
1. Create a scatter plot of all RTs (select the entire RT
column/insert/scatter plot). Look for outliers.
2. Determine the upper and lower bound for outliers based on the
scatterplot of all RTs. Check also FAQs.
3. Calculate the average RT (correct trials only) and average ACC for
each condition for each subject (without outliers!)
4. Calculate the average RT (correct trials only) and average ACC for
each condition across all subjects (without outliers!)

(Tutorial 6) 214
Data analysis
Organize your Excel as follows (for the timing experiment it is SOA 0; SOA 50 and SOA
100 instead of Distance 1; Distance 2; Distance 3):

Note: the data in this example are made up.

Note that we have an extra variable compared to the original Flanker Experiment in
tutorials 3 and 4: either Distance or SOA. So, you must include this in your
AVERAGEIFS function. Example for the distance experiment in upper left cell (P4):
distance 1, congruent condition, subject 1:
Distance = 1; Congruency = Congruent, Correct = 1, Subject = O4 (for this example
Excel file), RT > 150, RT < 2000 (your upper limit can be different, depending on the
outliers in the scatter plot)

(Tutorial 6) 215
Research report own experiment
Contents (4 chapters):
1. Introduction (research question, expectations)
2. Methods (participants, stimuli, procedure)
3. Results
4. Discussion/Conclusions (results vs expectations)

see: Report_Experimental_Skills on Canvas. Note


that the report is not a full-fledged paper (do not
use a story telling form). It is sufficient to just
answer the questions.

(Tutorial 6) 216
Research report own experiment
Procedure
b) Describe what a typical trial looked like (stimulus
duration, ITI, etc). Describe all items in the trial-
sequence in chronological order (e.g. “Each trial
began with the presentation of a fixation dot for 750
ms, next… etc…”)
c) Describe the design. What was varied (describe the
conditions)?
d) How many trials for each condition and in total were
presented to each subject?

(Tutorial 6) 217
Research report own experiment - 7 figures
<< > <<
Figure 1: example of some stimuli
Make a nice figure showing some of the different conditions so
that we know what congruent, neutral and incongruent stimuli
are and what the different distances are (for the SOA experiment
see tutorial 5 for an example)

Figure 2: screendump of OpenSesame in which the entire


overview-window and (upper) part of the loop-scheme are
visible

(Tutorial 6) 218
Research report own experiment - 7 figures
Results (see tutorial 4)
Figure 3 (scatterplot): Scatterplot including all the RT’s: used for outlier detection
Figure 4 (bar chart): Average RT for each condition for each participant.
Figure 5 (bar chart): Average ACC for each condition for each participant
Figure 6 (bar chart): Average RT for each condition across all participants
Figure 7 (bar chart): Average ACC for each condition across all participants

Figure 4*
*When in figures 4 and 5 the data are not grouped per subject Figure 6
(Tutorial 6) (as shown here) check FAQs for a solution. 219
Hand in 3 files

You will have to upload three files to Canvas:

1) OpenSesame experiment of the variation of the Flanker experiment


2) Excel file with merged data of 5 subjects (including the calculations and
figures)
3) Final report: Report_Experimental_Skills.docx

Make sure that you make a back-up of these files!

Hand in at the latest on the day of Experimental Psychology exam via


Canvas/Assignments/Experimental Skills
Note: Missing the hand-in deadline will automatically result in an insufficient
grade for experimental skills (There is only one resit opportunity)

(Tutorial 6) 220
Grading of the report

• The grade will be a pass or a fail


• What will (inherently) lead to a fail?
– Incomplete report
– Not all of the 3 files handed in
– Major errors in the data analysis (of the Flanker
experiment)
– Major errors in the figures (of the Flanker
experiment)

221
Grading of the report

• What are major errors in the data analysis?


– Distance or SOA not included in the formula
– Congruency not included in the formula

222
Grading of the report
600
INCORRECT
• What are major 500

errors in the 400

figures? 300

– Distance or SOA 200

not included in 100


the figures 0
Congruent Inconguent Neutral

600 INCORRECT
500

400

– Congruency not 300

included in the 200

figures 100

0
Distance 1 Distance 2 Distance 3
223
Grading of the report
INCORRECT
• What are major
errors in the
figures?
– Not specified
what the bars
(conditions)
represent
INCORRECT

– No legend, no x-
axis title, no y-axis
title

224
Experimental Skills
Direct Links OpenSesame:
 Duration 0
 Insert variable references
 Logger item
 Accuracy explanation concept
 Accuracy in OpenSesame (variable correct)
 Merging data (DataMerger)

Direct Links Excel:


 Text to Columns Excel
 AVERAGEIFS function Excel
 Drag a function Excel
 Data figure Excel
 Lay-out Figures Excel
 Outliers Excel

225

You might also like