Return to the Road Sign Reaction Time Test page
___________________________________________________________________________________________________________________	

								Road Sign Reaction Time Task
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 9-14-2017
last updated:  06-30-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 06-30-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements a computerized Road Sign Reaction Time Task similarly to the one described in:

Edwards J., Ross , L.A., Wadley, V.G., Clay, O.J., Crowe, M., Roenker, D.L., Ball, K.K. (2006).
The useful field of view test: Normative data for older adults.
Archives of Clinical Neuropsychology, 21, 275–286.


___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants see sets of three or six traffic signs (sets are sampled from four different signs:
left arrow, right arrow, bicycle, pedestrian) that are all crossed out by a red cross.
After a random delay (1000-6000ms, steps of 1000ms), the cross is removed from one of the signs, 
and participant has to choose amongst 4 different responses:
- left arrow => move the mouse to the left
- right arrow => move the mouse to the right
- bicycle => press left mouse button
- pedestrian => press right mouse button

Note: by default, the test is run in a blocked design (N=3 vs. N=6, with N=3 always preceding N=6 block).
To run N=3 and N=6 trials in a randomized mixed design, change parameters.runBlockedDesign under section Editable Parameters.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. XXX minutes to complete
(if no task duration is provided, please contact Millisecond Software
(katjab@millisecond.com)

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________ 
The default data stored in the data files are:

(1) Raw data file: 'roadsigntest_raw*.iqdat' (a separate file for each participant)*

build:								The specific Inquisit version used (the 'build') that was run
computer.platform:					the platform the script was run on (win/mac/ios/android)
date, time, 						date and time script was run 
subject, group, 					with the current subject/groupnumber
session:							with the current session id

blockcode, blocknum:				the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum: 				the name and number of the currently recorded trial (built-in Inquisit variable)
										Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
										that do not store data to the data file such as feedback trials. Thus, trialnum 
										may not reflect the number of main trials run per block. 
									
parameters.runBlockedDesign:		true (1): the test is split into 2 blocks: first block runs N=3; second block runs N=6 (default)
									false (0): N=3 and N=6 trials are run in a mixed design
								
values.N:							stores the current set size tested
values.delay:						stores the currently randomly sampled target delay in ms (1000-6000ms)
values.target:						stores the current target image
values.distractor1-
values.distractor5:					store the current distractor images

response:							the participant's response (recorded mouse response)
values.responseCategory:			description of response: 
									"left turn", 
									"right turn", 
									"LM-bicycle" (left mouse button), 
									"RM-pedestrian" (right mouse button)
			
correct:							accuracy of response: 1 = correct response made after removal of cross; 0 = otherwise
values.propCorrect_practice1:		proportion initially correct responses during practice 1

values.valid:						1 = valid response
									0 = invalid response

values.validrt:						valid response time (in ms); measured from onset of unslashed target
									-> "early response": response was made too early (during practice session 2)
									
latency: 							the response latency (in ms) of the last measured response; measured from: onset of stims
values.PrematureResponse:			number of times participant responded before cross was removed during the current trial


(2) Summary data file: 'roadsigntest_summary*.iqdat' (a separate file for each participant)*

computer.platform:					the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:						assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:					time it took to run script (in ms); measured from onset to offset of script
script.completed:					0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)

parameters.runBlockedDesign:		true (1): the test is split into 2 blocks: first block runs N=3; second block runs N=6 (default)
									false (0): N=3 and N=6 trials are run in a mixed design
								
expressionspropCorrect_practice1:	the final proportion initially correct responses during practice 1	
values.aborted:						1 = script was aborted after practice 1; 0 = script was not aborted after practice 1
								
Note: the following summary variables are based on correct responses made after onset of target
The script considers all correct responses made after onset of target including those trials where a premature response was also registered

expressionspropCorrect_overall:	proportion correct across all test trials 
expressionsmeanRT_overall:		mean latency (in ms) of correct responses across all test trials

expressionspropCorrect_3stims:	proportion correct across all test trials with N = 3
expressionsmeanRT_3stims:		mean latency (in ms) of correct responses across all test test trials with N = 3

expressionspropCorrect_6stims:	proportion correct across all test trials with N = 6
expressionsmeanRT_6stims:		mean latency (in ms) of correct responses across all test test trials with N = 6


