Tutorial: Skipping (16/21)

Location

…\DirectRT\samples\3 ordering trials\skipping.csv

Description

In some situations, you might want to skip participants over a series of trials depending on their response to a given trial. To do this, simply use the symbol > and the trial ID you want to skip to, after the appropriate keycode. For example, imagine you have defined the Z key (code 44) and the / key (code 53) as valid keys. Normally you would do this by entering RT:44,53. However, if you want DirectRT to skip to Trial 34 if the participant hits the Z key (code 44), then you could enter RT:44>34,53.

Open up the input file for this sample. Notice that the first trial presents a text file #preference (i.e., preference.txt). This text file contains a question asking participants which they find most attractive: 1) men, 2) women or 3) food.

Following this question are three groups of trials each presenting stimuli from one of these three categories (i.e., men, women or food). The trials involving men start at trial 2, those involving women at trial 7, and those involving food at trial 12. We want to skip the participant to one of these sections depending on how they respond to the preference question in trial 1.

Notice on the preference question (Trial 1) the valid keys are 1 (code 1), 2 (code 2) and 3 (code 3). If they respond with a 2 (i.e., code 2), this means they have indicated they find women most attractive of the three. Therefore, to skip them to the section on women (which starts at Trial 7) we indicate this with 2>7.

If they hit 3 (code 3), then we will skip them to the section on food by entering 3>12.

Since the section on men immediately follows the preference question, we do not have to use a skip value for anyone who says they find men most attractive.

Finally, notice that there is a simple single screen stimulus at the end of each section. This is an easy way to have participants all meet up at the same place after their section is complete. The screen presents a text file #continue (continue.txt) which simply says to press the spacebar to continue. We set the spacebar to be the only valid key (code 57) and we tell DirectRT to skip to trial 17 (the debriefing screen) when this key is pressed.