News

Current version: 2.3, August 2003

August 2003: Made the output more flexible. It will now nicely adjust to long names of conditions or files.

April 2003: Finally implemented vincentizing. The -q X option will do the job (see the command line reference).

January 2003: I added a feature that makes it possible to get a file containing the distributions of your RT data. See the -f option in the command line reference.

RS: Reaction time data analysis

What do you do to analyze reaction time data? You've got a couple of files that your experimental program gave you, and then what? You could feed them into SPSS or some other statistics program. But this is quite cumbersome, and it sure isn't fast. I created my own analysis program, and it sure is fast and has exactly the features I need. I called it RS for RT statistics. But the most important point in naming it was the shortness of the name. RS has only two letters, and I tend to be lazy and prefer not to type too much.

Features

RS will read a set of files, each containing the data of one subject. It will then compute the median, mean, standard deviation, error rate, arcsine-transformed error rate and number of included trials for each subject and each condition. And the average of each of these measures for each condition. These are all written to one file. You can also request separate files for the medians and the arcsine-transformed error-rate to feed these into your statistics program. Furthermore you can request the quantiles of the RT distributions or the distribution itself.

Requirements

To run the compiled binary, you need a DOS based operating system, like DOS, or some variant of MS-Windows. If you have a compiler, you can download the C++ source code, compile that and then use any system you like. Your data should be stored in ASCII text files, that are organized in rows and columns:

Each row should represent one experimental trial. The columns can contain whatever you want, but they should at least contain three parameters:

Download

You can download the precompiled binary (109 kb) along with an example ini file. But you can also download the sources (26 kb). The sources contain the source files (C++), that should compile with every standard compliant C++ compiler, along with a make file for DJGPP (gcc) and a project file for MS-VC 6.

Example

The experiment

Suppose you conducted a simple flanker experiment, according to Eriksen. You used compatible, incompatible and neutral flankers, so you have three experimental conditions. Subjects had to press button 1 when the Target was the letter S and button 2 when the target was the letter H. You presented the flanker-target array above or below fixation.

Thus, you could come up with 4 codes for each experimental condition: "1" could be compatible flankers, above fixation, requiring response 1. "2": compatible, below fixation, response 1, etc. In this way the compatible condition would be made up of the codes 1-4, the incompatible of 5-8, and the neutral of 9-12.

Of course, you also need information about the correctness of the responses. The simplest form to implement this would be a column that contains a "1" if the response was correct and a "0" if the wrong button was pressed.

Each subject's data ends up in one file, organized in four columns: Trial number, type code, correctness, and reaction time:

  1     4     1    370
  2     9     1    433
  ...
399    12     1    390
400     5     0    354

The ini file

We now need a way to tell RS what to do and where to look for the data. A simple ini-file is used for that purpose. It's a little ascii file with the default name "RS.INI". And it looks like that:

4      Column with RT
2      Column with type code
3      Column of the first parameter
8      Column of the second parameter (exclusion...
100    Minimal RT (in milliseconds)
1000   Maximal RT

Conditions:
Name        Codes            valid Values for
                         ; 1. parm; 2. parm; correction value
comp        1  2  3  4   ; 1  ; ;
incomp      5  6  7  8   ; 1  ; ;
neut        9 _ 12       ; 1  ; ;
	

The first 4 lines tell RS which values are stored in which column: RTs can be found in column 4, type codes in column 2, the first paramter (correctness) in column 3. We aren't using the second parameter, thus we have some bogus number here.

The next two lines are self-explanatory. Use them to exclude anticipatory reactions and trials in which the subject was asleep.

Next, we have the definitions for our three experimental conditions. The number of conditions is obvious for RS: Each line with a name and three semicolons constitutes one condition. First in each of these lines is the name of the condition. Next are the type codes that belong to that condition. You can either enumerate them, like I did for the compatible and incompatible condition, or indicate a range, using the underscore (_). You can also combine the two like in "1 4 6 _ 10".

RS will read as many type codes as it finds before the first semicolon. Thus the semicolons are essential to seperate the fields. The correctness indicator has it's place after the first semicolon. You are not restricted to one code here, but I tried to keep the example simple. Since we are not using the second parameter and the correction value, there is nothing behind the second and third semicolon.

Running RS

With the ini file set up, we can now start RS. 2 seconds later the results should be waiting for you to inspect them. Suppose you named the data files "RT.1" for subject 1, "RT.2" for subject 2, etc. You can give a wildcard mask or a list of file names to RS:

RS RT.*

This is the simplest way to call RS. RS will first look for its ini file, RS.INI, and read it. It will then read every file that fits the mask, compute all the measures and then write them to a file called RESULTS.RT. This file will contain:

More features

You will have noticed two "sleeping" features in the example ini file: The second parameter gives you the opportunity to exclude trials that match a certain condition. These trials will not be considered errors, RS will simply discard them. You could use them for trials, in which the subject did not give any response, e.g. The correction value can be used to add a fixed number to any reaction time. You can thus influence the the point of 0 ms post-stimulus.

Calling RS can be done with a couple of command line arguments, that influence what RS will do:

Conclusion

I use RS to do all my analyses of reaction time data. It never crashed and all the tests I conducted give me the impression that the results are correct. Now and then I notice a missing feature or a way to make the output more readable or useful. If you find a bug or if you would like to see an option added to RS, just send me an email (feedback@manni-heumann.de) and I will see what I can do. Of course, any other sorts of comments, questions, etc. are also very, very welcome! I'm very interested in any kind of feedback. Let me know what you think.

References