User Manual: Inquisit NonX Continuous Performance Test (NonX-CPT)


___________________________________________________________________________________________________________________	

									NonX Continuous Performance Task (NonX-CPT)
									(German instructions)
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 07-10-2024
last updated:  09-20-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 09-20-2024 Millisecond Software

German instructions provided by K. Borchert for Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a Non-X Continuous Performance Task (NonX-CPT).
A Continuous Performance Task (CPT) uses a go/nogo testing paradigm with a stream of stimuli 
that either require a go response ("press the spacebar") or a nogo response ("don't do anything"). 
The NonX-CPT procedure presents a high frequency of go-responses (NonX trials) and low
frequency of nogo-responses (X trials). This contrasts with the CPT-Rosvold procedure ('X-CPT').
The Conners CPT-3 (Conners, 1995) is one example of a nonX-CPT procedure. 
CPTs are generally used as a measure of sustained and selective attention. 

Reference:											

Ballard, J. C. (2001). Assessing Attention: Comparison of Response-Inhibition 
and Traditional Continuous Performance Tests. 
Journal of Clinical and Experimental Neuropsychology, 23(3), 331–350. 
https://doi.org/10.1076/jcen.23.3.331.1188

Conners, C.K. (1995). Conners' Continuous Performance
Test computer program 3.0: User's manual.
Toronto, Ontario, Canada: Multi-Health Systems
Inc.
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants view a continuous stream of letters and are asked to press the Spacebar 
whenever the letter is 'NOT an X' (go trials) but refrain from responding 
when the letter is an X (nogo trials).

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 18 minutes to complete

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________
The fields in the data files are:

(1) Raw data file: 'nonx_cpt_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:					with the current subject id
group: 						with the current group id
session:					with the current session id

////parameters:
numberOfMainBlocks:			the number of main blocks to run 
numberOfIsiPerBlock:		the number of Isis to run 
numberOfTrialsPerIsi:		the number of Trials per Isi
propNoGoTrialsPerIsi:		proportion of Nogo Trials per Isi

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. 
								
practice:					1 = practice session; 0 = test session								
								
blockCounter:				counts the number of blocks run; resets after practice
trialCounterPerBlock:		tracks the number of trials run per main block
currentIsiOrder:			stores the current IsiOrder for the current test block (if counterbalanced)
isiCounter:					counts the number of Isis run in the current (main) test block

currentIsi:					stores the current ISI (in ms)
trialCounterPerIsi:			tracks the number of trials run per current Isi
trialType:					0 = nogo trial (X), 1 = go trial (non-X)
letter:						the letter presented
corrResp:					stores the correct response ("RESPONSE" vs. "NO RESPONSE")

//custom DVs for trial.nonXCpt
resp:						whether a response was made ("RESPONSE" vs. "NO RESPONSE")

respRT:						the response time of the response; measured from onset of letter
							(empty for no responses)

valid:						0 = anticipatory response (response time < 100ms); 1 = valid response (response time >= 100)

respCategory:				anticipatory: a response was made within the first 100ms after onset of letter
							hit: a valid response was made in a go trial
							miss: no response was made in a go trial
							correct rejection: no response was made a in a nogo trial
							falseAlarm: a valid response was made in a nogo trial
							
acc:						1 = the response was correct and valid for the current trial 
							0 = the current response was incorrect for the current trial (Note: anticipatory responses are always incorrect)
														
pResponse:					0 = no Perseveration (= anticipatory and/or additional (random) responses) was made during this trial
							1 = at least one Perseveration was detected

pRespCounter:				number of Perseverations (= anticipatory and/or additional (random) responses) counted during the current trial									

//built-in: Note these variables are not useful for trial.nonXCpt due to the current trial setup
response:					the response of participant (scancode of response button)
correct:					correctness of response (1 = correct, 0 = error)
latency:					response latency (in ms); measured from: onset of trial


(2) Summary data file: 'nonx_cpt_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)
							
////parameters:
numberOfMainBlocks:			the number of main blocks to run 
numberOfIsiPerBlock:		the number of Isis to run 
numberOfTrialsPerIsi:		the number of Trials per Isi
propNoGoTrialsPerIsi:		proportion of Nogo Trials per Isi							


//////////////////////////////////////PRACTICE/////////////
practiceCounter:			number of practice rounds run 
practiceAcc:				proportion correct in the final practice round

//////////////////////////////////////////TEST/////////////
//Total: across all test blocks

