User Manual: Inquisit Balloon Analogue Risk Task for Youth


___________________________________________________________________________________________________________________	

								Youth Balloon Analogue Risk Task (BART-Y)
___________________________________________________________________________________________________________________	

Script is based on BART.iqjs by Millisecond Software 
last updated:  06-12-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 06-12-2024 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
A script that implements the Youth Version of the Balloon Analogue Risk Task (BART-Y)This script implements the BART, 
a measure of impulsivity and risk aversion, as described in:

Lejuez, C.W., Aklin, W., Daughters, S. & Zvolensky, M. (2007). Reliability and Validitiy of the Youth Version of the Balloon 
Analogue Risk Task (BART-Y) in the Assessment of Risk Taking Behavior Among Inner-city Adolescents. Journal of
Clinicial Child and Adolescent Behavior, 36, 106-111

Acknowledgements: Millisecond Software LLC thanks Dr. Lejuez and collegues for providing general assistance 
and the original explosion point sequence!

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	

Participants are given 30 (default) balloons. For each balloon they get the choice to pump up the balloon or
collect their winnings. For each successful pump, their winnings can increase. However, if a balloon pops before 
participants collect their potential winnings, they lose all their potential winnings for the current balloon.

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

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

(1) Raw data file: 'barty_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
script.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. 

phase:							the total number of trials are divided into three phases (each contains a 1/3 of all trials):
									phase1: trials1-10
									phase2: trials11-20
									phase3: trials21-30
									(note: number of trials in each phase depend on total number of balloons)
																		
balloonCount:					running total of number of balloons
response:						the participant's response 
latency: 						the response latency (in ms)
explosionPoint:					keeps track of the current balloon's explosion point, determined by list.explosionpoint (see below)

pumpCount:						number of times the participant presses the pump button for each balloon (resets for each balloon)

timeBefore1stPump:				time (in ms) before 1.pump
timeBeforeCollectWithoutPump: 	time (in ms) before collecting without pumping first
timeBtwLastPumpAndCollect:		time (in ms) btw. last pump and collect
timeBtwPumps:					time (in ms) between pumps (excluding time before first pump)
meanTimeBtwPumps:				mean time between pumps for each balloon

reward:							returns the prize earned
								(selects the next prize that could be reached)
								Example: if meter is below Small Prize (bottom quarter)=> "small"; if meter is below Middle Prize (but higher than Small) => "middle"							
									
(2) Summary data file: 'BARTY_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)

reward:							returns the prize earned
								(selects the next prize that could be reached)
								Example: if meter is below Small Prize => "small"; if meter is below Middle Prize (but higher than Small) => "middle"

balloonCount:					running total of number of balloons
->balloonCount1 etc				->separate measures for the first third (trials 1-10), the second third (trials 11-20), and the third (trials 21-30)

totalExplosions:				the number of exploded balloons
-> totalExplosions1 etc: 		->separate measures for the first third (trials 1-10), the second third (trials 11-20), and the third (trials 21-30)


nonExplodedBalloons: 			the number of balloons out of (default) 30 that did NOT explode
->nonExplodedBalloons1 etc:		->separate measures for the first third (trials 1-10), the second third (trials 11-20), and the third (trials 21-30)


totalPumpCount:					total number of times the participant presses the pump button across all balloons (includes exploded balloons)
-> totalPumpcount1 etc:			->separate measures for the first third (trials 1-10), the second third (trials 11-20), and the third (trials 21-30)

averagePumpCount:				the mean average pump count (includes exploded balloons)
-> averagePumpcount1 etc:		->separate measures for the first third (trials 1-10), the second third (trials 11-20), and the third (trials 21-30)

adjustedTotalPumpCount:					sums up the pumps of balloons that did not explode
-> adjustedtotalPumpcount1 etc.:		->separate measures for the first 1, the second 1, and the last 10 balloons

adjustedAveragePumpCount:				mean number of pumps only of balloons that did not explode (=Main Dependent Variable)
-> adjustedAveragePumpcount1 etc:		->separate measures for the first 1, the second 1, and the last 10 balloons
										Note: the lower the number the more risk averse the participant

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________
* 30 ballons to pump up (default)
* each (successful) pump increases the possible reward gained from this balloon
* participant can decide whether to "collect" the reward (aka fill a reward meter) or keep pumping to increase the 
reward further. Participants are told that each balloon will explode at some point and that in the
case of an exploding balloons no reward can be added to the reward meter. Further, participants are alerted to 
the fact that some balloons may explode after only 1 pump while others may fill up the entire screen before they explode.
*after 30 balloons have been pumped, the experiment is over, and participants are shown their final reward meter
as well as the total number of successful pumps (pumps on exploded balloons are excluded). Screenshots of the 
final reward meter are saved in a separate folder.

.
Differences between Adult Version (Lejuez et al, 2002) and Youth Version (Lejuez et al, 2007)
(1) Set-up: 
Adult Version: offers monetary reward 
Youth Version: offers a visual reward meter that can reach 4 levels of reward: small prize, medium prize, big prize, bonus prize.
At the end of the experiment, concrete rewards may be collected based on the level reached.

(2) Sequence of Explosion Points
Adult Version: in the adult version (Lejuez  et al, 2002) the probability of a balloon exploding was set to be 1/128 on the first pump,
1/127 on the second pump and 1/1 on the 128th  pump. The actual explosion point for a balloon was not known beforehand as it
was determined by the computer on runtime by randomly sampling from numbers between 1 and 128 without replacement. Once
the "1" was sampled, the explosion point was reached. The distribution of explosion points generated with such an algorithm
is determined to be normal with a mean of 64 (that is on average a balloon explodes after 64 pumps). Actual sample means
based on 30 balloons may differ from participant to participant.
(see Lejuez et al, 2002, for more detail).

Youth Version: in the youth version one pre-determined sequence of explosion points for all 30 balloons 
is used for each participant. The sequence used in this script was generously provided by the original authors
(see Lejuez et al., 2007). 
It meets the following criterion 
1. the mean explosion point of the first 15 balloons was 64 
2. the mean explosion point of the last 15 balloons was 64 

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
the instructions are provided by Millisecond Software. They are not original.
Edit 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:

/ totalBalloons: 					Number of balloons: Default is 30 
										Note: this script includes summary variables that distinguish between the first 1, the second 1, and the third 10 balloons.

/ balloonsizeIncrement: 			Ballon size increment in scale proportion to the original image

/ showPumpcount: 					Show current pump count
										true: pump count is shown to participant  (default)
										false: pump count is not shown to participant

/ showBallooncount: 				Show current balloon count: 
										true: ballon count is shown to participant  (default)
										false: ballon count is not shown to participant
/ meterFraction:   					1 pump increases the reward by this fraction of the height of the reward meter (default: 1/1000 as suggested by Dr. Lejuez)