values.sumPrematureResponses:			the sum of all premature responses (responses before the cross was removed)
values.sumPrematureResponses_3signs:  	the sum of all premature responses (responses before the cross was removed) in the 3 sign condition
values.sumPrematureResponses_6signs:  	the sum of all premature responses (responses before the cross was removed) in the 6 sign condition

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

Note: by default, the test is run in a blocked design (N=3 vs. N=6).
To run N=3 and N=6 trials in a randomized mixed design, change parameters.runBlockedDesign under 
section Editable Parameters.

1. Block.mouseCheck:
This script requires an external mouse. 
If no external mouse is attached, participants are asked to quit and come back later.

2. Response Practice:
- 20 trials that present only 1 sign (5 trials per sign); only correct responses terminate trial
- order of signs is randomized
- after the first 20 practice trials, the script checks performance:
	if performance is below a cut-off value (default: 90%, see editable parameters.practice1MinACC),the block is repeated
	if performance is still below cut-off after the second block (default; see editable parameters.maxPractice1Blocks),
	the script aborts.

3. Task Practice:
- 12 trials that run the test set-up but with only 2 signs and with feedback
- each of the four signs is presented as a target 3 times and 3 times as a distractor
- order of targets is randomized
- signs are randomly assigned to two of 12 possible screen locations
- delays (of cross removal) are randomly selected from 1000-6000ms (see list.delays)

4. Test: with N = 3
- 12 trials with sets of 3 signs (no feedback) 
- each of the four signs is presented 3 times as a target 3 and 6 times as distractors
- each non-target sign is presented as a distractor twice with each target and never in the same combination:
Example: target left turn
presented with:
1: right turn, bicycle
2: right turn, pedestrian
3: pedestrian, bicycle
- order of trials is randomized
- signs are randomly assigned to three of 12 possible screen locations
- delays (of cross removal) are randomly selected from 1000-6000ms (see list.delays)

5. Test: with N = 6
- 12 trials with sets of 6 signs (no feedback)
- each target is presented 3 times
- !!!Distractor Selection (2 signs in each display have to be repeats):
 - distractor 1-3: sample from the non-target options (without replacement)
 - distractor 4-5 (repeated signs): sample from all options (without replacement)
 => it's randomly determined whether the target sign is one of the 'double' signs.
 => the frequency of each sign is not controlled for the N=6 trials
- order of trials is randomized
- signs are randomly assigned to six of 12 possible screen locations
- delays (of cross removal) are randomly selected from 1000-6000ms (see list.delays)

6. mixed design block (only run if parameters.runBlockedDesign is turned to false)
- 24 trials: 12 with N=3 and 12 with N = 6, randomized order

Trial Sequence:
fixation cross (until clicked with mouse)-> pretrialpause (default: 1000ms)
-> 3 (6) signs appear, all crossed out -> random delay: 1000-6000ms
-> one cross is removed: target -> waits for response
(Note: responses are collected from onset of stimuli, a valid response terminates the set-up
even if the target has been revealed yet. These trials are noted as "premature responses")


Screen Location of Signs:
- screen locations are randomly sampled from 12 possible screen locations (arranged in a 3 rows x 4 columns matrix) 

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
provided by Millisecond Software - can be edited under section Editable Stimuli
The signs are 4 traffic signs commonly used in the United States but can easily be exchanged.

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
provided by Millisecond Software as html files.
To edit instructions, edit the html files directly.

___________________________________________________________________________________________________________________	
EDITABLE CODE 
___________________________________________________________________________________________________________________	
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code 
to further customize your experiment.

The parameters you can change are:

/runBlockedDesign:						true (1): the test is split into 2 blocks: first block runs N=3; second block runs N=6 (default)
											false (0): N=3 and N=6 trials are run in a mixed design

/minHorizontalChange_px:				any horizontal mouse movements (in pixels) smaller than this value is ignored 
											and not processed as a response (default: 100 pixels).

/picSize:									the proportional size of the images (default: 20%)
											Note: if picSize is increased list.xcoordinates/list.ycoordinates need to be updated accordingly

/maxPractice1Blocks:						the maximum number of response practice blocks run if performance is too low (default: 2)
/practice1MinACC:							the minimum proportion correct that terminates practice 1 (response practice)

/pretrialpause:							the pause (in ms) after pressing the fixation cross and presentation of signs (default: 1000ms)
/responseReminder:						during practice (response learning) a response reminder is presented after this duration (in ms) (default: 5000ms))