trialCounterPerIsiTotal:		number of test trials run
trialCounterPerIsiGoTotal:		number of Go test trials run
trialCounterPerIsiNoGoTotal:	number of Nogo test trials run

////////////////////////////
/////Accuracy Measures//////
////////////////////////////

propCorrectTotal:			overall proportion correct across all test trials (regardless of trialType)

hitRateTotal:				proportion of responses to targets (nonX stims) relative to all go-trials (= correct response for go trials)
 							
missRateTotal:			proportion of missed responses to targets (nonX stims) relative to all go-trials 
							=> possible indicator of inattentiveness	
							
falseAlarmRateTotal:		proportion of responses to non-targets (X stims) relative to all nogo-trials 
							(= error response for nogo trials)
							=> coupled with fast hitRT: a possible indicator for impulsive responding
							=> coupled with slow hitRT: a possible indicator for inattentiveness
corrRejectRateIsi1:			proportion of non-responses to non-targets relative to all nogo-trials (= correct response for nogo trials)

pRespCounterTotal:			number of Perseverations across all test trials (Perseverations = random responses + anticipatory responses)
							=> Perseverations indicate impulsivity or a very liberal response style.
							
zHitRateTotal:				the calculate z-score of the overall hitRate
zFalseAlarmRateTotal:		the calculated z-score of the overall falseAlarm/falseAlarm rate

Note: *Adjustments to z-scores as recommended by:
Gregg, A. & Sedikides, C. (2010). Narcissistic Fragility:
Rethinking Its Links to Explicit and Implicit Self-esteem, Self and Identity, 9:2, 142-161 (p.148)										
=> Adjustments are made if the  FArate (hitRate) = 0 (increased to 0.005) or 1 (decreased to 0.995)*

