Return to the Psychomotor Vigilance Test page
						
									PSYCHOMOTOR VIGILANCE TEST
SCRIPT INFO

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

Script Copyright © 08-30-2017 Millisecond Software


BACKGROUND INFO 

											*Purpose*
This script implements a Psychomotor Vigilance Test as described in:

Thomann, J.; R. Baumann, C.R.; Landolt, H.-P.; & Werth, E (2014).
Psychomotor Vigilance Task Demonstrates Impaired Vigilance in Disorders with Excessive Daytime Sleepiness.
Journal of Clinical Sleep Medicine, Vol. 10, 1019-1024.


											  *Task*
Participants are instructed to press the  as fast as possible after a red stopwatch appears
on screen. A valid response (response occurs after stopwatch appears) is followed by reaction time 
feedback. An invalid response (response occurs before stopwatch appears) is followed by a 
brief error message.


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

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

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) 

/ISI:							the currently randomly selected interstimulus interval in ms (randomly sampled from 2-10s)								
response:						the participant's response: 57 = spacebar press
latency: 						the response latency (in ms); measured from onset of trial
/rt:							stores the latency of the response measured from onset of target stim
								(calculated as the difference btw. values.rt_elapsedtime and clock.target.timestamp)
/responseCategory:				"false start" (= response before target occurs) vs.
								"no lapse" (= valid response with latency <= 500ms)
								vs. "lapse" (= valid response with latency > 500ms)
/countFalseStarts:				counts the number of times an invalid (early) response is made in the current block
/lastTarget_timestamp:			stores the timestamp (script.elapsedtime in ms) of the presented target stim from the previous trial
clock.target.timestamp:			stores the timestap (script.elapsedtime in ms) of the last presented target stim
								Note: if response occurs before target appears, both variables store the same value
/rt_elapsedTime:				stores the script elapsed time (in ms) of the spacebar press

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

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)

Summary Variables for Test Block only (excludes Habituation Phase): (see Thoman et al, 2014, p.1020)

/meanRT: 						mean valid response latency (in ms; measured from onset of target)
/reciprocalMeanRT: 				its reciprocal (see Thoman et al, 2014, p.1020)
/medianRT: 						median valid response latency (in ms; measured from onset of target)
/maxRT: 						the maximum valid response latency (in ms; measured from onset of target)
/minRT: 						the minimum valid response latency (in ms; measured from onset of target)

/meanRT500: 					mean valid response latency of responses with latencies <= 500ms (in ms; measured from onset of target)
/reciprocalMeanRT500: 			its reciprocal (see Thoman et al, 2014, p.1020)
/medianRT500: 					median valid response latency of responses with latencies <= 500ms (in ms; measured from onset of target)
/maxRT500: 						the maximum valid response latency of responses with latencies <= 500ms (in ms; measured from onset of target)
/minRT500: 						the minimum valid response latency of responses with latencies <= 500ms (in ms; measured from onset of target)

/10thpercentile: 				in this script: the 10th percentile RT is taken as the value that occupies the 10th spot (rounded to the nearest integer)
								in the sorted RT list 
/90thpercentile: 				in this script: the 90th percentile RT is taken as the value that occupies the 90th spot (rounded to the nearest integer)
								in the sorted RT list
/rangeRT:						the difference in ms betw. 10th percentile RT and 90th percentile RT

/10thpercentile500: 			in this script: the 10th percentile RT is taken as the value that occupies the 10th spot (rounded to the nearest integer)
								in the sorted RT list of valid latencies <= 500ms
/90thpercentile500: 			in this script: the 90th percentile RT is taken as the value that occupies the 90th spot (rounded to the nearest integer)
								in the sorted RT list of valid latencies <= 500ms
/rangeRT500:					the difference in ms btw. 10th percentile RT and 90th percentile RT of valid latencies <= 500ms	 							

/numberOfLapses:				stores the total number of lapses (responses with latencies > 500ms) during the test block
/transformedNumberOfLapses:		numberOfLapses transformed with (sqrt(numberOfLapses) + sqrt(numberOfLapses+1)) (see Thoman et al, 2014, p.1020)
/meanLapseRT:					the average lapse in ms (average ms above 500ms for lapses)
/cumulativeLapseRT:				the sum of all lapse times during the test block 


/countFalseStarts:				counts the number of false starts during the test block 
/falseRT:						ratio of
								'number of times participant responded BEFORE target appeared' to 
								'the number of times participant responded AFTER target appeared'
								this ratio is presented as a percentage.

								
* 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

1. Habituation Phase: ~1 min (Block is terminated after the last trial cycle within the designated timeframe)
- same task as actual test but performance is not used for summary statistics
Note: the Habituation Phase seamlessly turns into the Test Phase without giving participants any further warning.

2. Test Phase: ~10 min (Block is terminated after the last trial cycle within the designated timeframe)

Trial Sequence:
ISI (randomly selected from 2-10s)-> target stim until response-> RT feedback (1000ms)

Note: If a response is made before the target stim appears, a short error message is flashed onto the screen
and a new trial is started.


STIMULI:
target stimulus is a red stopwatch counter (counts in milliseconds)

INSTRUCTIONS
provided by Millisecond Software - can be edited under section Editable Instructions

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:

/lapseRT:						any valid response latency > lapseRT (default: 500ms) is considered a lapse
/habituationDuration:			the duration (in ms) of the habituation phase (default: 1min => 60000ms)
/taskDuration:					the duration (in ms) of the test phase (default: 10min => 600000ms)
/RTfeedbackDuration:			the duration (in ms) of the RT feedback (default: 1000ms) 
/falseStartFeedbackDuration:	the duration (in ms) of the false Start warning/feedback (default: 300ms)	
/readyDuration:					the duration (in ms) of the 'get Ready' trial (default: 2000ms)
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment