User Manual: Inquisit Behavior Adaptation Task


___________________________________________________________________________________________________________________	

										BEHAVIOR ADAPTION TASK
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 10-22-2013
last updated:  02-17-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-17-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements the Behavior Adaptation Task (BAT), a paradigm to study behavior adaption using a
a motor inhibition Go-NoGo task, as described in:

Hester, R, Simões-Franklin, C., & Garavan, H. (2007). Post-error behavior in active cocaine users: poor awareness 
of errors in the presence of intact performance adjustments. Neuropsychopharmacology, 32, 1974–1984

Millisecond Software thanks Dr. Hester et al for generously providing assistance with script development/clarifications!

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are presented a steady paced (1hz) stream of X and Ys (one letter at the time) in the middle of the screen.
They are instructed to make a button response for each of the letters as long as the letters are alternating 
(switch from X to Y or from Y to X). Trials with alternating letters are the GO trials. 
If a letter was repeated (the alternation order interrupted), participants were instructed to withhold the response.
These trials are the NOGO trials. 

Responses to Go trials in a condition in which all NOGO trials are followed by GO trials (SL = single lure condition) 
are compared to responses to GO trials in a condition in which NOGO trials can also be followed by another NOGO trial 
(DL = double lure condition). Behavior Adaptation is thought to occur if there is a slowing down 
of responses to GO trials following single (correctly suppressed) lure NOGO trials in the DL condition 
(when another NOGO trial is possible to follow)  compared to the SL condition (when another NOGO trial is impossible).

___________________________________________________________________________________________________________________	
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: 'behavioradaptiontask_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.
																														

blocktype:						"SL": block that only runs single NoGo trials (not followed by other NoGo trials)
								"DL": block that runs a variety of single and double NoGo trials

trialtype:						"go" vs. "nogo"
stimulus:						the presented target 

response:						the participant's response (scancode): 
									57 = spacebar; 
									0 = no response
									
correct:						the correctness of the response (1 = correct; 0 = otherwise)

RT: 							the latency of the response in ms (if no response values.rt = ""); measured from onset of target

responsetype:					"NoGo Success" - successful suppression of response to NoGo trial
								"NoGo Failure" - failed suppression of response to NoGo trials
								"Go Anticipatory" - possible anticipatory response to Go trials (latency < parameters.anticipatoryresponse)
								"Go Success" - correct response to Go trials with latency >= parameters.anticipatoryresponse
								"Go Omission" - omission of response to Go trials
								(Note: trialtype distinction added by Millisecond Software)

count_go_SL:					counts Go trials across SL Block (regardless of whether they follow a NoGo trial or not)
count_nogo_SL:					counts NoGo trials across SL Block
count_go_DL:					counts Go trials across DL Block (regardless of whether they follow a NoGo trial or not)
count_nogo_DL:					counts NoGo trials across DL Block
count_anticipatory_SL:			counts anticipatory responses for Go trials across SL Block
count_anticipatory_DL:			counts anticipatory responses for Go trials across DL Block
count_failedsuppressions_SL:	counts failed suppressions across SL Block							
count_failedsuppressions_DL:	counts failed suppressions across DL Block
count_omissions_SL:				counts omissions in across SL Block
count_omissions_DL:				counts omissions across DL Block

sumrt_go_slsl:					sum up correct latencies of GO trials that come after a single correct NOGO trial in the SL condition
count_go_slsl:					count correct GO trials that come after a single correct NOGO trial in the SL condition
sumrt_go_sldl:					count correct GO trials that come after a single correct NOGO trial in the DL condition
count_go_sldl:					sum up correct latencies of GO trials that come after a single correct NOGO trial in the DL condition


(2) Summary data file: 'behavioradaptiontask_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)

SL = block that runs only single lure NoGo trials (not followed by another Nogo trial)
DL = block that runs a variety of Nogo trials (some that are followed by another Nogo trial and some that are not)

for SL and DL blocks separately:
percent_failedsuppression:     		percent of failed suppressions (= responses to Nogo trials)
percent_anticipatory:				percent of anticipatory responses to Go trials (trials that have latencies < parameters.anticipatoryresponse)
percent_omissions:             		percent omissions (= no responses to Go trials) 

meanrt_go_slDL:						mean latency (in ms) of correct GO trials after single correct (aka suppressed) NOGO trials (single lure) in the DL condition
meanrt_go_slSL:						mean latency (in ms) of correct GO trials after single correct (aka suppressed) NOGO trials (single lure) in the SL condition

RT_Diffscore:						the difference score between the two
									=> positive RT_Diffscore: slowing down in Go trials after single lures in DL condition
									(when another lure is possible) compared to Go trials after single lures in SL condition (when no other lure is possible)
																	
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________
* 2 Conditions: SL (single lure NOGO trials) vs. DL (mix of double lure and single lure NOGO trials) - tested within participant in a blocked design
* 1 experimental block per condition (tested in a blocked design; order of conditions is counterbalanced by assigned groupnumber)
	Note: number of blocks run can be edited under section EDITABLE PARAMETER (Note: Hester et al ran 3 blocks per condition)
* 314 trials per block
SL: 1 Start GO trial, 153 GO trials (that follow GO trials), 80 single NOGO trials (follow GO trials), 80 GO trials that follow NOGO trials = 314 trials
		=> order randomized
DL: 1 Start Go trial, 171 GO trials (that follow GO trials), 44 single NOGO trials (follow GO trials and are followed by a GO trial), 
	44 GO trials (follow single NOGO trials),  18 double NOGO trials (followed by another NOGO trial), 
	18 NOGO trials (follow a NOGO trial and are followed by a GO trial) and 18 GO trials (follow the double NOGO trials) = 314 trials
		=> order randomized
* 2 optional practice blocks: practice_SL - 25 trials; practice_DL - 29 trials (practice blocks added by Millisecond Software; not original)


Trial Sequence:
{target (x or y) for 800ms -> fixation cross for 200ms}	-> {target.....
Responses to a target are taken until the time the next target is presented.

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
not original, can be edited under EDITABLE CODE -> 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:

/number_SL_blocks:						the number of consecutive SL blocks to run (default: 1)
/number_DL_blocks:						the number of consecutive DL blocks to run (default: 1)
											Notes: 
											1. Hester et al ran 3 blocks per condition
											2. Each block takes appr. 6 minutes to run
											
											
/fontsize_target:						fontsize of the targets in screen height percentages (default: 10%)
/fontsize_fixation:						fontsize of the fixation mark in screen height percentages (default: 3%)

/stimulusduration:						presentation duration of the targets in ms (default: 800ms)
/fixationduration:						presentation duration of the fixation stimulus in ms (default: 200ms)

/anticipatoryresponse:					latencies in ms in Go trials faster than this value (default: 100ms) are coded as anticipatory responses
										in this script
										
/practice:								true = practice blocks are skipped
										false = practice block are run