User Manual: Inquisit Psychological Refractory Period Task

					
__________________________________________________________________________________________________________________	

								*PSYCHOLOGICAL REFRACTORY PERIOD TASK (PRP)*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 01-22-2013
last updated:  07-31-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 07-31-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the  Psychological Refractory Period (PRP) Task by Marczinski & Fillmore (2006).
The PRP task is a dual reaction time task, requiring participants to perform a task1 before performing a task2 
during each trial. Typically, responses to task1 interfere with responses to task2 as expressed by 
delayed response times to task2.  According to Marczinski & Fillmore (2006) this delay is attributed to the 
psychological refractory period which refers to the time period during which task1 is still being processed
and task2 cannot be processed yet.  The interference effect is particularly sensitive to disruptions of alcohol.

Reference:

Marczinski, C.A. &  Fillmore, M.T. (2006). Clubgoers and Their Trendy Cocktails: Implications of Mixing
Caffeine Into Alcohol on Information Processing and Subjective Reports of Intoxication. Experimental and Clinical 
Psychopharmacology, 14, 450–458.

Millisecond Software thanks Dr. Fillmore for graciously reviewing this script and giving us ample feedback!

___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________	
DUAL TASK;  temporally separated by randomly selected stimulus onset asynchronies (SOA).
Task1: 	go-nogo task. 
		Press the ENTER* key with your right hand (index finger) as soon as you see a "1" (go), 
		don't do anything with your right hand if you see an "X" (nogo)
		* original task used "1" key on numeric keypad
Task2: 	auditory discrimination task. 
		Press "a" with your left hand (middle finger) when you hear a high sound; 
		press "z" with your left hand (index finger) when you hear a low sound.

NOTE: The response to Task 1 (if one is given) should be given before response to Task 2 - as a response to 
task 2 terminates the trial.

A PRPInterferenceScore calculates the interference score by subtracting the mean rt times (task2) 
for maximum SOAs (low interference)  from the mean rt times (task 2) for minimum SOAs (high interference). 
Incorrect responses (responses that were either incorrect for  task 1 or task 2 or both) as well as responses 
that were faster than 100ms and slower than 2000ms were filtered out as recommended by Dr. Fillmore.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 15 minutes to complete

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

(1) Raw data file: 'psychologicalrefractoryperiod_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. 
										
trialcount:						updates trial count
soa:							stores the current SOA 
task1cat:						1 = go stimulus; 2 = nogo stimulus
task2cat:						1 = low stimulus; 2 = high stimulus
firsttaskresponse:				stores the response to the first task        
secondtaskresponse:				stores the response to the second task
firsttaskresponse_rt:			stores the reaction time (rt) in ms for the first response (since onset of task 1 stimulus)
secondtaskresponse_rt:			stores the reaction time in ms for the second response (since onset of task 2 stimulus)
firsttask_correct:				stores the accuracy of response to first task (1 = correct; 0 = otherwise)
secondtask_correct:				stores the accuracy of response to second task (1 = correct; 0 = otherwise)
correct_total:					stores the accuracy of the combined responses (1 = correct for both tasks; 0 = otherwise)

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

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

///parameter settings:									
									
gokey:							keyboard key associated with go-response (default: 'O' key)
lowkey:							keyboard key associated with low sound response (default: 'z' key)
highkey:						keyboard key associated with high sound response (default: 'a' key)

fixationduration:				duration that fixation cross is displayed on the screen (default: 250ms)
task1stimulus_duration:			duration that the task 1 stimulus is maximally displayed on the screen (default: 2000ms)
task2response_duration: 		max. response time period after onset of task 2 stimulus (default: 2000ms)
intertrialinterval:				duration between trials (default: 2200ms)

///Summary Variables:

sumrt2_maxsoa:					stores the sum of the rt to the second task after the maximum SOA (!!! EXCLUDES ERROR TRIALS)
sumrt2_minsoa:					stores the sum of the rt to the second task after the minimum SOA (!!! EXCLUDES ERROR TRIALS)
count_validmaxsoa:				counts the trials with the maximum SOA during which participant responds to task 2 (!!! EXCLUDES ERROR TRIALS)
count_validminsoa:				counts the trials with the minimum SOA during which participant responds to task 2 (!!! EXCLUDES ERROR TRIALS)