dPrime:				Computes d' (parametric measure of discriminability btw. signals and noise)
					=> Range (in this script): 
					-5.1516586840152740479 <= dprime <= 5.1516586840152740479 (=perfect performance)
					=> The higher the value, the better signals (go stims) were overall distinguished from noise (nogo stims)
					(d' = 0: chance performance; negative d-primes: participant treated nontargets as targets and targets as nontargets)
													
c: 					c-criterion in signal detection: The absolute value of c provides an indication of the strength of
					the response bias/response style
					negative: participant more likely to report that signal is present (liberal response style);
					may favor faster responding in speed-accuracy trade-off response paradigms
					positive: favoring caution (conservative response style)								
																				
////////////////////////////
///Response Time Measures///
////////////////////////////						
														
hitRTTotal:					the mean response latency (in ms) of hit responses
								-> a fast hitRT coupled with high falseAlarmRate may indicate impulsive responding
								-> a slow hitRT (coupled with high error rate) may indicate inattentiveness while responding
								-> a slow hitRT in general could also indicate a conservative response style
								
sdHitRTTotal:				the standard deviation (in ms) of hit responses
							(consistency of response speed to targets)
							-> possible indicator of variable attentiveness across the entire task
							
										
//////////////////////////////////////
Performance Statistics by ISI									
//////////////////////////////////////	

Note: An increase in hit response time as well as an increase in error rates from fast (e.g. 1s) to slower Isis (e.g 4s)
may indicate loss of vigilance.

isi1:						stores the value (in ms) run as ISI1
trialCounterPerIsiIsi1:		number of test trials run in Isi1
trialCounterPerIsiGoIsi1:	number of Go test trials run in Isi1
trialCounterPerIsiNoGoIsi1:	number of Nogo test trials run in Isi1
hitRateIsi1:				proportion of responses to targets (nonX stims) relative to all Isi1 go-trials (= correct response for go trials)							
missRateIsi1:			proportion of missed responses to targets (nonX stims) relative to all Isi1 go-trials 
falseAlarmRateIsi1:			proportion of responses to non-targets (X stims) relative to all Isi1 nogo-trials (= error response for nogo trials)
corrRejectRateIsi1:			proportion of non-responses to non-targets relative to all Isi1 nogo-trials (= correct response for nogo trials)
pRespCounterIsi1:			number of Perseverations across all Isi1 test trials (Perseverations = random responses + anticipatory responses)																			
hitRTIsi1:					the mean response latency (in ms) of hit responses in Isi1							
sdHitRTIsi1:				the standard deviation (in ms) of hit responses in Isi1

(same for ISI2-ISI3)

//////////////////////////////////////
Block by Block Performance Statistics											
//////////////////////////////////////											

Note: A increase in hit response time (get slower) as well as an increase in error rates over time
could be a sign of waning sustained attention.

trialCounterPerIsiBlock1:		number of test trials run in Block1
trialCounterPerIsiGoBlock1:		number of Go test trials run in Block1
trialCounterPerIsiNoGoBlock1:	number of Nogo test trials run in Block1
hitRateBlock1:					proportion of responses to targets (nonX stims) relative to all Block1 go-trials (= correct response for go trials)							
missRateBlock1:				proportion of missed responses to targets (nonX stims) relative to all Block1 go-trials 
falseAlarmRateBlock1:			proportion of responses to non-targets (X stims) relative to all Block1 nogo-trials (= error response for nogo trials)
pRespCounterBlock1:				number of Perseverations across all Block1 test trials (Perseverations = random responses + anticipatory responses)																			
hitRTBlock1:					the mean response latency (in ms) of hit responses in Block1							
sdHitRTBlock1:					the standard deviation (in ms) of hit responses in Block1

(same for block2-6)	
							
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

(1) Optional Practice Session (see editable parameter section to fine-tune the practice phase)
By default, the practice session runs 20 trials with 12 go-trials (nonX) and 8 nogo-trials (X).
The frequencies were chosen to run more go than nogo trials but to run more nogo trials for
practice purposes than during the test procedure. Participants receive error feedback
(by type of error).
The practice block is repeated 3 times if performance is lower than 80% correct (check editable parameters).

(2) Test Session (see editable parameter section to fine-tune the test phase) 
By default, the script runs 6 main blocks that each run 3 (sub)blocks of 
3 different ISIs (1000ms,2000ms,4000ms).
The order of the Isis can be counterbalanced across the 6 blocks or are selected randomly.
By default, they are counterbalanced.
There are no breaks between ISIs and/or main blocks. The task seems to be continuous from the 
participant's perspective.
For each isi-(sub)block, the scripts runs 10% nogo trials (for 20 trials => 2 nogo trials, editable parameters).
The order of go and nogo trials is randomly determined.

//////Trial Sequence:
-> letter for 250ms (response does not interrupt letter presentation)
-> blank screen for isi-duration (response window: letter duration + isis duration)
...
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Stimuli'
___________________________________________________________________________________________________________________	
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:

//design parameters:
/ numberOfMainBlocks = 6				//number of main blocks to run
										//number should work with numbers of Isis run and 
										//potentially parameters.counterbalanceOrderIsisACrossMainBlocks
										//Note: the script only provides summary variables up to 6 main blocks
										
/ numberOfIsiPerBlock = 3	 			//refers to 'subblocks' (needs to correspond to number of items in list.isis below, here: 3)
										//Notes: 
										//a) isis are run in blocked format (hence the subblock reference)
										//b) the script only provides summary variables up to 3 isis

/ numberOfTrialsPerIsi = 20				//number of trials run per isi subblock
/ propNoGoTrialsPerIsi = 0.1   			//proportion of nogo trials per isi subblock (should result in an integer number) 

/ counterbalanceOrderIsisAcrossMainBlocks = true 	//controls the order of the isis per main block
													//true = the order of the isis is counterbalanced across all blocks
													//Example: for 3 isis, there need to be 6 main blocks to run each combination of isis at least once
													//IMPORTANT: if number of isis <> 3 and counterbalancing is needed, 
													//change list.isiOrders/number of Main Blocks accordingly
													//false = isis are selected randomly without replacement per main block
												
/ runPractice = true					//true: a practice session is run before the main test session
										//false: no practice session is run; the script starts with the test session

/////only relevant if practice should be run
/ numberOfPracticeTrials = 20			//number of practice trials per practice block
/ propNoGoTrialsPractice = 0.4  		//proportion of Nogo trials in a practice block
/ practiceIsiMS = 2000					//the isi (in ms) used for practice blocks
/ minAccPractice = 0.8					//the minimum proportion correct that stops practice (after 20 trials)
/ maxPracticeBlocks = 3					//the maximum number of practice blocks run before the test is started										


//timing parameters
//Note: isis can be set under list.isis below
/ stimDurationMS = 250					//the duration of the letters in MS
/ anticipatoryRespMS = 100				//response times lower than this are considered 'anticipatory'
/ feedbackDurationMS = 1500				//the error feedback duration (in ms) during practice session


//stimuli sizing:
/ letterHeightPct = 15%					//proportional height (to canvas) of the letters


//responseKeys:
/ responseKey = " "						//the response key (here: space)
/ responseKeyLabel = "[space]"			//the label used to describe the response key for instruction purposes