Return to the Balloon Analogue Risk Task for Youth page
___________________________________________________________________________________________________________________	

								Youth Balloon Analogue Risk Task (BART-Y)
___________________________________________________________________________________________________________________	

Script is based on BART.iqx by Millisecond Software 
last updated:  11-11-2019 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 11-11-2019 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 FILE INFORMATION 
___________________________________________________________________________________________________________________	
The default data stored 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.sessionid:					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. 
																					
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)
mean_timebtwpumps:				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)

computer.platform:				the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:					assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
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
->ballooncount_10 etc				->separate measures for the first 10 (1-10), the second 10 (11-20), and the last 10 balloons (21-30)

total_explosions:					the number of exploded balloons
-> total_explosions_10 etc: 		->separate measures for the first 10 (1-10), the second 10 (11-20), and the last 10 balloons (21-30)


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


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

averagepumpcount:				the mean average pump count (includes exploded balloons)
-> averagepumpcount_10 etc:		->separate measures for the first 10 (1-10), the second 10 (11-20), and the last 10 balloons (21-30)

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

adjustedaveragepumpcount:					mean number of pumps only of balloons that did not explode (=Main Dependent Variable)
-> adjustedaveragepumpcount_10 etc:			->separate measures for the first 10, the second 10, 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 10, the second 10, and the third 10 balloons.

/ balloonsizeincrement: 			Ballon size increment in pixels (default: 8pixels)
/ 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)