meanRT1_maxSOA:					calculates the mean reaction times in ms to task 1 for maximum SOAs (! only for correct trials)
meanRT1_SOA3:					calculates the mean reaction times in ms to task 1 for SOA3s (! only for correct trials)
meanRT1_SOA2:					calculates the mean reaction times in ms to task 1 for SOA2s (! only for correct trials)
meanRT1_minSOA:					calculates the mean reaction times in ms to task 1 for minimum SOAs (! only for correct trials)
meanRT2_maxSOA:					calculates the mean reaction times in ms to task 2 for maximum SOAs (! only for correct trials)
meanRT2_SOA3:					calculates the mean reaction times in ms to task 2 for SOA3s (! only for correct trials)
meanRT2_SOA2:					calculates the mean reaction times in ms to task 2 for SOA2s (! only for correct trials)
meanRT2_minSOA:					calculates the mean reaction times in ms to task 2 for minimum SOAs (! only for correct trials)

PRPinterferencescore:			calculates the interference score by subtracting the mean rt times (task2)
								for maximum SOAs (low interference) from the mean rt times (task 2)
								for minimum SOAs (high interference)

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________									
EXPERIMENTAL DESIGN (see Marczinski & Fillmore, 2006)
* 2 (types of task 1 stimuli) x 2 (types of task 2 stimuli) x 4 (SOAs) * 12 repetitions = 192 trials
=> each combination of task stimuli (= 4 combinations) are paired with 12 sets of the 4 SOAs

SEQUENCE OF TRIAL EVENTS:
1.	fixation cross appears for 250ms (default, editable value)
2.	a blank screen is presented for a randomly determined time period 
(list.foreperiodduration contains default values)
3.	task 1 stimulus appears in the middle of the screen (response to task 1 stimulus can be given as soon as 
	stimulus appears on the screen; reaction time to task 1 is measured from onset of task 1 stimulus);
	task 1 stimulus disappears after 2000ms (default, editable value) or when response to task 2 is given
4.	after a randomly sampled SOA, the task 2 stimulus is presented (response to task 2 stimulus can be given as
	soon as task 2 stimulus appears on the screen; reaction time to task 2 is measured from onset of task 2 stimulus);
	task 2 stimulus was presented for 500ms.
5.  after participant responds to task 2 stimulus or after 2000ms of onset of task 2 stimulus (default, editable value), 
	whichever comes first, the intertrialperiod of 2200ms is started. Error Feedback is given during this
	time.

PRACTICE:
Practice is given twice, once to give participants an opportunity to learn about the tasks and the stimuli and once
to assess whether PRP interference (likely) occurs. The first set of practice trials (20 trials) gives 
complete feedback (correct, incorrect, no response detected). The second set of practice trials (20 trials) 
is presented like the actual test with only error feedback/no response detected. After the second practice set, 
the PRP index score is presented and the experimenter can decide to continue on to the actual test 
or repeat practice.

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
TASK 1: go stimulus = "1" and nogo stimulus = "X" (see Marczinski & Fillmore, 2006).
The default response key for the go stimulus is the ENTER key (scancode 28, editable value). This differs from 
Marczinski & Fillmore (2006) as they used the "1" key on the numeric key pad on the right side of the keyboard.
In order to run this experiment on keyboards that do not have the numeric keypad on the right, a different response
key is used in this script.

TASK 2: low tone (125 Hz) ; high tone (1000hz), both 500ms long (see Marczinski & Fillmore, 2006); 
the stimuli are NOT originals.
The stimuli for this script were created in Audacity. 
The low tone was created with an amplitude of 0.8 (125Hz, 500ms); 
the high tone was created with an amplitude of 0.1 (1000Hz, 500ms).
The default keyboard response keys are "a" for high tone and "z" for the low tone (this combination is chosen due
to the fact that they both appear on the left and side of the keyboard with "a" sitting above (=high) "z" (=low)

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
Instructions are not original but based heavily original instructions kindly provided by Dr. Fillmore.
Instructions are provided by Millisecond Software
as htm/html pages and can be edited by changing the provided htm/html files.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).
	
___________________________________________________________________________________________________________________	
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:

/gokey:						keyboard key associated with go-response (default: 'O' key)
/lowkey:					keyboard key associated with low sound response (default: 'z' key)
/highkey:					keyboard key associated with high sound response (default: 'a' key)


/getReadyDuration:			duration (in ms) of the the get-ready-trial (default: 7000ms)
/fixationduration:			duration (in ms) that fixation cross is displayed on the screen (default: 250ms)
/task1stimulus_duration:	duration (in ms) that the task 1 stimulus is maximally displayed on the screen in ms (default: 2000ms)
/task2response_duration: 	max. response time period (in ms) after onset of task 2 stimulus in ms (default: 2000ms)
/intertrialinterval:		duration (in ms) between trials in ms (default: 2200ms)

/maxSOA:					maximum SOA (in ms) used in the study in ms (default: 800ms)
/SOA3:						default: 600ms
/SOA2:						default: 200ms
/minSOA:					minimum SOA (in ms) used in the study in ms (default: 50ms)
							!!!if changed, go to Editable LISTS and change corresponding values there as well