Tutorial: Making a self-paced reading experiment in DMDX (1.5 hours)

↵ Back to module homepage

Doing a self-paced reading experiment in DMDX is a bit of a hassle, but it's possible. It follows the same logic as a priming experiment, but with a few extra twists. Since this tutorial builds off of the concepts that were discussed in the priming tutorial, I recommend you do that tutorial (if you haven't already) before continuing with this one.

1. Simple self-paced reading experiment

This was a very simple self-paced reading experiment, which just presented two sentences. If you open the script and examine it, you can see it looks similar to a lexical decision experiment; just, instead of presenting a single word like "DOG", I presented a whole sentence, with one word revealed and the others hidden, like "---- is - ----- ---------."

A few special things had to be done to make this work. Most importantly, I had to make sure that the words within a sentence appear in the right order; if things appear in a completely random order like in the priming experiment, people would not be reading the sentences, they would be reading disorganized lists of words. To do this, I added the <g 6=""> parameter at the top of the script. That tells DMDX to present the stimuli in groups of 6 ("g" is short for "group"). Since each of my sentences was six stimuli long, this will ensure that the six stimuli of a given sentence will be presented in the right order (while the order of the sentences themselves will still be random).

The other changes I made were minor. I put the writing in a monospace font (Courier New) so each letter would occupy the same amount of space. I also put "=" (instead of "+" or "-") in front of each stimulus, because I just want the participant to press either button, and I don't care which button is "right" or not.

2. Self-paced reading with sentences of varying lengths

In the first example, all the sentences had the same number of words. In some experiments, you might have sentences of different lengths (this isn't ideal, but sometimes it's unavoidable; every self-paced reading experiment I've ever done has had this). This requires some extra tweaking, since the "groups" are of different sizes. As you can see from the attached script, the way I did this was by adding some filler lines ("0 c;") at the end of the shorter sentences. The longest sentence is 8 stimuli long. For all the shorter sentences, I added filler lines to make the sentence 8 stimuli long (e.g., for sentences that were normally 6 stimuli long, I added two filler lines). Then I set the group size to 8 ("<g 8>") in the header. This keeps each sentence together within its own group. It's an ugly and awkward hack, but it works.

3. Self-paced reading with comprehension questions

Just reading sentences and not doing anything would be pretty boring in an experiment. If your participants get bored and fall asleep in your experiment (or if they figure out they can just repeatedly mash the SHIFT button without paying attention) you're not going to get meaningful data. So we often include comprehension questions, or something similar, in the experiment to make participants pay attention.

You can see that in this script I added a comprehension question after each item (and increased the <g> parameter accordingly). Make sure you put the right "+" or "-" sign at the beginning of the question line to indicate what you expect the "correct" answer to be!

I added one more thing in this script: I put a "/" at the beginning of the first stimulus in each sentence, to clear the previous screen from the previous sentence.

Wrap-up

This script is very simplistic; you can make further improvements to it by using the strategies discussed in the previous tutorial (e.g., adding practice items, adding instruction messages, using a clear numbering system for the item codes, etc.).

There are lots of other kinds of experiment that can be done with DMDX. To be honest, I find DMDX quite clunky for anything other than basic priming sorts of experiments, so if you're doing any sort of weird experiment I recomment using something else; but nevertheless, I have ended up often using DMDX anyway, because it's free and easy to install, which makes it useful for e.g. when I want to put the same experiment on 30 computers in a computer lab and bring in a lot of volunteers at once. Anyway, here are some other examples of more complicated DMDX experiments, if you're interested in trying to do something fancy.

When you are ready, continue on to the next task in the module; "Make a simple DMDX experiment".


by Stephen Politzer-Ahles. Last modified on 2021-05-14. CC-BY-4.0.