Professional Documents
Culture Documents
Data
Hayward Godwin
University of Southampton
Outline
Part 1
Eye-tracking measures an overview
Data Viewer reports
The Organise-Analyse-Visualise approach in R
Part 2
Try it yourself!
Eye-Tracking Measures
An Overview
for a detailed review, see Rayner (2009)
(130+125+110+90+150+190)/6
130
110
190
90
150
(110+190)/2
130
110
190
90
150
130
110
190
Number of fixations =
90
150
130
110
190
90
150
130+125+110+90+150+190
130
110
190
90
150
110+190
130
110
190
90
150
130
110
190
90
150
130
110
190
90
150
130
110
190
90
150
Proportion of distractors
fixated=2/4=0.5
Probability of fixating target =
1/1 = 1
130
110
190
90
150
130
110
190
90
150
130
110
190
90
150
Saccade Amplitude
(Mean amplitude of saccades)
Search for a blue square target
125
1.4
130
110
2.2
190
90
0.2
3.4
150
Verification Time
130
110
190
90
150
Scanpath Ratio
1.2
1.4
130
5.2
110
2.2
190
90
0.2
3.4
Scanpath ratio =
150
Notes on Measures
Many, many measures that can be run
Just because you can run these, it doesnt mean that
you should
Focus on running only the measures that address your
research questions and avoid doing or reporting
additional ones for the sake of it (i.e., avoid fishing!)
Fixation Report
One row of data for every fixation in your study (per trial, per
participant)
You will typically need to use the fixation report if you are running
visual search/scene perception studies
Use fixation reports to filter out fixations that coincide with other
events, such as display changes, button-press responses, etc
This can be done by filtering using the Interest Period (as youll
see in the tutorials) but often youll end up removing some
fixations you still want
Fixation reports can also be used to re-compute the size of interest
areas and capture fixations that fell just outside of interest areas
Message Report
One row of data for every message that occurred during
the study (per trial, per participant)
If you want an accurate view of when things happened
during your study, the message report is the one to use
This is particularly important for gaze-contingent
studies where display changes occur
You can technically get most of the messages that occur
from the fixation report. However, some messages do
get missed from the fixation report
Sample Report
One row of data for every sample recorded by the eyetracker during the study (per trial, per participant)
If you have your Eyelink running at 1000Hz, that gives
you 1,000 rows of data per second of recording
Sample reports typically are tens of millions of rows in
size
Youll only need to use a sample report if you have
certain highly customised setups (e.g., moving displays)
or want to get an idea of millisecond-by-millisecond
pupil size (as is the case in pupillometry)
Data
In the past, data could easily be organised in Excel,
Analysed in SPSS and Visualised in
SPSS/Excel/Sigmaplot
With the size and complexity of eye-tracking studies,
this is no longer really possible
We can now do all three steps in R, making the
transition between them easier:
Organise: data.table
Analyse: ezANOVA
Visualise: ggplot
Create a data.frame
Add Keys
For large data sets you will want to set keys
When data are keyed, they can be processed faster
A key is set to various columns in your data.table
When a column is associated with a key, it will be able
to group the data by that column more rapidly
In our example, let's set participant id (ppt) and
trialType as keys so we can group the data by these
values more rapidly using the setkey command
Basic Syntax
{WHERE} allows you to select only certain columns. In
other words you can get the command you run to focus
only on the data cells WHERE certain conditions are met
{SELECT} is where you tell data.table what columns or
values you want back. In other words you SELECT
certain values
{GROUPBY} allows you to group the output data in
different ways. This is a bit like pivot tables in Excel.
Getting means
How about the mean RT overall?
Gives us:
Getting means
Overall RT isnt the interesting. Lets GROUP BY trialtype:
Gives us:
Getting means
Now let's group by participant and trialType:
Gives us:
Getting means
But what if we want to only obtain the means for trials 3 and 4? How do we do that?
We use WHERE !
Gives us:
In other words we are SELECTing the mean of the RT column but GROUPING BY the
trialType and ppt columns but only including values WHERE trial is 3 or 4
Adding Columns
Data.table also offers more convenient syntax for
adding columns
If you run:
You add a newColumn column with a value of 1. You can
combine this with WHERE and GROUP BY commands. If
you run:
You get:
We then
have
our
joined-up
data
DT
joinedDT
cDT
We then
have
our
joined-up
data
DT
joinedDT
cDT
Analysing Data
Worked Example
The data.table containing the means for plottingControlling axes and making
it APA format
Draw points (as opposed to bars/lines)
Set up the aesthetics
of the plot, with x
being the values
plotted along the xaxis and y being the
value plotted on the yaxis
The only difference now is that were removing fixations that didnt
land on an interest area (i.e., WHERE
CURRENT_FIX_INTEREST_AREA_LABEL is .)
Were also now GROUPING BY the
CURRENT_FIX_INTEREST_AREA_LABEL column
Youre not limited to creating facets for only one column. Try out
facet_wrap(TRIAL_TYPE~CURRENT_FIX_INTEREST_AREA_LABEL) and see what happens
Writing it up
When writing up eye-tracking data, dont just assume
the reader knows why you examined each measure
Given the complexity and number of possible measures
its vital that you are extremely clear both in your own
head and when you write things up why each measure
was examined and what that measure is telling you
If people start complaining that youve explained it too
much and that its bordering on being patronising, then
youre doing it right
Writing it up
Simple approach:
Begin by stating what the
measure has been shown to
demonstrate in the past
Make a prediction for that
measure in your own study
Then describe how you
examined it
Finally describe what it
showed
Writing it up
Writing it up
Writing it up
From Fitzsimmons & Drieghe (2013)
Writing it up
From Fitzsimmons & Drieghe (2013)