PANDA tutorial, for students and coworkers: This is a short and simple introduction on how to analyze saccades. Students will be introduced to reaction times, histograms, selection vectors, and cumulative probability.

After you have followed a Matlab Introduction course (or have read the first chapters of Matlab for Neuroscientists), you may want to try your newly-found MatLab powers at analyzing actual data. The data for this tutorial can be found here. The PANDA toolbox is also required, together with an index m-file. The data for this tutorial is from one subject (BC), from a study on audiovisual integration.

# Background

Specifically, this data is obtained from our study on Auditory-Visual Interactions Subserving Goal-Directed Saccades in a Complex Scene. In this study, subjects had to search for a light, a sound or both among a large number of distractor lights and sounds. The task was to respond as rapidly as possible by generating a voluntary rapid eye movement or saccade. We concluded that responses to a synchronously-presented light and sound followed a "best of both worlds" principle: they were as fast as auditory saccades, yet as accurate as visual saccades. What you will be doing in this tutorial, is determining whether subject BC was faster for audiovisual stimuli than for the auditory or visual stimuli, when the sound lagged the light by 100 ms.

# Multisensory reaction times

First, you need to load the data into the MatLab workspace. For this, you have to go to the directory where you stored the data and type:

cd('C:\DATA');

This action will produce a matrix stored in the MatLab workspace called sac, which is 409 rows long and 9 colums wide. You can check this with the function whos, which will show all variables stored in the workspace.

>> whos

Name        Size            Bytes  Class     Attributes

sac       412x7             32200  double

## SAC matrix

In each row of the sac matrix all saccade parameters of one particular saccade are stored. Vice versa, each column of the sac matrix represents one particular parameter for all saccades. The saccade parameters of each column can be obtained in MATLAB by typing:

>> index

Rows
Each row contains saccade parameters for a single trial
Columns:
1 Trial Number
7 Modality          (1 - Visual
2 - Auditory -6 dB
3 - Auditory -18 dB
4 - Audiovisual -6dB
5 - Audiovisual -18 dB)

Below, the first ten rows of the sac matrix parameters are listed:

>> sac(1:10,:)

ans =

1.0000  224.0000   12.5494  295.7188   48.0000  458.1762    4.0000
4.0000  310.0000   16.2406   46.2253   60.0000  449.6114    5.0000
7.0000  354.0000   14.6940  271.6397   56.0000  431.0925    1.0000
17.0000  484.0000   15.5194  211.1216   60.0000  431.1098    1.0000
18.0000  290.0000   20.8366  196.1716   72.0000  420.6550    3.0000
19.0000  258.0000   12.7184   96.0820   54.0000  389.2359    3.0000
23.0000  358.0000   16.8306  244.8486   62.0000  455.7257    3.0000
24.0000  322.0000   13.7645  290.5611   54.0000  417.3952    3.0000
32.0000  248.0000   19.7672    3.1488   74.0000  422.2016    5.0000
39.0000  306.0000   17.1490  288.7840   60.0000  497.6191    5.0000

To reiterate, saccades are listed in subsequent rows. From the first column (Trial Number according to index), you can see that you are missing some trials, as the numbers are not consecutive.

1. Is this because the saccades are randomly placed within the matrix causing you to miss some trial numbers in the first ten rows (e.g. if you
sort
the trial numbers, do you find 412
unique
consecutive trial numbers from 1 to 412) or are some trials actually absent from the sac matrix?
2. The second row contains saccade latency, or reaction time (in ms). This is the time it takes to respond with a saccade after the onset of the target. The last (7th) row tells you the modality of the target: 1 means the stimulus was visual, 2 and 3 are auditory stimuli, 4 and 5 are audiovisual targets. This column tells us that of the first ten saccades of the matrix, two were visually-guided, four were aurally-guided, and four were audiovisual. How many visual trials were there in total? And how many were auditory and visual?

## Multisensory vs unisensory reaction time

Next, you have to determine which modality elicits the fastest responses. What is the mean reaction time for visual, auditory, and audiovisual responses? Make the same figure as plotted above.

• use
hist
to make histograms of the reaction times for each modality (use selection vectors to select for each modality. Use 20-msec wide bins, starting at 0 and ending at 600).
• Plot these histograms (probability vs reaction time), use red for visual ('r'), blue for auditory ('b'), and green for audiovisual ('g') responses in a single graph: hold on. Use correct labeling:

xlabel
ylabel
legend
• Note that on the y-axis probability is plotted, not the number of responses per reaction time bin (as obtained by hist). You have to normalize by the total number of saccades:

length
size
sum

## Cumulative Probability

It is more informative to express the reaction time distributions as cumulative percentage probabilities on a probit scale (i.e. inverted gaussian) as a function of the reciprocal reaction time (-1/RT). In this manner, Gaussian distributions will appear as a straight line. Try this out yourself (or have a look here).

And here is an example code that can create the graph as shown above. Try to write this code yourself first! Note the use of:

• sub-functions
• clear labeling of the m-file and the graphics
function webtutorial_sac
% WEBTUTORIAL_SAC
%
% An m-file producing the graph in the Saccade Introduction Tutorial</p>
% Main function

% First, let us clear data and plots
clear all
close all
clc

% Now let's load the data
% Make sure that you are in the correct directory!
% cd('C:\DATA');

%% Let's make a historgam
% Bins
x  = 0:20:600;

% Probability
PV  = getprob(sac,1,x);    % Visual
PA  = getprob(sac,2:3,x);  % Auditory
PAV  = getprob(sac,4:5,x);  % Audiovisual

%% And let's plot these distributions
figure(1)
plot(x,PV,'r','LineWidth',2);
hold on
plot(x,PA,'b','LineWidth',2);
plot(x,PAV,'g','LineWidth',2);
axis square
xlabel('Reaction time (ms)');
ylabel('Probability');
xlim([100 500])
legend('Visual','Auditory','Audiovisual');

function P = getprob(sac,mod,x)
% Sub-function
% P = GETPROB(SAC,MOD,X)
% Get reaction time probability distribution P for saccades SAC with
% modality MOD, at bins X.
sel = ismember(sac(:,7),mod);
N  = hist(sac(sel,2),x);
P  = N/sum(N);