Difference between revisions of "CNP BART"

From Pheno Wiki
Jump to: navigation, search
 
(46 intermediate revisions by 3 users not shown)
Line 7: Line 7:
  
 
=== Task Procedure ===
 
=== Task Procedure ===
For general testing procedure, please refer to LA2K General Testing Procedure [here?].
 
  
Our version of the BART task was programmed in E-Prime 2.0.  It consists of 40 total trials, with balloons that are colored red or blue (20 of each color).  Red balloons are relatively “high risk”; they have a 1/32 probability of exploding on the first pump, and an incrementally ascending probability of explosion with each successive pump (1/31 on the second pump, 1/30 on the third pump, etc.).  Blue balloons are “low risk”, with a 1/128 probability of exploding on the first pump (1/127 on the second pump, etc.).  The order of balloon color across trials was randomized.  Examinees are given 5 points for each adjusted pump.  In our version of the task, participants are not paid for their performance.  
+
Our version of the BART task was programmed in E-Prime 2.0.  It consists of 40 total trials, with balloons that are colored red or blue (20 of each color).  Red balloons are relatively “high risk”; the probability of explosion on each red balloon is randomly selected from a range of 1 to 32 pumps.  Blue balloons are “low risk", in which the probability of explosion is randomly selected from a range of 1 to 128 pumps.  The order of balloon color across trials was randomized.  Examinees are given 5 points for each adjusted pump.  In our version of the task, participants are not paid for their performance.  
  
 
At the beginning of the task, instructions are presented on the screen in yellow, size 16 Arial font, with a black screen background.  In order to reduce learning affects on pumping behavior, the examinees are informed at the outset that two different balloons are used with different explosion tendencies (see Wallsten et al., 2005 for consideration of this issue).  The instructions are as follows:  
 
At the beginning of the task, instructions are presented on the screen in yellow, size 16 Arial font, with a black screen background.  In order to reduce learning affects on pumping behavior, the examinees are informed at the outset that two different balloons are used with different explosion tendencies (see Wallsten et al., 2005 for consideration of this issue).  The instructions are as follows:  
Line 24: Line 23:
 
These instructions are reiterated on following screens, in which the buttons used for pumping and cashing out are indicated.  If the subject is right-handed (this information is entered into the program during start-up), the pumping key is the left key on a 3-button keypad, while the cash-out key is the right key.  In contrast, if the examinee is left handed, this button mapping is reversed (i.e., pumping with the right key, and cashing-out with the left key).  The placement of the keypad is also oriented on the right or left side of the examinee in accordance with handedness.
 
These instructions are reiterated on following screens, in which the buttons used for pumping and cashing out are indicated.  If the subject is right-handed (this information is entered into the program during start-up), the pumping key is the left key on a 3-button keypad, while the cash-out key is the right key.  In contrast, if the examinee is left handed, this button mapping is reversed (i.e., pumping with the right key, and cashing-out with the left key).  The placement of the keypad is also oriented on the right or left side of the examinee in accordance with handedness.
  
After the examinee expresses understanding of the task, the experimental session begins. A blank screen with a fixation cross is briefly shown (500 milliseconds), and then the first balloon is presented (red or blue).  Text is placed below the balloon image to indicate which key press is used for pumping and which is used for cashing in (i.e., serving as a reminder).  Balloons are presented centrally on an all white screen background.  The first balloon image is 152 X 152 pixels in size.  After one pump, another balloon image is presented instantaneously with a size of 154 X 154 pixels.  The balloon size increases in height and width by 2 pixels with each successive pump, giving the appearance of being inflated.  This continues until the examinee cashes out or the balloon explodes, whichever occurs first.  Upon explosion, an image of a ruptured balloon is presented of comparable size to the last balloon image.  After both cash outs and explosions, a rectangular yellow text box is presented on the screen for 1500 milliseconds which shows the examinee’s current Total Points in black text (Arial size 16 font).  In the case of an explosion, this total will be identical to the previous trial’s total because no points have been earned*.  Note that accumulated points are only shown at the end of a given trial, and are not shown as the examinee is pumping.  After the previous trail is concluded, a blank screen with a central fixation cross is presented for 500 milliseconds, followed by presentation of the next balloon/trial.  This process continues until the 40th balloon is completed.  Afterward, a black screen is presented which thanks the participant for his/her participation, and shows a yellow text box with the Grand Total Points earned (Arial size 16 font, yellow text). The task is self-paced and duration depends on the examinee’s behavior, but initial results from our data indicate that the task took an average of XXXXXXXXXXX minutes across participants.
+
After the examinee expresses understanding of the task, the experimental session begins. A blank screen with a fixation cross is briefly shown (500 milliseconds), and then the first balloon is presented (red or blue).  Text is placed below the balloon image to indicate which key press is used for pumping and which is used for cashing in (i.e., serving as a reminder).  Balloons are presented centrally on an all white screen background.  The first balloon image is 152 X 152 pixels in size.  After one pump, another balloon image is presented instantaneously with a size of 154 X 154 pixels.  The balloon size increases in height and width by 2 pixels with each successive pump, giving the appearance of being inflated.  This continues until the examinee cashes out or the balloon explodes, whichever occurs first.  Upon explosion, an image of a ruptured balloon is presented of comparable size to the last balloon image.  After both cash outs and explosions, a rectangular yellow text box is presented on the screen for 1500 milliseconds which shows the examinee’s current Total Points in black text (Arial size 16 font).  In the case of an explosion, this total will be identical to the previous trial’s total because no points have been earned.  Note that accumulated points are only shown at the end of a given trial, and are not shown as the examinee is pumping.  After the previous trail is concluded, a blank screen with a central fixation cross is presented for 500 milliseconds, followed by presentation of the next balloon/trial.  This process continues until the 40th balloon is completed.  Afterward, a black screen is presented which thanks the participant for his/her participation, and shows a yellow text box with the Grand Total Points earned (Arial size 16 font, yellow text). The task is self-paced and takes approximately 10 minutes, depending on the examinee's behavior.
 
+
*Because of a programming error, in some cases examinees will receive points on balloons which exploded.  It is thus '''imperative''' that points not be used as a dependent variable.  Rather, adjusted pumps should be used.  
+
  
 
=== Task Structure Detail ===
 
=== Task Structure Detail ===
''' This is what we had worked on before, but could use updating. We'd like to capture a schema that can handle each of the tasks in the CNP, so please think general when editing -fws'''
 
  
* Task Structure ''(please given an overview of the task procedures here [i.e., overall design, block, trial, and within-trial event structure and timing])''
+
* Task Structure
 
** The BART has a series of instructional screens at the outset, followed by the experimental session comprised of 40 balloon trials.
 
** The BART has a series of instructional screens at the outset, followed by the experimental session comprised of 40 balloon trials.
 
*** Six instructional screens.  Screens are advanced with a right mouse click from the examiner.   
 
*** Six instructional screens.  Screens are advanced with a right mouse click from the examiner.   
Line 67: Line 63:
 
***functional modality: Manual button press.
 
***functional modality: Manual button press.
 
**response options ''(e.g.,  yes/no, go/no-go, forced choice, multiple choice [specify n of options], free response)'': yes/no, pump or cashout.
 
**response options ''(e.g.,  yes/no, go/no-go, forced choice, multiple choice [specify n of options], free response)'': yes/no, pump or cashout.
**response collection ''(e.g., examiner notes, keyboard, keypad, mouse, voice key, button press)'': Button press and recording of responses in Eprime 2.0.  
+
**response collection ''(e.g., examiner notes, keyboard, keypad, mouse, voice key, button press)'': Button press and recording of responses in Eprime 2.0.
  
 
=== Task Schematic ===
 
=== Task Schematic ===
Line 73: Line 69:
 
Schematic of the Balloon Analogue Risk Task
 
Schematic of the Balloon Analogue Risk Task
  
Total Points: XX
+
[[File:blue_001.JPG]]  [[File:blue_002.JPG]]  [[File:blue_003.JPG]]  (cash out)  Total Points: XX
 
+
    Total Points: XX
+
 
+
  
 +
[[File:red_001.JPG]]  [[File:red_002.JPG]]  [[File:red_exp_003.JPG]]  (explosion) Total Points: XX
  
 
=== Task Parameters Table ===
 
=== Task Parameters Table ===
  
[[File:TaskParamTable.png]]
+
[[File:BARTtaskparameters.png‎]]
  
 
=== Stimuli ===
 
=== Stimuli ===
Line 91: Line 85:
 
The primary dependent variable is the mean number of pumps on trials in which the balloon did not explode; these have been termed '''adjusted pumps'''.  Adjusted pumps are preferred to absolute pumps because explosions artificially restrict the range of pumping behavior (for evidence of the bias associated with absolute pumps see Pleskac et al. 2008).  
 
The primary dependent variable is the mean number of pumps on trials in which the balloon did not explode; these have been termed '''adjusted pumps'''.  Adjusted pumps are preferred to absolute pumps because explosions artificially restrict the range of pumping behavior (for evidence of the bias associated with absolute pumps see Pleskac et al. 2008).  
  
Because the red and blue balloons differ considerably in their probability of explosion, it may also be useful to analyze the mean adjusted pumps on the red and blue balloons separately.  In addition, because participants will likely adapt to the task over time, adjusted pumps for each balloon color on each quartile of trials (1-10, 11-20, 21-30, 31-40) can be analyzed to determine how performance changes over time. Note here that mean adjusted pumps for each quartile likely vary in terms of the number of trials averaged (due to explosions and the fact that balloon color is randomized across the task).  Other variables of interest may include the number of adjusted pumps on red and blue balloons which immediately follow an explosion, and the number of explosions for each balloon color.
+
Because the red and blue balloons differ considerably in their probability of explosion, it may also be useful to analyze the mean adjusted pumps on the red and blue balloons separately.  In addition, because participants will likely adapt to the task over time, adjusted pumps for each balloon color on each quartile of trials (1-10, 11-20, 21-30, 31-40) can be analyzed to determine how performance changes over time. Note here that mean adjusted pumps for each quartile likely vary in terms of the number of trials averaged (due to explosions and the fact that balloon color is randomized across the task).  Other variables of interest may include the number of adjusted pumps on red and blue balloons which immediately follow an explosion, and the number of explosions for each balloon color.   Lastly, because variability in pumping behavior has been shown to be important in animal models (Jentsch et al., 2010), the coefficient of variation of adjusted pumps can be examined across balloons, and in the red and blue balloons separately (coefficient of variation = standard deviation of adjusted pumps divided by the mean adjusted pumps).
  
  
Other dependent variables that may be of interest include
+
====Table of all available variables====
 +
[[File:BARTvariables2.PNG]]
  
Additional summary measures can be used to screen outliers (see below).
+
=== Cleaning Rules ===
  
Table of all available variables.
+
In checking the data, it is first important to determine if the task was completed.  This can be done by checking the BART_TRIALCOMP variable which indicates how many trials were completed.  It should be 40 trials for each participant; if not, exclude the subject.  A second variable to check is the BART_CASHOUTWOPUMP variable, which indicates how many times the participant cashed out of a trial without pumping at all.  While this may happen on occasion as an accident (e.g., when the participant is beginning the task and is getting used to the buttons used), we recommend excluding subjects who did this more than 2 times on a given administration.  This will exclude participants who may have cashed out immediately as a way to complete the task faster.  Lastly, the distribution of explosions and mean pumps can be checked across participants (all data must be within the range of possibility; see Variable Table for possible ranges), and participants with very extreme behavior (e.g., > 3 standard deviations above or below the mean) can be considered for exclusion.
  
[[File:SST_Variables_Table.png]]
+
=== Code/Algorithms ===
  
=== Cleaning Rules ===
+
Two scoring procedures are provided in the following text.  The first is a relatively inefficient method which derives variables from eprime files (specifically, E-Merge files), and then imports this data into SPSS to run two scripts for calculation of the final variables.  Using this method requires that you have eprime 2.0 and SPSS installed on your computer.  The second method is a more streamlined approach which derives the final variables from the individual eprime text files.  This latter method is used by the CNP biostatistics core.
If any of the derived variables (those listed in variables Table above) are missing, for either one or both testing blocks, that participants should be flagged for exclusion.  
+
  
There are several decisions to make when estimating SSRT from more than one block of Stop-signal task performance data, including whether to average across all available sessions or to use the last session run (based on the assumption that participants are closest to their 50% inhibition point at the end of a session); whether to use all trials of each session or the last half only (again based on the assumption that participants stabilize inhibitory performance near the end of a session); and whether to use data from all participants that completed the task regardless of performance, or to use either conservative or lenient criteria to exclude outliers, so as to avoid violating assumptions underlying the race-model of stopping. These questions have been systematically assessed in an independent dataset, which was randomly split into halves in order to evaluate reliability and repeatability of SSRT estimates derived following multiple approaches to data cleaning (Congdon et al., in preparation). Measures of reliability, including intraclass correlation coeffcients (ICC) and within-subject variability, and the resulting sample size, were used as indicators to evaluate the different strategies to data cleaning.
+
E-prime to SPSS scoring method:
  
Our results suggest that an approach that uses the average of all available Stop-signal blocks, all trials of each block, and excludes outliers based on predetermined lenient criteria (defined below) yields reliable SSRT estimates and low within-subject variability, while not excluding too many participants from the total dataset. Specifically, this approach resulted in an ICC value of 0.79 and a within-subject variability estimate of 25.42 ms, while only excluding 7 (out of 184) participants. Critically, this approach also retains a broad distribution of SSRT values.  
+
1) Open up e-prime studio, go to Tools, and click E-Merge.  Find the individual BART files you want to merge together in the left pane of the screen (displayed in the main screen), hold down Control and highlight them all. Then hit the Merge tab. Save the new merge.  For some reason when you go to open that new merge file it may be empty, so go to open file and select it again to open it up.
  
Based on these analyses, [[the following cleaning rules are suggested]]:
+
2) In the merge file go to Tools and click Batch Analysis.  You can then select more than one of the pre-made scripts for scoring.  At the Batch window, hit Add Files, then find the Overall analyses by row script, and hit open.  Then find the Number of trials cash out with no pumps and the Mean Median SD RT data and add them.  Once they’re all there, hit the Excel tab and it will send all the results to an excel spreadsheet, with each one of the scripts represented on a different tab.  For some reason the Overall analyses by row page is called Presses by color each subject in excel, even though all the required data is there.
* Use all trials from each testing block
+
* Average across all available testing blocks for final summary scores
+
* Exclude outliers that meet the following lenient criteria:
+
** Percent inhibition on Stop trials less than 25% or greater than 75%
+
** Percent correct responding on Go trials less than 60%
+
** Percent incorrect Go trials greater than 10%
+
** SSRT estimate that is negative or less than 50 ms
+
  
=== Code/Algorithms ===
+
3) Delete the information at the top of the excel sheet so that you can import the data into SPSS.  When you go to open the excel sheet in SPSS, you can select which excel tab you want displayed.  You probably just want to open the Presses by color each subject (overall analyses) tab, which will provide you with the primary dependent variables (other variables, such as reaction time and the number of times a participant cashes out without pumping, are already available in the appropriate excel tab).
  
Scoring of behavioral data proceeded as follows.  
+
4) Once the overall analyses are in SPSS, open up the syntax called BART create additional variables for calculations.  This will make the additional variables you need to get the primary variables later.  After you run this syntax, make sure to DEFINE -9998 AS MISSING FOR EACH VARIABLE IN THE ENTIRE SPSS DATASET.  IF YOU DON’T DO THIS, ALL THE SUBSEQUENT CALUCATIONS WILL BE TOTALLY WRONG.  
  
The mean, median and standard deviation of reaction time on Go trials were calculated only for Go trials in which participants correctly responded. Stop successful trials included only Stop trials on which participants successfully inhibited a response, and Stop unsuccessful trials included only Stop trials on which participants responded. Average stop-signal delay (SSD) was calculated from SSD values across both ladders. SSRT was estimated using the quantile method, which does not require an assumption of 50% inhibition (Band et al., 2003). Briefly, to calculate SSRT following the quantile method, all correct RTs from Go trials were arranged in ascending order. The proportion of failed inhibition, which is the proportion of Stop trials in which the participants responded, was calculated across both ladders. The quantileRT was determined by finding the RT corresponding to the proportion of failed inhibition. The average stop-signal delay (across both ladders) was then subtracted from the quantileRT in order to calculate SSRT (Band et al., 2003).  
+
5) After you’ve run the above syntax, open up the BART calculate primary variables only after missing variables have been defined syntax, and run it. This will create pretty much all the variables you need.
  
Scores are calculated from each block separately and then averaged to provide summary scores for the overall session. It is recommended that one use the final measures based on the overall session, as they provide more stable estimates of SSRT (Band et al., 2003; Congdon et al., in preparation).
+
Here are the eprime scripts mentioned above:
  
------
+
Overall analyses by row.anl
  
Make 2 Filters: Procedure[Block] and Running[Block] and Procedure[Trial]
+
Presses by color each subject
 +
{Begin Comments
  
First filter to only include trials where Procedure[Block] = “StopProc” (these are the real trials)
+
}
 +
{Begin Filters
 +
}
 +
{Begin Rows
 +
Subject 1
 +
}
 +
{Begin Cols
 +
Trial 1
 +
}
 +
{Begin Data
 +
Trial 1
 +
WhichBalloon 4
 +
ExplodeAtt 0
 +
}
 +
{Begin Options
 +
0
 +
1
 +
0
 +
1
 +
2
 +
1
 +
1
 +
1
 +
1
 +
0
 +
200
 +
1
 +
Trial:CountNum, WhichBalloon:Mean, ExplodeAtt:Total by Subject and Trial
 +
1
 +
Trial:CountNum, WhichBalloon:Mean, ExplodeAtt:Total
 +
}
  
Analyze the remaining trials in 2 different sets:  Those with Running[Block] = “Block1” and those with Running[Block] = “Block2”
+
Mean Median SD RT data.anl
  
For each of those two sets (Block1 and Block2) do the following steps:
+
Mean Median SD RT data
 +
{Begin Comments
  
{
+
}
 +
{Begin Filters
 +
}
 +
{Begin Rows
 +
Subject 1
 +
}
 +
{Begin Cols
 +
}
 +
{Begin Data
 +
Stimulus.RT 4
 +
Stimulus.RT 12
 +
Stimulus.RT 8
 +
}
 +
{Begin Options
 +
0
 +
1
 +
0
 +
1
 +
2
 +
1
 +
1
 +
1
 +
1
 +
0
 +
300
 +
1
 +
Stimulus.RT:Mean, Stimulus.RT:Median, Stimulus.RT:StdDevP by Subject
 +
1
 +
Stimulus.RT:Mean, Stimulus.RT:Median, Stimulus.RT:StdDevP
 +
}
  
* '''Block1_Direction_Errors''' = Number of trials where (Procedure[Trial] = "StGTrial" AND Go.RT> 0 AND Go.ACC= 0) OR (Procedure[Trial] = "StGTrial" AND Go.RT = 0 AND Blank.Resp != CorrectAnswer)
+
Number of trials cash out with no pumps.anl
* '''Block1_Percent_Go_Response''' = [Number of trials where Procedure[Trial] = "StGTrial" AND (Go.ACC=1 OR Blank.ACC=1)] / Number of trials where Procedure[Trial] = "StGTrial"
+
trials cash out no pumps
 +
{Begin Comments
  
For the next calculation, you need the following values:
+
}
 +
{Begin Filters
 +
ExplodeAtt
 +
0
  
* Go.RT for all trials where (Procedure[Trial] = "StGTrial") AND (GoAcc = 1 AND Go.RT > 0)
+
PointsBalloon
* Blank.RT + 1000 for all trials where (Procedure[Trial] = "StGTrial") AND (GoACC = 0 AND Go.RT = 0 AND Blank.ACC = 1)
+
0.00
  
* '''Block1_Mean_RT''' = Mean of all values that you just got from Go.RT and Blank.RT + 1000
+
}
* '''Block1_Median_RT''' = Median of all values that you just got from Go.RT and Blank.RT + 1000
+
{Begin Rows
* '''Block1_StDev_RT''' = Standard deviation of all values that you just got from Go.RT and Blank.RT + 1000
+
Subject 1
 +
}
 +
{Begin Cols
 +
}
 +
{Begin Data
 +
Trial 1
 +
}
 +
{Begin Options
 +
0
 +
1
 +
0
 +
1
 +
2
 +
1
 +
1
 +
1
 +
1
 +
0
 +
30
 +
1
 +
Trial:CountNum by Subject
 +
1
 +
Trial:CountNum
 +
}
  
For the next step, you need to get have these numbers:
 
  
* GoDur - 50 for all trials where Procedure[Trial] = "StITrial" AND (Go1s.RT=0 and Inhs.RT=0 and Go2S.RT=0 and Blanks.RT=0)
+
These are the SPSS scripts:
* GoDur + 50 for all trials where Procedure[Trial] = "StITrial" AND (Go1s.RT!=0 or Inhs.RT!=0 or Go2S.RT!=0 or Blanks.RT!=0)
+
* GoDur2 - 50 for all trials where Procedure[Trial] = "StITrial2" AND (Go1s2.RT=0 and Inhs2.RT=0 and Go2s2.RT=0 and Blanks.RT=0)
+
* GoDur2 + 50 for all trials where Procedure[Trial] = "StITrial2" AND (Go1s2.RT!=0 or Inhs2.RT!=0 or Go2s2.RT!=0 or Blanks.RT!=0)
+
  
* '''Block1_Ladder1Mean''' = Mean of all GoDur values from the previous statements (there should be 16 total)
 
* '''Block1_Ladder2Mean''' = Mean of all GoDur2 values from the previous statements (there should be 16 total)
 
* '''Block1_SSD50''' = Mean of ALL the values you just got from the previous statements (there should be 32 total values that you're taking the mean of)
 
  
 +
BART create additional variables for calculations.
 +
*This subtracts one from all presses per trial (1-40) to account for the fact that one button press was either a cash-out or an explosion.
  
* '''Block1_PctInhib_Ladder1''' = [Number of Trials where Procedure[Trial] = "StITrial" AND (Go1s.RT=0 and Inhs.RT=0 and Go2s.RT=0 and Blanks.RT=0)] / (Number of Trials where Procedure[Trial] = "StITrial")
+
COMPUTE CountNumTrial1=CountNumTrial1 - 1.
* '''Block1_PctInhib_Ladder2''' = [Number of Trials where Procedure[Trial] = "StITrial2" AND (Go1s2.RT=0 and Inhs2.RT=0 and Go2s2.RT=0 and Blanks.RT=0)] / (Number of Trials where Procedure[Trial] = "StITrial2)
+
EXECUTE.
* '''Block1_Percent_Inhib''' = Mean of Block1_PctInhib_Ladder1 and Block1_PctInhib_Ladder2
+
  
* '''Block1_Quantile_Value''' = 1 - Block1_Percent_Inhib
+
COMPUTE CountNumTrial2=CountNumTrial2 - 1.
 +
EXECUTE.
  
* '''Block1_SSRT''' = Block1_Median_RT - Block1_SSD50
+
COMPUTE CountNumTrial3=CountNumTrial3 - 1.
 +
EXECUTE.
  
* CorrectGoRT on StopProc trials: As a reminder, these are Go.RT for all trials where (Procedure[Trial] = "StGTrial") AND (GoAcc = 1 AND Go.RT > 0), and Blank.RT + 1000 for all trials where (Procedure[Trial] = "StGTrial") AND (GoACC = 1 AND Go.RT = 0). Use these CorrectGoRT on StopProc trials to calculate Block1_Quant_RT:
+
COMPUTE CountNumTrial4=CountNumTrial4 - 1.
 +
EXECUTE.
  
* '''Block1_Quant_RT''' = Quantile calculation of all the values from Go.RT and Blank.RT + 1000 (the values used in the calculations where you calculated Block1_Mean_RT, etc), taken using Quantile_Value.  So if Quantile_Value = .85, you'd take the .85-quantile of the distribution of values from Go.RT and (Blank.RT + 1000)
+
COMPUTE CountNumTrial5=CountNumTrial5 - 1.
 +
EXECUTE.
  
* '''Block1_SSRT_Quant''' = Block1_Quant_RT - Block1_SSD50
+
COMPUTE CountNumTrial6=CountNumTrial6 - 1.
 +
EXECUTE.
  
}
+
COMPUTE CountNumTrial7=CountNumTrial7 - 1.
 +
EXECUTE.
  
Then, do all those same calculations that were in the braces, but using the data points that were from Running[Block] = “Block2” (and save the variables as Block2_whatever, rather than Block1)
+
COMPUTE CountNumTrial8=CountNumTrial8 - 1.
 +
EXECUTE.
  
Then average the above values together to get a measure of overall task performance:
+
COMPUTE CountNumTrial9=CountNumTrial9 - 1.
 +
EXECUTE.
  
All the values that we need outputted are in bold. See also Variable List.  
+
COMPUTE CountNumTrial10=CountNumTrial10 - 1.
 +
EXECUTE.
  
-------
+
COMPUTE CountNumTrial11=CountNumTrial11 - 1.
 +
EXECUTE.
  
The following text instructions can be adapted for any program. These instructions are currently implemented in Stone’s scoring scripts for the scoring of LA2K variables. These steps have been implemented in separate Matlab scripts by Eliza and have been used to verify Stone’s scoring scripts. These steps have also been used to manually score the data and verify Stone’s scoring scripts multiple times (finalized April 2010).  
+
COMPUTE CountNumTrial12=CountNumTrial12 - 1.
 +
EXECUTE.
  
History of Checking Scoring:
+
COMPUTE CountNumTrial13=CountNumTrial13 - 1.
* October 2009: Eliza confirmed Stone’s scripts by manually scoring data (completed 10/19/2009)
+
EXECUTE.
  
* January 2010: Another group (Nicole McLaughlin at Butler Hospital) that was sent the scoring scripts identified a scoring error.
+
COMPUTE CountNumTrial14=CountNumTrial14 - 1.
** Eliza and Stone worked together to resolve the problem. Stone fixed that error in the script on 1/29/2010.  
+
EXECUTE.
** Eliza and Stone clarified an issue about the scoring of Go trial (direction) errors and matched scores between UCLA and Butler (March 2010).
+
** Final questions about differences in quantile calculation were resolved in April. Eliza and Stone calculated all scores on the same data and met to confirm scoring scripts. Everything agreed and finalized 4/21/10.  
+
  
Note that one thing that may differ in the scoring script between programs is quantile calculation. For example, the quantile function in Matlab differs slightly from the percentile function in Excel. Stone’s scoring method may differ by a tiny fraction from the Matlab quantile function; however, this difference is tiny, and as long as the same scoring script is applied to all subjects (as it is in LA2K), then it does not matter. All agreed April 2010 on this issue.
+
COMPUTE CountNumTrial15=CountNumTrial15 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial16=CountNumTrial16 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial17=CountNumTrial17 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial18=CountNumTrial18 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial19=CountNumTrial19 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial20=CountNumTrial20 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial21=CountNumTrial21 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial22=CountNumTrial22 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial23=CountNumTrial23 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial24=CountNumTrial24 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial25=CountNumTrial25 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial26=CountNumTrial26 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial27=CountNumTrial27 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial28=CountNumTrial28 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial29=CountNumTrial29 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial30=CountNumTrial30 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial31=CountNumTrial31 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial32=CountNumTrial32 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial33=CountNumTrial33 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial34=CountNumTrial34 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial35=CountNumTrial35 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial36=CountNumTrial36 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial37=CountNumTrial37 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial38=CountNumTrial38 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial39=CountNumTrial39 - 1.
 +
EXECUTE.
 +
 
 +
COMPUTE CountNumTrial40=CountNumTrial40 - 1.
 +
EXECUTE.
 +
 
 +
 
 +
 
 +
*This changes the number of pumps for each trial (1-40) to missing (-9998) if there was an explosion on that trial.
 +
 
 +
DO IF (TotalExplodeAtt1 = 1).
 +
RECODE CountNumTrial1 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt2 = 1).
 +
RECODE CountNumTrial2 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt3 = 1).
 +
RECODE CountNumTrial3 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt4 = 1).
 +
RECODE CountNumTrial4 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt5 = 1).
 +
RECODE CountNumTrial5 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
DO IF (TotalExplodeAtt6 = 1).
 +
RECODE CountNumTrial6 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt7 = 1).
 +
RECODE CountNumTrial7 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt8 = 1).
 +
RECODE CountNumTrial8 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt9 = 1).
 +
RECODE CountNumTrial9 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt10 = 1).
 +
RECODE CountNumTrial10 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt11 = 1).
 +
RECODE CountNumTrial11 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
DO IF (TotalExplodeAtt12 = 1).
 +
RECODE CountNumTrial12 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt13 = 1).
 +
RECODE CountNumTrial13 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt14 = 1).
 +
RECODE CountNumTrial14 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt15 = 1).
 +
RECODE CountNumTrial15 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt16 = 1).
 +
RECODE CountNumTrial16 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt17 = 1).
 +
RECODE CountNumTrial17 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt18 = 1).
 +
RECODE CountNumTrial18 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt19 = 1).
 +
RECODE CountNumTrial19 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt20 = 1).
 +
RECODE CountNumTrial20 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt21 = 1).
 +
RECODE CountNumTrial21 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt22 = 1).
 +
RECODE CountNumTrial22 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt23 = 1).
 +
RECODE CountNumTrial23 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt24 = 1).
 +
RECODE CountNumTrial24 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt25 = 1).
 +
RECODE CountNumTrial25 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt26 = 1).
 +
RECODE CountNumTrial26 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt27 = 1).
 +
RECODE CountNumTrial27 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt28 = 1).
 +
RECODE CountNumTrial28 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt29 = 1).
 +
RECODE CountNumTrial29 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt30 = 1).
 +
RECODE CountNumTrial30 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt31 = 1).
 +
RECODE CountNumTrial31 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt32 = 1).
 +
RECODE CountNumTrial32 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt33 = 1).
 +
RECODE CountNumTrial33 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt34 = 1).
 +
RECODE CountNumTrial34 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt35 = 1).
 +
RECODE CountNumTrial35 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt36 = 1).
 +
RECODE CountNumTrial36 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt37 = 1).
 +
RECODE CountNumTrial37 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt38 = 1).
 +
RECODE CountNumTrial38 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt39 = 1).
 +
RECODE CountNumTrial39 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF (TotalExplodeAtt40 = 1).
 +
RECODE CountNumTrial40 (ELSE=-9998).
 +
END IF.
 +
EXECUTE.
 +
 
 +
 
 +
*This creates variables for each ballloon (1-40) for each color.  This is unfortunately needed so that a variable is created for every possible color-trial scenario to calculate the pumps by color and by quaritle later.  
 +
 
 +
DO IF  (MeanWhichBalloon1 = 1).
 +
RECODE CountNumTrial1 (ELSE=Copy) INTO Blue1.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon2 = 1).
 +
RECODE CountNumTrial2 (ELSE=Copy) INTO Blue2.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon3 = 1).
 +
RECODE CountNumTrial3 (ELSE=Copy) INTO Blue3.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon4 = 1).
 +
RECODE CountNumTrial4 (ELSE=Copy) INTO Blue4.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon5 = 1).
 +
RECODE CountNumTrial5 (ELSE=Copy) INTO Blue5.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon6 = 1).
 +
RECODE CountNumTrial6 (ELSE=Copy) INTO Blue6.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon7 = 1).
 +
RECODE CountNumTrial7 (ELSE=Copy) INTO Blue7.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon8 = 1).
 +
RECODE CountNumTrial8 (ELSE=Copy) INTO Blue8.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon9 = 1).
 +
RECODE CountNumTrial9 (ELSE=Copy) INTO Blue9.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon10 = 1).
 +
RECODE CountNumTrial10 (ELSE=Copy) INTO Blue10.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon11 = 1).
 +
RECODE CountNumTrial11 (ELSE=Copy) INTO Blue11.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon12 = 1).
 +
RECODE CountNumTrial12 (ELSE=Copy) INTO Blue12.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon13 = 1).
 +
RECODE CountNumTrial13 (ELSE=Copy) INTO Blue13.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon14 = 1).
 +
RECODE CountNumTrial14 (ELSE=Copy) INTO Blue14.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon15 = 1).
 +
RECODE CountNumTrial15 (ELSE=Copy) INTO Blue15.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon16 = 1).
 +
RECODE CountNumTrial16 (ELSE=Copy) INTO Blue16.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon17 = 1).
 +
RECODE CountNumTrial17 (ELSE=Copy) INTO Blue17.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon18 = 1).
 +
RECODE CountNumTrial18 (ELSE=Copy) INTO Blue18.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon19 = 1).
 +
RECODE CountNumTrial19 (ELSE=Copy) INTO Blue19.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon20 = 1).
 +
RECODE CountNumTrial20 (ELSE=Copy) INTO Blue20.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon21 = 1).
 +
RECODE CountNumTrial21 (ELSE=Copy) INTO Blue21.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon22 = 1).
 +
RECODE CountNumTrial22 (ELSE=Copy) INTO Blue22.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon23 = 1).
 +
RECODE CountNumTrial23 (ELSE=Copy) INTO Blue23.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon24 = 1).
 +
RECODE CountNumTrial24 (ELSE=Copy) INTO Blue24.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon25 = 1).
 +
RECODE CountNumTrial25 (ELSE=Copy) INTO Blue25.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon26 = 1).
 +
RECODE CountNumTrial26 (ELSE=Copy) INTO Blue26.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon27 = 1).
 +
RECODE CountNumTrial27 (ELSE=Copy) INTO Blue27.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon28 = 1).
 +
RECODE CountNumTrial28 (ELSE=Copy) INTO Blue28.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon29 = 1).
 +
RECODE CountNumTrial29 (ELSE=Copy) INTO Blue29.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon30 = 1).
 +
RECODE CountNumTrial30 (ELSE=Copy) INTO Blue30.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon31 = 1).
 +
RECODE CountNumTrial31 (ELSE=Copy) INTO Blue31.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon32 = 1).
 +
RECODE CountNumTrial32 (ELSE=Copy) INTO Blue32.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon33 = 1).
 +
RECODE CountNumTrial33 (ELSE=Copy) INTO Blue33.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon34 = 1).
 +
RECODE CountNumTrial34 (ELSE=Copy) INTO Blue34.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon35 = 1).
 +
RECODE CountNumTrial35 (ELSE=Copy) INTO Blue35.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon36 = 1).
 +
RECODE CountNumTrial36 (ELSE=Copy) INTO Blue36.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon37 = 1).
 +
RECODE CountNumTrial37 (ELSE=Copy) INTO Blue37.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon38 = 1).
 +
RECODE CountNumTrial38 (ELSE=Copy) INTO Blue38.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon39 = 1).
 +
RECODE CountNumTrial39 (ELSE=Copy) INTO Blue39.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon40 = 1).
 +
RECODE CountNumTrial40 (ELSE=Copy) INTO Blue40.
 +
END IF.
 +
EXECUTE.
 +
 
 +
 
 +
*Similarly, this creates new variables for all of the red ballloons.
 +
 
 +
DO IF  (MeanWhichBalloon1 = 2).
 +
RECODE CountNumTrial1 (ELSE=Copy) INTO Red1.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon2 = 2).
 +
RECODE CountNumTrial2 (ELSE=Copy) INTO Red2.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon3 = 2).
 +
RECODE CountNumTrial3 (ELSE=Copy) INTO Red3.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon4 = 2).
 +
RECODE CountNumTrial4 (ELSE=Copy) INTO Red4.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon5 = 2).
 +
RECODE CountNumTrial5 (ELSE=Copy) INTO Red5.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon6 = 2).
 +
RECODE CountNumTrial6 (ELSE=Copy) INTO Red6.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon7 = 2).
 +
RECODE CountNumTrial7 (ELSE=Copy) INTO Red7.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon8 = 2).
 +
RECODE CountNumTrial8 (ELSE=Copy) INTO Red8.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon9 = 2).
 +
RECODE CountNumTrial9 (ELSE=Copy) INTO Red9.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon10 = 2).
 +
RECODE CountNumTrial10 (ELSE=Copy) INTO Red10.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon11 = 2).
 +
RECODE CountNumTrial11 (ELSE=Copy) INTO Red11.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon12 = 2).
 +
RECODE CountNumTrial12 (ELSE=Copy) INTO Red12.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon13 = 2).
 +
RECODE CountNumTrial13 (ELSE=Copy) INTO Red13.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon14 = 2).
 +
RECODE CountNumTrial14 (ELSE=Copy) INTO Red14.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon15 = 2).
 +
RECODE CountNumTrial15 (ELSE=Copy) INTO Red15.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon16 = 2).
 +
RECODE CountNumTrial16 (ELSE=Copy) INTO Red16.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon17 = 2).
 +
RECODE CountNumTrial17 (ELSE=Copy) INTO Red17.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon18 = 2).
 +
RECODE CountNumTrial18 (ELSE=Copy) INTO Red18.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon19 = 2).
 +
RECODE CountNumTrial19 (ELSE=Copy) INTO Red19.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon20 = 2).
 +
RECODE CountNumTrial20 (ELSE=Copy) INTO Red20.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon21 = 2).
 +
RECODE CountNumTrial21 (ELSE=Copy) INTO Red21.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon22 = 2).
 +
RECODE CountNumTrial22 (ELSE=Copy) INTO Red22.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon23 = 2).
 +
RECODE CountNumTrial23 (ELSE=Copy) INTO Red23.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon24 = 2).
 +
RECODE CountNumTrial24 (ELSE=Copy) INTO Red24.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon25 = 2).
 +
RECODE CountNumTrial25 (ELSE=Copy) INTO Red25.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon26 = 2).
 +
RECODE CountNumTrial26 (ELSE=Copy) INTO Red26.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon27 = 2).
 +
RECODE CountNumTrial27 (ELSE=Copy) INTO Red27.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon28 = 2).
 +
RECODE CountNumTrial28 (ELSE=Copy) INTO Red28.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon29 = 2).
 +
RECODE CountNumTrial29 (ELSE=Copy) INTO Red29.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon30 = 2).
 +
RECODE CountNumTrial30 (ELSE=Copy) INTO Red30.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon31 = 2).
 +
RECODE CountNumTrial31 (ELSE=Copy) INTO Red31.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon32 = 2).
 +
RECODE CountNumTrial32 (ELSE=Copy) INTO Red32.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon33 = 2).
 +
RECODE CountNumTrial33 (ELSE=Copy) INTO Red33.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon34 = 2).
 +
RECODE CountNumTrial34 (ELSE=Copy) INTO Red34.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon35 = 2).
 +
RECODE CountNumTrial35 (ELSE=Copy) INTO Red35.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon36 = 2).
 +
RECODE CountNumTrial36 (ELSE=Copy) INTO Red36.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon37 = 2).
 +
RECODE CountNumTrial37 (ELSE=Copy) INTO Red37.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon38 = 2).
 +
RECODE CountNumTrial38 (ELSE=Copy) INTO Red38.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon39 = 2).
 +
RECODE CountNumTrial39 (ELSE=Copy) INTO Red39.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (MeanWhichBalloon40 = 2).
 +
RECODE CountNumTrial40 (ELSE=Copy) INTO Red40.
 +
END IF.
 +
EXECUTE.
 +
 
 +
*This makes a variable for the number of pumps for each post-explosion balloon. It is first done for the blue baloons, then for the red.
 +
 
 +
DO IF  (TotalExplodeAtt1 = 1 & MeanWhichBalloon2 = 1).
 +
RECODE CountNumTrial2 (ELSE=Copy) INTO afterExpl_2_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt2 = 1 & MeanWhichBalloon3 = 1).
 +
RECODE CountNumTrial3 (ELSE=Copy) INTO afterExpl_3_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt3 = 1 & MeanWhichBalloon4 = 1).
 +
RECODE CountNumTrial4 (ELSE=Copy) INTO afterExpl_4_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt4 = 1 & MeanWhichBalloon5 = 1).
 +
RECODE CountNumTrial5 (ELSE=Copy) INTO afterExpl_5_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt5 = 1 & MeanWhichBalloon6 = 1).
 +
RECODE CountNumTrial6 (ELSE=Copy) INTO afterExpl_6_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt6 = 1 & MeanWhichBalloon7 = 1).
 +
RECODE CountNumTrial7 (ELSE=Copy) INTO afterExpl_7_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt7 = 1 & MeanWhichBalloon8 = 1).
 +
RECODE CountNumTrial8 (ELSE=Copy) INTO afterExpl_8_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt8 = 1 & MeanWhichBalloon9 = 1).
 +
RECODE CountNumTrial9 (ELSE=Copy) INTO afterExpl_9_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt9 = 1 & MeanWhichBalloon10 = 1).
 +
RECODE CountNumTrial10 (ELSE=Copy) INTO afterExpl_10_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt10 = 1 & MeanWhichBalloon11 = 1).
 +
RECODE CountNumTrial11 (ELSE=Copy) INTO afterExpl_11_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt11 = 1 & MeanWhichBalloon12 = 1).
 +
RECODE CountNumTrial12 (ELSE=Copy) INTO afterExpl_12_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt12 = 1 & MeanWhichBalloon13 = 1).
 +
RECODE CountNumTrial13 (ELSE=Copy) INTO afterExpl_13_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt13 = 1 & MeanWhichBalloon14 = 1).
 +
RECODE CountNumTrial14 (ELSE=Copy) INTO afterExpl_14_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt14 = 1 & MeanWhichBalloon15 = 1).
 +
RECODE CountNumTrial15 (ELSE=Copy) INTO afterExpl_15_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt15 = 1 & MeanWhichBalloon16 = 1).
 +
RECODE CountNumTrial16 (ELSE=Copy) INTO afterExpl_16_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt16 = 1 & MeanWhichBalloon17 = 1).
 +
RECODE CountNumTrial17 (ELSE=Copy) INTO afterExpl_17_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt17 = 1 & MeanWhichBalloon18 = 1).
 +
RECODE CountNumTrial18 (ELSE=Copy) INTO afterExpl_18_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt18 = 1 & MeanWhichBalloon19 = 1).
 +
RECODE CountNumTrial19 (ELSE=Copy) INTO afterExpl_19_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt19 = 1 & MeanWhichBalloon20 = 1).
 +
RECODE CountNumTrial20 (ELSE=Copy) INTO afterExpl_20_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt20 = 1 & MeanWhichBalloon21 = 1).
 +
RECODE CountNumTrial21 (ELSE=Copy) INTO afterExpl_21_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt21 = 1 & MeanWhichBalloon22 = 1).
 +
RECODE CountNumTrial22 (ELSE=Copy) INTO afterExpl_22_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt22 = 1 & MeanWhichBalloon23 = 1).
 +
RECODE CountNumTrial23 (ELSE=Copy) INTO afterExpl_23_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt23 = 1 & MeanWhichBalloon24 = 1).
 +
RECODE CountNumTrial24 (ELSE=Copy) INTO afterExpl_24_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt24 = 1 & MeanWhichBalloon25 = 1).
 +
RECODE CountNumTrial25 (ELSE=Copy) INTO afterExpl_25_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt25 = 1 & MeanWhichBalloon26 = 1).
 +
RECODE CountNumTrial26 (ELSE=Copy) INTO afterExpl_26_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt26 = 1 & MeanWhichBalloon27 = 1).
 +
RECODE CountNumTrial27 (ELSE=Copy) INTO afterExpl_27_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt27 = 1 & MeanWhichBalloon28 = 1).
 +
RECODE CountNumTrial28 (ELSE=Copy) INTO afterExpl_28_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt28 = 1 & MeanWhichBalloon29 = 1).
 +
RECODE CountNumTrial29 (ELSE=Copy) INTO afterExpl_29_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt29 = 1 & MeanWhichBalloon30 = 1).
 +
RECODE CountNumTrial30 (ELSE=Copy) INTO afterExpl_30_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt30 = 1 & MeanWhichBalloon31 = 1).
 +
RECODE CountNumTrial31 (ELSE=Copy) INTO afterExpl_31_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt31 = 1 & MeanWhichBalloon32 = 1).
 +
RECODE CountNumTrial32 (ELSE=Copy) INTO afterExpl_32_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt32 = 1 & MeanWhichBalloon33 = 1).
 +
RECODE CountNumTrial33 (ELSE=Copy) INTO afterExpl_33_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt33 = 1 & MeanWhichBalloon34 = 1).
 +
RECODE CountNumTrial34 (ELSE=Copy) INTO afterExpl_34_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt34 = 1 & MeanWhichBalloon35 = 1).
 +
RECODE CountNumTrial35 (ELSE=Copy) INTO afterExpl_35_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt35 = 1 & MeanWhichBalloon36 = 1).
 +
RECODE CountNumTrial36 (ELSE=Copy) INTO afterExpl_36_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt36 = 1 & MeanWhichBalloon37 = 1).
 +
RECODE CountNumTrial37 (ELSE=Copy) INTO afterExpl_37_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt37 = 1 & MeanWhichBalloon38 = 1).
 +
RECODE CountNumTrial38 (ELSE=Copy) INTO afterExpl_38_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt38 = 1 & MeanWhichBalloon39 = 1).
 +
RECODE CountNumTrial39 (ELSE=Copy) INTO afterExpl_39_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt39 = 1 & MeanWhichBalloon40 = 1).
 +
RECODE CountNumTrial40 (ELSE=Copy) INTO afterExpl_40_Blue.
 +
END IF.
 +
EXECUTE.
 +
 
 +
*This is the post-explosion variable for red balloons.
 +
 
 +
DO IF  (TotalExplodeAtt1 = 1 & MeanWhichBalloon2 = 2).
 +
RECODE CountNumTrial2 (ELSE=Copy) INTO afterExpl_2_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt2 = 1 & MeanWhichBalloon3 = 2).
 +
RECODE CountNumTrial3 (ELSE=Copy) INTO afterExpl_3_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt3 = 1 & MeanWhichBalloon4 = 2).
 +
RECODE CountNumTrial4 (ELSE=Copy) INTO afterExpl_4_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt4 = 1 & MeanWhichBalloon5 = 2).
 +
RECODE CountNumTrial5 (ELSE=Copy) INTO afterExpl_5_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt5 = 1 & MeanWhichBalloon6 = 2).
 +
RECODE CountNumTrial6 (ELSE=Copy) INTO afterExpl_6_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt6 = 1 & MeanWhichBalloon7 = 2).
 +
RECODE CountNumTrial7 (ELSE=Copy) INTO afterExpl_7_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt7 = 1 & MeanWhichBalloon8 = 2).
 +
RECODE CountNumTrial8 (ELSE=Copy) INTO afterExpl_8_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt8 = 1 & MeanWhichBalloon9 = 2).
 +
RECODE CountNumTrial9 (ELSE=Copy) INTO afterExpl_9_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt9 = 1 & MeanWhichBalloon10 = 2).
 +
RECODE CountNumTrial10 (ELSE=Copy) INTO afterExpl_10_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt10 = 1 & MeanWhichBalloon11 = 2).
 +
RECODE CountNumTrial11 (ELSE=Copy) INTO afterExpl_11_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt11 = 1 & MeanWhichBalloon12 = 2).
 +
RECODE CountNumTrial12 (ELSE=Copy) INTO afterExpl_12_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt12 = 1 & MeanWhichBalloon13 = 2).
 +
RECODE CountNumTrial13 (ELSE=Copy) INTO afterExpl_13_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt13 = 1 & MeanWhichBalloon14 = 2).
 +
RECODE CountNumTrial14 (ELSE=Copy) INTO afterExpl_14_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt14 = 1 & MeanWhichBalloon15 = 2).
 +
RECODE CountNumTrial15 (ELSE=Copy) INTO afterExpl_15_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt15 = 1 & MeanWhichBalloon16 = 2).
 +
RECODE CountNumTrial16 (ELSE=Copy) INTO afterExpl_16_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt16 = 1 & MeanWhichBalloon17 = 2).
 +
RECODE CountNumTrial17 (ELSE=Copy) INTO afterExpl_17_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt17 = 1 & MeanWhichBalloon18 = 2).
 +
RECODE CountNumTrial18 (ELSE=Copy) INTO afterExpl_18_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt18 = 1 & MeanWhichBalloon19 = 2).
 +
RECODE CountNumTrial19 (ELSE=Copy) INTO afterExpl_19_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt19 = 1 & MeanWhichBalloon20 = 2).
 +
RECODE CountNumTrial20 (ELSE=Copy) INTO afterExpl_20_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt20 = 1 & MeanWhichBalloon21 = 2).
 +
RECODE CountNumTrial21 (ELSE=Copy) INTO afterExpl_21_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt21 = 1 & MeanWhichBalloon22 = 2).
 +
RECODE CountNumTrial22 (ELSE=Copy) INTO afterExpl_22_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt22 = 1 & MeanWhichBalloon23 = 2).
 +
RECODE CountNumTrial23 (ELSE=Copy) INTO afterExpl_23_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt23 = 1 & MeanWhichBalloon24 = 2).
 +
RECODE CountNumTrial24 (ELSE=Copy) INTO afterExpl_24_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt24 = 1 & MeanWhichBalloon25 = 2).
 +
RECODE CountNumTrial25 (ELSE=Copy) INTO afterExpl_25_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt25 = 1 & MeanWhichBalloon26 = 2).
 +
RECODE CountNumTrial26 (ELSE=Copy) INTO afterExpl_26_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt26 = 1 & MeanWhichBalloon27 = 2).
 +
RECODE CountNumTrial27 (ELSE=Copy) INTO afterExpl_27_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt27 = 1 & MeanWhichBalloon28 = 2).
 +
RECODE CountNumTrial28 (ELSE=Copy) INTO afterExpl_28_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt28 = 1 & MeanWhichBalloon29 = 2).
 +
RECODE CountNumTrial29 (ELSE=Copy) INTO afterExpl_29_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt29 = 1 & MeanWhichBalloon30 = 2).
 +
RECODE CountNumTrial30 (ELSE=Copy) INTO afterExpl_30_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt30 = 1 & MeanWhichBalloon31 = 2).
 +
RECODE CountNumTrial31 (ELSE=Copy) INTO afterExpl_31_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt31 = 1 & MeanWhichBalloon32 = 2).
 +
RECODE CountNumTrial32 (ELSE=Copy) INTO afterExpl_32_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt32 = 1 & MeanWhichBalloon33 = 2).
 +
RECODE CountNumTrial33 (ELSE=Copy) INTO afterExpl_33_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt33 = 1 & MeanWhichBalloon34 = 2).
 +
RECODE CountNumTrial34 (ELSE=Copy) INTO afterExpl_34_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt34 = 1 & MeanWhichBalloon35 = 2).
 +
RECODE CountNumTrial35 (ELSE=Copy) INTO afterExpl_35_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt35 = 1 & MeanWhichBalloon36 = 2).
 +
RECODE CountNumTrial36 (ELSE=Copy) INTO afterExpl_36_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt36 = 1 & MeanWhichBalloon37 = 2).
 +
RECODE CountNumTrial37 (ELSE=Copy) INTO afterExpl_37_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt37 = 1 & MeanWhichBalloon38 = 2).
 +
RECODE CountNumTrial38 (ELSE=Copy) INTO afterExpl_38_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt38 = 1 & MeanWhichBalloon39 = 2).
 +
RECODE CountNumTrial39 (ELSE=Copy) INTO afterExpl_39_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
DO IF  (TotalExplodeAtt39 = 1 & MeanWhichBalloon40 = 2).
 +
RECODE CountNumTrial40 (ELSE=Copy) INTO afterExpl_40_Red.
 +
END IF.
 +
EXECUTE.
 +
 
 +
BART Create Primary Variables syntax only after missing variables have been defined.
 +
 
 +
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Make sure to set -9998 as missing in SPSS for each variable in the dataset before you do the following total calculations!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
 +
 
 +
*This calculates total adjusted pumps for all trials that were not explosions (remember to define missing values beforehand for each CountNumTrial).
 +
 
 +
COMPUTE TotalAdjustedPumps=SUM (CountNumTrial1 , CountNumTrial10 , CountNumTrial11 , CountNumTrial12 , 
 +
CountNumTrial13 , CountNumTrial14 , CountNumTrial15 , CountNumTrial16 , CountNumTrial17 ,
 +
  CountNumTrial18 , CountNumTrial19 , CountNumTrial2 , CountNumTrial20 , CountNumTrial21 ,
 +
    CountNumTrial22 , CountNumTrial23 , CountNumTrial24 , CountNumTrial25 , CountNumTrial26 ,
 +
    CountNumTrial27 , CountNumTrial28 , CountNumTrial29 , CountNumTrial3 , CountNumTrial30 ,
 +
    CountNumTrial31 , CountNumTrial32 , CountNumTrial33 , CountNumTrial34 , CountNumTrial35 ,
 +
    CountNumTrial36 , CountNumTrial37 , CountNumTrial38 , CountNumTrial39 , CountNumTrial4 ,
 +
    CountNumTrial40 , CountNumTrial5 , CountNumTrial6 , CountNumTrial7 , CountNumTrial8 ,
 +
    CountNumTrial9).
 +
EXECUTE.
 +
 
 +
*This calculates mean adjusted pumps for all trials that were not explosions (remember to define missing values beforehand for each CountNumTrial).
 +
 
 +
COMPUTE MeanAdjustedPumps=Mean (CountNumTrial1 , CountNumTrial10 , CountNumTrial11 , CountNumTrial12 , 
 +
    CountNumTrial13 , CountNumTrial14 , CountNumTrial15 , CountNumTrial16 , CountNumTrial17 ,
 +
    CountNumTrial18 , CountNumTrial19 , CountNumTrial2 , CountNumTrial20 , CountNumTrial21 ,
 +
    CountNumTrial22 , CountNumTrial23 , CountNumTrial24 , CountNumTrial25 , CountNumTrial26 ,
 +
    CountNumTrial27 , CountNumTrial28 , CountNumTrial29 , CountNumTrial3 , CountNumTrial30 ,
 +
    CountNumTrial31 , CountNumTrial32 , CountNumTrial33 , CountNumTrial34 , CountNumTrial35 ,
 +
    CountNumTrial36 , CountNumTrial37 , CountNumTrial38 , CountNumTrial39 , CountNumTrial4 ,
 +
    CountNumTrial40 , CountNumTrial5 , CountNumTrial6 , CountNumTrial7 , CountNumTrial8 ,
 +
    CountNumTrial9).
 +
EXECUTE.
 +
 
 +
*This calculates the mean blue adjusted pumps.
 +
 
 +
COMPUTE MeanBlueAdjustedPumps=mean (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,
 +
    Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,
 +
    Blue25,Blue26,Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,
 +
    Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
*This calculates the mean red adjusted pumps.
 +
 
 +
COMPUTE MeanRedAdjustedPumps=mean (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,
 +
    Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,
 +
    Red25,Red26,Red27,Red28,Red29,Red30,Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,
 +
    Red39,Red40).
 +
EXECUTE.
 +
 
 +
*This calculates the total blue adjusted pumps.
 +
 
 +
COMPUTE TotalBlueAdjustedPumps=SUM (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,
 +
    Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,
 +
    Blue25,Blue26,Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,
 +
    Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
*This calculates the total red adjusted pumps.
 +
 
 +
COMPUTE TotalRedAdjustedPumps=SUM (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,
 +
    Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,
 +
    Red25,Red26,Red27,Red28,Red29,Red30,Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,
 +
    Red39,Red40).
 +
EXECUTE.
 +
 
 +
 
 +
 
 +
*This computes the mean adjusted pumps for each quartile (1-10, 11-20, 21-30, 31-40) for the blue balloons.
 +
 
 +
COMPUTE Quart1BlueAdjustedPumps=Mean (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart2BlueAdjustedPumps= Mean (Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart3BlueAdjustedPumps= Mean (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,Blue27,Blue28,Blue29,Blue30).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart4BlueAdjustedPumps= Mean (Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
*This computes the mean adjusted pumps for each quartile (1-10, 11-20, 21-30, 31-40) for the red balloons.
 +
 
 +
COMPUTE Quart1RedAdjustedPumps=Mean (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart2RedAdjustedPumps= Mean (Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart3RedAdjustedPumps= Mean (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30).
 +
EXECUTE.
 +
 
 +
COMPUTE Quart4RedAdjustedPumps= Mean (Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).
 +
EXECUTE.
 +
 
 +
 
 +
*This calculates the mean post-explosion pumps for the blue balloons.
 +
 
 +
COMPUTE MeanBlueAfterExpl=mean (afterExpl_2_Blue,afterExpl_3_Blue,afterExpl_4_Blue,afterExpl_5_Blue,
 +
    afterExpl_6_Blue,afterExpl_7_Blue,afterExpl_8_Blue,afterExpl_9_Blue,afterExpl_10_Blue,
 +
    afterExpl_11_Blue,afterExpl_12_Blue,afterExpl_13_Blue,afterExpl_14_Blue,afterExpl_15_Blue,
 +
    afterExpl_16_Blue,afterExpl_17_Blue,afterExpl_18_Blue,afterExpl_19_Blue,afterExpl_20_Blue, afterExpl_21_Blue,
 +
    afterExpl_22_Blue,afterExpl_23_Blue,afterExpl_24_Blue,afterExpl_25_Blue,afterExpl_26_Blue,
 +
    afterExpl_27_Blue,afterExpl_28_Blue,afterExpl_29_Blue,afterExpl_30_Blue,afterExpl_31_Blue,
 +
    afterExpl_32_Blue,afterExpl_33_Blue,afterExpl_34_Blue,afterExpl_35_Blue,afterExpl_36_Blue,
 +
    afterExpl_37_Blue,afterExpl_38_Blue,afterExpl_39_Blue,afterExpl_40_Blue).
 +
EXECUTE.
 +
 
 +
*This calculates the mean post-explosion pumps for red balloons.
 +
 
 +
COMPUTE MeanRedAfterExpl=mean (afterExpl_2_Red,afterExpl_3_Red,afterExpl_4_Red,afterExpl_5_Red,
 +
    afterExpl_6_Red,afterExpl_7_Red,afterExpl_8_Red,afterExpl_9_Red,afterExpl_10_Red,afterExpl_11_Red,
 +
    afterExpl_12_Red,afterExpl_13_Red,afterExpl_14_Red,afterExpl_15_Red,afterExpl_16_Red,
 +
    afterExpl_17_Red,afterExpl_18_Red,afterExpl_19_Red,afterExpl_20_Red,afterExpl_21_Red,
 +
    afterExpl_22_Red,afterExpl_23_Red,afterExpl_24_Red,afterExpl_25_Red,afterExpl_26_Red,
 +
    afterExpl_27_Red,afterExpl_28_Red,afterExpl_29_Red,afterExpl_30_Red,afterExpl_31_Red,
 +
    afterExpl_32_Red,afterExpl_33_Red,afterExpl_34_Red,afterExpl_35_Red,afterExpl_36_Red,
 +
    afterExpl_37_Red,afterExpl_38_Red,afterExpl_39_Red,afterExpl_40_Red).
 +
EXECUTE.
 +
 
 +
*This calculates the ratio between mean adjusted red pumps to blue pumps, higher numbers mean the pumps are similar for the two colors.
 +
 
 +
COMPUTE RatioMeanRedtoBlueAdjPumps=MeanRedAdjustedPumps / MeanBlueAdjustedPumps.
 +
EXECUTE.
 +
 
 +
 
 +
*Compute Standard Deviation of Blue Pumps in balloons that didn't explode
 +
 
 +
COMPUTE SDofBlueBART=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,Blue11,Blue12,
 +
    Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,
 +
    Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
*Compute Standard Deviation of Red Pumps in balloons that didn't explode
 +
 
 +
 
 +
COMPUTE SDofRedBART=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,Red11,Red12,Red13,Red14,
 +
    Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30,
 +
    Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).
 +
EXECUTE.
 +
 
 +
*Compute standard deviation of blue pumps after explosions*
 +
 
 +
COMPUTE SDofBlueAfterExplosions=Sd (afterExpl_2_Blue,afterExpl_3_Blue,afterExpl_4_Blue,
 +
    afterExpl_5_Blue,afterExpl_6_Blue,afterExpl_7_Blue,afterExpl_8_Blue,afterExpl_9_Blue,
 +
    afterExpl_10_Blue,afterExpl_11_Blue,afterExpl_12_Blue,afterExpl_13_Blue,afterExpl_14_Blue,
 +
    afterExpl_15_Blue,afterExpl_16_Blue,afterExpl_17_Blue,afterExpl_18_Blue,afterExpl_19_Blue,
 +
    afterExpl_20_Blue,afterExpl_21_Blue,afterExpl_22_Blue,afterExpl_23_Blue,afterExpl_24_Blue,
 +
    afterExpl_25_Blue,afterExpl_26_Blue,afterExpl_27_Blue,afterExpl_28_Blue,afterExpl_29_Blue,
 +
    afterExpl_30_Blue,afterExpl_31_Blue,afterExpl_32_Blue,afterExpl_33_Blue,afterExpl_34_Blue,
 +
    afterExpl_35_Blue,afterExpl_36_Blue,afterExpl_37_Blue,afterExpl_38_Blue,afterExpl_39_Blue,
 +
    afterExpl_40_Blue).
 +
EXECUTE.
 +
 
 +
*compute standard deviation of red pumps after explosions
 +
 
 +
COMPUTE SDofRedAfterExplosions=Sd (afterExpl_2_Red,afterExpl_3_Red,afterExpl_4_Red,afterExpl_5_Red,
 +
    afterExpl_6_Red,afterExpl_7_Red,afterExpl_8_Red,afterExpl_9_Red,afterExpl_10_Red,afterExpl_11_Red,
 +
    afterExpl_12_Red,afterExpl_13_Red,afterExpl_14_Red,afterExpl_15_Red,afterExpl_16_Red,
 +
    afterExpl_17_Red,afterExpl_18_Red,afterExpl_19_Red,afterExpl_20_Red,afterExpl_21_Red,
 +
    afterExpl_22_Red,afterExpl_23_Red,afterExpl_24_Red,afterExpl_25_Red,afterExpl_26_Red,
 +
    afterExpl_27_Red,afterExpl_28_Red,afterExpl_29_Red,afterExpl_30_Red,afterExpl_31_Red,
 +
    afterExpl_32_Red,afterExpl_33_Red,afterExpl_34_Red,afterExpl_35_Red,afterExpl_36_Red,
 +
    afterExpl_37_Red,afterExpl_38_Red,afterExpl_39_Red,afterExpl_40_Red).
 +
EXECUTE.
 +
 
 +
 
 +
*Compute the standard deviations of the blue quartiles
 +
 
 +
 
 +
COMPUTE SDofBlue1=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10).
 +
EXECUTE.
 +
 
 +
 
 +
COMPUTE SDofBlue2=Sd (Blue11,Blue12,
 +
    Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20).
 +
EXECUTE.
 +
 
 +
 
 +
COMPUTE SDofBlue3=Sd (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,
 +
    Blue27,Blue28,Blue29,Blue30).
 +
EXECUTE.
 +
 
 +
 
 +
COMPUTE SDofBlue4=Sd (Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
*Compute the standard deviations of the red quartiles
 +
 
 +
COMPUTE SDofRed1=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10).
 +
EXECUTE .
 +
 
 +
COMPUTE SDofRed2=Sd (Red11,Red12,Red13,Red14,
 +
    Red15,Red16,Red17,Red18,Red19,Red20).
 +
EXECUTE .
 +
 
 +
COMPUTE SDofRed3=Sd (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30).
 +
EXECUTE .
 +
 
 +
COMPUTE SDofRed4=Sd (
 +
    Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).
 +
EXECUTE.
 +
 
 +
*Compute standard deviations for blue and red balloons on first and second half of test
 +
 
 +
 
 +
COMPUTE SDofBlue1stHalf=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,Blue11,Blue12,
 +
    Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20).
 +
EXECUTE.
 +
 
 +
COMPUTE SDofBlue2ndHalf=Sd (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,
 +
    Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).
 +
EXECUTE.
 +
 
 +
COMPUTE SDofRed1stHalf=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,Red11,Red12,Red13,Red14,
 +
    Red15,Red16,Red17,Red18,Red19,Red20).
 +
EXECUTE.
 +
 
 +
COMPUTE SDofRed2ndHalf=Sd (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30,
 +
    Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).
 +
EXECUTE.
 +
 
 +
*This calculates total explosions
 +
 
 +
COMPUTE TotalExplosions=SUM (TotalExplodeAtt1, TotalExplodeAtt2,TotalExplodeAtt3,TotalExplodeAtt4,TotalExplodeAtt5,
 +
TotalExplodeAtt6,TotalExplodeAtt7,TotalExplodeAtt8,TotalExplodeAtt9,TotalExplodeAtt10,TotalExplodeAtt11,TotalExplodeAtt12,TotalExplodeAtt13,TotalExplodeAtt14,
 +
TotalExplodeAtt15,TotalExplodeAtt16,TotalExplodeAtt17,TotalExplodeAtt18,TotalExplodeAtt19,TotalExplodeAtt20,TotalExplodeAtt21,TotalExplodeAtt22,TotalExplodeAtt23,
 +
TotalExplodeAtt24,TotalExplodeAtt25,TotalExplodeAtt26,TotalExplodeAtt27,TotalExplodeAtt28,TotalExplodeAtt29,TotalExplodeAtt30,TotalExplodeAtt31,TotalExplodeAtt32,
 +
TotalExplodeAtt33,TotalExplodeAtt34,TotalExplodeAtt35,TotalExplodeAtt36,TotalExplodeAtt37,TotalExplodeAtt38,TotalExplodeAtt39,TotalExplodeAtt40).
 +
EXECUTE.
 +
 
 +
 
 +
*Compute the SD of blue pumps divided by the mean adjusted blue pumps
 +
 
 +
COMPUTE SDblueByMeanBlue=SDofBlueBART / MeanBlueAdjustedPumps.
 +
EXECUTE.
 +
 
 +
*Compute the SD of red pumps divided by the mean adjusted red pumps
 +
 
 +
COMPUTE SDredByMeanRed=SDofRedBART / MeanRedAdjustedPumps.
 +
EXECUTE.
 +
 
 +
====Text file scoring method====
 +
 
 +
TableName = "Qry_BART_Compute3"
 +
 
 +
                Dim aryScore(31)
 +
 
 +
                for s = 1 to ubound(aryScore)
 +
 
 +
                                aryScore(s) = null
 +
 
 +
                next
 +
 
 +
               
 +
 
 +
                kk = 1
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' TotalAdjustedPumps: adjusted pumps for all balloons for whole task.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT sum(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("SumValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanAdjustedPumps: mean adjusted pumps for all balloons for whole task.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(CountTrials) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                TotalRec = ers.recordcount
 +
 
 +
               
 +
 
 +
                strSQL = "SELECT sum(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                MeanAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' SDAdjustedPumps: mean adjusted pumps for all balloons for whole task.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT STDEV(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(CountTrials) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("SumValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                SDAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanRedAdjustedPumps: mean adjusted pumps for red balloons.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Red) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                TotalRec = ers.recordcount
 +
 
 +
               
 +
 
 +
                strSQL = "SELECT sum(Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                MeanRedAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' SDRedAdjustedPumps: mean adjusted pumps for red balloons.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT STDEV(Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Red) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("SumValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                SDRedAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanBlueAdjustedPumps: mean adjusted pumps for blue balloons.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Blue) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                TotalRec = ers.recordcount
 +
 
 +
               
 +
 
 +
                strSQL = "SELECT sum(Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                MeanBlueAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' SDBlueAdjustedPumps: mean adjusted pumps for blue balloons.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT STDEV(Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Blue) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("SumValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                SDBlueAdjustedPumps = aryScore(kk)
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' RatioMeanRedtoBlueAdjPumps: mean red adjusted pumps/mean blue adjusted pumps.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                if (isnull(MeanRedAdjustedPumps) = false and isnull(MeanBlueAdjustedPumps) = false and MeanBlueAdjustedPumps <> 0) then
 +
 
 +
                                aryScore(kk) = MeanRedAdjustedPumps/MeanBlueAdjustedPumps
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Quart Adjusted Pumps: mean of the adjusted pumps of the red/blue balloons on trials 1-10, 11-20, 21-30, 31-40.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                for i = 1 to 2
 +
 
 +
                                if (i = 1) then
 +
 
 +
                                                BLN = "Red"
 +
 
 +
                                else
 +
 
 +
                                                BLN = "Blue"
 +
 
 +
                                end if
 +
 
 +
                                for j = 1 to 4
 +
 
 +
                                                StartN = (10 * (j-1)) + 1
 +
 
 +
                                                EndN = 10 * j
 +
 
 +
                                                strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(" & Bln & ") > 0"
 +
 
 +
                                                strSQL = strSQL & " and Trial >= " & StartN & " and Trial <= " & EndN
 +
 
 +
                                                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                                                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                                                TotalRec = ers.recordcount
 +
 
 +
                                               
 +
 
 +
                                                strSQL = "SELECT sum(" & BLN & ") as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                                                strSQL = strSQL & " and Trial >= " & StartN & " and Trial <= " & EndN
 +
 
 +
                                                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                                                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                                                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                                                else
 +
 
 +
                                                                aryScore(kk) = null
 +
 
 +
                                                end if
 +
 
 +
                                                kk = kk + 1
 +
 
 +
                                next
 +
 
 +
                next
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanRedAfterExpl: mean adjusted pumps on red balloons immediately after an explosion on the preceding trial.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT [Subject] FROM " & TableName & " where [Subject]=" & SubjectID & " and len(AfterExpl_Red) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                'response.write strSQL
 +
 
 +
                'response.flush
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                TotalRec = ers.recordcount
 +
 
 +
               
 +
 
 +
                strSQL = "SELECT sum(AfterExpl_Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanBlueAfterExpl: mean adjusted pumps on blue balloons immediately after an explosion on the preceding trial.
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(AfterExpl_Blue) > 0"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                TotalRec = ers.recordcount
 +
 
 +
               
 +
 
 +
                strSQL = "SELECT sum(AfterExpl_Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
 +
 
 +
                                aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' TotalPoints[Session]: total points earned on the task
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT TotalPointsSession FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("TotalPointsSession")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Mean StimulusRT
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("MeanValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Median StimulusRT
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                sSQL = "SELECT * FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and StimulusRT is not null order by StimulusRT"
 +
 
 +
                aryScore(kk) = RunSQL_MEDIAN(sSQL,"StimulusRT")
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' SD StimulusRT
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT STDEV(StimulusRT) as STDDEV FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("STDDEV")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanRTRed: Mean RT on all red balloon presses (i.e., red balloon pumps and cashouts)
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and PickBalloon='Red'"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("MeanValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' MeanRTBlue: Mean RT on all blue balloon presses (i.e., blue balloon pumps and cashouts)
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and PickBalloon='Blue'"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("MeanValue")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' RedExplosions: Total number of Red balloon explosions
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT SUM(TotalExplodeAtt) as RedExplosions from Qry_BART_Compute3 where [Subject]=" & SubjectID & " and PickBalloon='Red'"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("RedExplosions")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = 0
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' BlueExplosions: Total number of Blue balloon explosions
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT SUM(TotalExplodeAtt) as BlueExplosions from Qry_BART_Compute3 where [Subject]=" & SubjectID & " and PickBalloon='Blue'"
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if not ers.eof then
 +
 
 +
                                aryScore(kk) = ers("BlueExplosions")
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = 0
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Coefficient of Variation: SDAdjustedPumps  / MeanAdjustedPumps
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                if (isnull(SDAdjustedPumps) = true or isnull(MeanAdjustedPumps) = true or MeanAdjustedPumps = 0) then
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = SDAdjustedPumps / MeanAdjustedPumps
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Coefficient of Variation- red balloons: SDRedAdjustedPumps / MeanRedAdjustedPumps
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                if (isnull(SDRedAdjustedPumps) = true or isnull(MeanRedAdjustedPumps) = true or MeanRedAdjustedPumps = 0) then
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = SDRedAdjustedPumps / MeanRedAdjustedPumps
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Coefficient of Variation- blue balloons: SDBlueAdjustedPumps / MeanBlueAdjustedPumps
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                if (isnull(SDBlueAdjustedPumps) = true or isnull(MeanBlueAdjustedPumps) = true or MeanBlueAdjustedPumps = 0) then
 +
 
 +
                                aryScore(kk) = null
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = SDBlueAdjustedPumps / MeanBlueAdjustedPumps
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' TotalPumps
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT max(Trial) as MaxTrial FROM ePrime_BART where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if ers.eof then
 +
 
 +
                                aryScore(kk) = 0
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = ers("MaxTrial")
 +
 
 +
                end if
 +
 
 +
                kk = kk + 1
 +
 
 +
               
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                ' Cash out Without Pump
 +
 
 +
                ' ===============================================================================================
 +
 
 +
                strSQL = "SELECT * FROM Qry_BART_CashoutWoPump where [Subject]=" & SubjectID
 +
 
 +
                Set ers = Server.CreateObject("ADODB.Recordset")
 +
 
 +
                ers.Open strSQL, DataConn, adOpenStatic
 +
 
 +
                if ers.eof then
 +
 
 +
                                aryScore(kk) = 0
 +
 
 +
                else
 +
 
 +
                                aryScore(kk) = ers.recordcount
 +
 
 +
                end if
 +
 
 +
 +
 
 +
 
 +
 
 +
====History of Checking Scoring====
 +
 
 +
* Andy Dean independently checked Stone’s results in 2009 and 2010 and found his results to be accurate.
 +
* In April 2011, Andy Dean and Eugene Oh checked Stone’s results a second time.  All results were accurate, except for two issues.  1) The BART_RatioMeanRedtoBlueAdjPumps variable was being scored incorrectly by Stone’s script.  He fixed this error and it is now identical to that determined independently. 2) The BART_TotalPointsSession variable (the total points earned over the task) was found to be inconsistent with adjusted pumps.  While this variable should be the total adjusted pumps multiplied by 5, in many cases it was not. This was determined to be an error in the calculation of explosion trials.  In the eprime program, if the participant presses the “cashout” key at the exact same time that the explosion algorithm indicates the balloon should explode, that trial is still coded as an explosion in the explosion column (ExplodeAtt = 1), but it is correctly NOT coded as an explosion in the calculation of points earned (the presentation to the participant is also correct).  Thus, when using the ExplodeAtt variable to determine which balloons actually exploded, the variable needs to be adjusted so that cashouts which occurred instantaneously with ExplodeAtt = 1 are NOT considered explosion trials (this calculation must also account for the participant’s handedness which determines which key is used for cashouts and pumping).  In June and July 2011 Andy Dean worked with Stone and the CNP scoring script is now correct.
 +
* In July 2011 Andy Dean worked with Stone to add variables which computed how many trials were completed by the subject (BART_TRIALCOMP) and how many times the participant cashed out without pumping at all (BART_CASHOUTWOPUMP).  These variables can be used to exclude potentially problematic particpants.
 +
*In July 2011 Andy Dean found that a handful of participants had data that was outside the range of possibility on the task (e.g., more explosions than possible, more mean pumps than possible, etc.).  Stone Shih determined that this was due to duplicate data for these and other cases.  The following LA2K participants had duplicate data removed from the system in July 2011: 10421, 10445, 10478, 10484, 10506, 10566, 10575, 10595, 10668.
 +
* In May 2012 Andy Dean found an error in which, for a subset of participants (N ~ 236), the Trials Completed variable = 1, even though other variables (e.g., pumps, number of explosions) suggested that the task was completed (in which case Trials Completed should = 40). Andy worked with Stone Shih and they determined it was a coding error. This error was fixed.
 +
* In June 2012 Andy Dean produced the figures and tables below and found all results to be accurate.
  
 
=== Data Distributions ===
 
=== Data Distributions ===
[[File:1_Results.png]]
 
  
[[File:2_Results.png]]
+
====Frequency of cashing out without pumping====
 +
[[File:NoPumps.png]]
  
[[File:3_Results.png]]
+
====The following data consists of healthy control subjects who completed the study, were not flagged, completed the BART, and had fewer than 3 cashouts without pumping====
 +
[[File:AdjBoth.png]]
  
[[File:4_Results.png]]
+
[[File:BlueRedHisto1.png]]
  
[[File:5_Results.png]]
+
[[File:Traject.png]]
 +
 
 +
===Negative relationship between age and mean adjusted pumps (both balloons)===
 +
 
 +
[[File:AgeB.png]]
 +
 
 +
===Positive relationship between education and mean adjusted pumps (both balloons)===
 +
 
 +
[[File:EduB.png]]
 +
 
 +
===Women tend to pump less than men (p = .000)===
 +
 
 +
[[File:GenderB.png]]
 +
 
 +
===Hispanic participants tend to pump less than Non-Hispanic participants (p = .000)===
 +
 
 +
[[File:HispanicB.png]]
  
 
=== References ===
 
=== References ===
Band, G. P., van der Molen, M. W., and Logan, G. D. (2003). Horse-race model simulations of the stop-signal procedure. ''Acta Psychol, 112,'' 105-142.
 
  
Boucher, L., Palmeri, T. J., Logan, G. D., and Schall, J. D. (2007). Inhibitory control in mind and brain: An interactive race model of countermanding saccades. ''Psychol Rev, 114 (2),'' 376-97.  
+
Dean, AC, Sugar, C, Hellemann, G, & London, E (2011) Is all risk bad? Young adult cigarette smokers fail to take adaptive risk in a laboratory decision-making test. Psychopharmacology [Epub ahead of print]
 +
 
 +
Jentsch JD, Woods JA, Groman SM, Seu E (2010) Behavioral characteristics and neural mechanisms mediating performance in a rodent version of the Balloon Analog Risk Task. Neuropsychopharmacology 35: 1797-806
 +
 
 +
Lejuez CW, Aklin WM, Jones HA, Richards JB, Strong DR, Kahler CW, Read JP (2003) The Balloon Analogue Risk Task (BART) differentiates smokers and nonsmokers. Exp Clin Psychopharmacol 11: 26-33
 +
 
 +
Lejuez CW, Read JP, Kahler CW, Richards JB, Ramsey SE, Stuart GL, Strong DR, Brown RA (2002) Evaluation of a behavioral measure of risk taking: the Balloon Analogue Risk Task (BART). J Exp Psychol Appl 8: 75-84
 +
 
 +
Pleskac TJ, Wallsten TS, Wang P, Lejuez CW (2008) Development of an automatic response mode to improve the clinical utility of sequential risk-taking tasks. Exp Clin Psychopharmacol 16: 555-64
  
Logan, G. D., and Cowan, W. B. (1984). On the ability to inhibit through and action: a theory of an act of control. ''Psychol Rev, 91,'' 295-327.
+
Wallsten TS, Pleskac TJ, Lejuez CW (2005) Modeling behavior in a clinically diagnostic sequential risk-taking task. Psychol Rev 112: 862-80
  
Logan, G. D. (1994). On the ability to inhibit thought and action: A users’ guide to the stop signal paradigm. In: Dagenbach, D., Carr, T. H. (Eds.), Inhibitory Processes in Attention, Memory and Language. Academic Press, San Diego, pp. 189-239.
+
go back to [[HTAC]]

Latest revision as of 12:28, 21 June 2012

go back to HTAC


Basic Task Description

The Balloon Analogue Risk Task (BART) is a computerized behavioral measure of risky decision-making, developed by Carl Lejuez (Lejuez et al., 2002). Balloons are presented on a computer screen, one balloon per trial, and the examinee can “pump” the balloons up by pressing a response key, virtually inflating the balloons (i.e., they increase in size). Each time a balloon is pumped up, a set amount of money or points is earned on that trial (e.g., 5 cents per pump). However, after a certain number of pumps (determined probabilistically), the balloons explode and no money or points are earned on that trial. Thus, the examinee must decide when to “cash out” of a given trial to put the trial money/points into a cumulative bank, by pressing a “cash out” response key. If a balloon explodes prior to cashing out, no money is earned on that particular trial. The objective is for the examinee to earn as much money or points as possible across the task. Versions of the BART vary with respect to the number of trials/balloons used, as well as the probability of explosions [e.g., some tasks have used balloons with a single probability of explosion (e.g., Lejuez et al., 2003), while others have used different-colored balloons with different probabilities of explosion (e.g., Lejuez et al., 2002; Dean et al., 2011)]. The primary dependent variable of the task is the mean or total number of pumps on trials in which the balloon did not explode; these have been termed adjusted pumps. Adjusted pumps are preferred to absolute pumps because explosions artificially restrict the range of pumping behavior (for evidence of the bias associated with absolute pumps see Pleskac et al. 2008).

Task Procedure

Our version of the BART task was programmed in E-Prime 2.0. It consists of 40 total trials, with balloons that are colored red or blue (20 of each color). Red balloons are relatively “high risk”; the probability of explosion on each red balloon is randomly selected from a range of 1 to 32 pumps. Blue balloons are “low risk", in which the probability of explosion is randomly selected from a range of 1 to 128 pumps. The order of balloon color across trials was randomized. Examinees are given 5 points for each adjusted pump. In our version of the task, participants are not paid for their performance.

At the beginning of the task, instructions are presented on the screen in yellow, size 16 Arial font, with a black screen background. In order to reduce learning affects on pumping behavior, the examinees are informed at the outset that two different balloons are used with different explosion tendencies (see Wallsten et al., 2005 for consideration of this issue). The instructions are as follows:

  • In the following game, you pump up a balloon.
  • Your goal is to earn as many points as possible.
  • You can get 5 points for each pump!
  • However, when the balloon explodes, you get no points.
  • You can save your points by choosing to stop pumping before the balloon explodes. There are two different balloons and they are different in how much they can be inflated before they explode.
  • There are a set number of trials in this experiment, so try to maximize your points on each trial.

These instructions are reiterated on following screens, in which the buttons used for pumping and cashing out are indicated. If the subject is right-handed (this information is entered into the program during start-up), the pumping key is the left key on a 3-button keypad, while the cash-out key is the right key. In contrast, if the examinee is left handed, this button mapping is reversed (i.e., pumping with the right key, and cashing-out with the left key). The placement of the keypad is also oriented on the right or left side of the examinee in accordance with handedness.

After the examinee expresses understanding of the task, the experimental session begins. A blank screen with a fixation cross is briefly shown (500 milliseconds), and then the first balloon is presented (red or blue). Text is placed below the balloon image to indicate which key press is used for pumping and which is used for cashing in (i.e., serving as a reminder). Balloons are presented centrally on an all white screen background. The first balloon image is 152 X 152 pixels in size. After one pump, another balloon image is presented instantaneously with a size of 154 X 154 pixels. The balloon size increases in height and width by 2 pixels with each successive pump, giving the appearance of being inflated. This continues until the examinee cashes out or the balloon explodes, whichever occurs first. Upon explosion, an image of a ruptured balloon is presented of comparable size to the last balloon image. After both cash outs and explosions, a rectangular yellow text box is presented on the screen for 1500 milliseconds which shows the examinee’s current Total Points in black text (Arial size 16 font). In the case of an explosion, this total will be identical to the previous trial’s total because no points have been earned. Note that accumulated points are only shown at the end of a given trial, and are not shown as the examinee is pumping. After the previous trail is concluded, a blank screen with a central fixation cross is presented for 500 milliseconds, followed by presentation of the next balloon/trial. This process continues until the 40th balloon is completed. Afterward, a black screen is presented which thanks the participant for his/her participation, and shows a yellow text box with the Grand Total Points earned (Arial size 16 font, yellow text). The task is self-paced and takes approximately 10 minutes, depending on the examinee's behavior.

Task Structure Detail

  • Task Structure
    • The BART has a series of instructional screens at the outset, followed by the experimental session comprised of 40 balloon trials.
      • Six instructional screens. Screens are advanced with a right mouse click from the examiner.
        • 1. Basic task description.
        • 2. Placement of hands and keys used for pumping and stopping (mapped based on handedness).
        • 3. Pumping description and appearance of balloon.
        • 4. Explosion description and appearance of exploded balloon.
        • 5. Reiteration of key used to stop pumping/cash in (mapped based on handedness).
        • 6. Questions screen prior to beginning task.
      • Experimental trials (40 trials). All experimental trials are preceded by a fixation cross screen.
        • Fixation cross (500 ms) screen with blank white background.
        • Balloon trial 1. Red or blue balloon presented (randomized).
          • Within-trial structure
            • Pumping increases balloon size with successively enlarged images (self-paced).
            • Participant cashes out or the balloon explodes.
            • Total points earned screen presented for 1500 ms.
        • Balloon trial 2 begins after a fixation cross screen, and this is sequence is repeated for 40 trials.
      • End. Thank you screen presented. Grand Total Points also displayed.
    • Timing
      • Instruction screens are static until advanced by examiner with a right mouse click.
      • Fixation cross screens (500 ms).
      • Balloon images are static until participant presses the pump key. Pressing the pump key instantaneously presents the following balloon image (either a slightly larger balloon or an exploded balloon).
      • Images of an exploded balloon are presented for 1500 ms, with Total Points text underneath.
      • When the participant cashes out, just the Total Points text is presented for 1500 ms.
      • The ending thank you screen is static until advanced by the examiner with right mouse click.
  • Stimulus Characteristics
    • sensory modality: Visual. Balloons are either red or blue. Balloon images start with a size of 154 X 154 pixels and are increased in height and width by 2 pixels with each pump. The fixation cross is black text in size 18 bold font in Comic Sans MS.
    • functional modality: visuoperceptual and linguistic (understanding of text).
    • presentation modality: computer display, no audio, directions are assisted by examiner.
  • Response Characteristics
    • responses required: left or right key press for pumping or cashing in. Button mapping is based on handedness.
      • effector modality: Manual button press.
      • functional modality: Manual button press.
    • response options (e.g., yes/no, go/no-go, forced choice, multiple choice [specify n of options], free response): yes/no, pump or cashout.
    • response collection (e.g., examiner notes, keyboard, keypad, mouse, voice key, button press): Button press and recording of responses in Eprime 2.0.

Task Schematic

Schematic of the Balloon Analogue Risk Task

Blue 001.JPG Blue 002.JPG Blue 003.JPG (cash out) Total Points: XX

Red 001.JPG Red 002.JPG Red exp 003.JPG (explosion) Total Points: XX

Task Parameters Table

BARTtaskparameters.png

Stimuli

Stimuli consist of red or blue balloons which begin with a size of 154 X 154 pixels and are increased in height and width by 2 pixels with each pump. When a balloon explodes, an image comparable in size and color is displayed as a burst balloon for 1500 ms.

A white screen with a black fixation cross (size 18 bold font in Comic Sans MS) is presented for 500 ms before every balloon trial.

Dependent Variables

The primary dependent variable is the mean number of pumps on trials in which the balloon did not explode; these have been termed adjusted pumps. Adjusted pumps are preferred to absolute pumps because explosions artificially restrict the range of pumping behavior (for evidence of the bias associated with absolute pumps see Pleskac et al. 2008).

Because the red and blue balloons differ considerably in their probability of explosion, it may also be useful to analyze the mean adjusted pumps on the red and blue balloons separately. In addition, because participants will likely adapt to the task over time, adjusted pumps for each balloon color on each quartile of trials (1-10, 11-20, 21-30, 31-40) can be analyzed to determine how performance changes over time. Note here that mean adjusted pumps for each quartile likely vary in terms of the number of trials averaged (due to explosions and the fact that balloon color is randomized across the task). Other variables of interest may include the number of adjusted pumps on red and blue balloons which immediately follow an explosion, and the number of explosions for each balloon color. Lastly, because variability in pumping behavior has been shown to be important in animal models (Jentsch et al., 2010), the coefficient of variation of adjusted pumps can be examined across balloons, and in the red and blue balloons separately (coefficient of variation = standard deviation of adjusted pumps divided by the mean adjusted pumps).


Table of all available variables

BARTvariables2.PNG

Cleaning Rules

In checking the data, it is first important to determine if the task was completed. This can be done by checking the BART_TRIALCOMP variable which indicates how many trials were completed. It should be 40 trials for each participant; if not, exclude the subject. A second variable to check is the BART_CASHOUTWOPUMP variable, which indicates how many times the participant cashed out of a trial without pumping at all. While this may happen on occasion as an accident (e.g., when the participant is beginning the task and is getting used to the buttons used), we recommend excluding subjects who did this more than 2 times on a given administration. This will exclude participants who may have cashed out immediately as a way to complete the task faster. Lastly, the distribution of explosions and mean pumps can be checked across participants (all data must be within the range of possibility; see Variable Table for possible ranges), and participants with very extreme behavior (e.g., > 3 standard deviations above or below the mean) can be considered for exclusion.

Code/Algorithms

Two scoring procedures are provided in the following text. The first is a relatively inefficient method which derives variables from eprime files (specifically, E-Merge files), and then imports this data into SPSS to run two scripts for calculation of the final variables. Using this method requires that you have eprime 2.0 and SPSS installed on your computer. The second method is a more streamlined approach which derives the final variables from the individual eprime text files. This latter method is used by the CNP biostatistics core.

E-prime to SPSS scoring method:

1) Open up e-prime studio, go to Tools, and click E-Merge. Find the individual BART files you want to merge together in the left pane of the screen (displayed in the main screen), hold down Control and highlight them all. Then hit the Merge tab. Save the new merge. For some reason when you go to open that new merge file it may be empty, so go to open file and select it again to open it up.

2) In the merge file go to Tools and click Batch Analysis. You can then select more than one of the pre-made scripts for scoring. At the Batch window, hit Add Files, then find the Overall analyses by row script, and hit open. Then find the Number of trials cash out with no pumps and the Mean Median SD RT data and add them. Once they’re all there, hit the Excel tab and it will send all the results to an excel spreadsheet, with each one of the scripts represented on a different tab. For some reason the Overall analyses by row page is called Presses by color each subject in excel, even though all the required data is there.

3) Delete the information at the top of the excel sheet so that you can import the data into SPSS. When you go to open the excel sheet in SPSS, you can select which excel tab you want displayed. You probably just want to open the Presses by color each subject (overall analyses) tab, which will provide you with the primary dependent variables (other variables, such as reaction time and the number of times a participant cashes out without pumping, are already available in the appropriate excel tab).

4) Once the overall analyses are in SPSS, open up the syntax called BART create additional variables for calculations. This will make the additional variables you need to get the primary variables later. After you run this syntax, make sure to DEFINE -9998 AS MISSING FOR EACH VARIABLE IN THE ENTIRE SPSS DATASET. IF YOU DON’T DO THIS, ALL THE SUBSEQUENT CALUCATIONS WILL BE TOTALLY WRONG.

5) After you’ve run the above syntax, open up the BART calculate primary variables only after missing variables have been defined syntax, and run it. This will create pretty much all the variables you need.

Here are the eprime scripts mentioned above:

Overall analyses by row.anl

Presses by color each subject {Begin Comments

} {Begin Filters } {Begin Rows Subject 1 } {Begin Cols Trial 1 } {Begin Data Trial 1 WhichBalloon 4 ExplodeAtt 0 } {Begin Options 0 1 0 1 2 1 1 1 1 0 200 1 Trial:CountNum, WhichBalloon:Mean, ExplodeAtt:Total by Subject and Trial 1 Trial:CountNum, WhichBalloon:Mean, ExplodeAtt:Total }

Mean Median SD RT data.anl

Mean Median SD RT data {Begin Comments

} {Begin Filters } {Begin Rows Subject 1 } {Begin Cols } {Begin Data Stimulus.RT 4 Stimulus.RT 12 Stimulus.RT 8 } {Begin Options 0 1 0 1 2 1 1 1 1 0 300 1 Stimulus.RT:Mean, Stimulus.RT:Median, Stimulus.RT:StdDevP by Subject 1 Stimulus.RT:Mean, Stimulus.RT:Median, Stimulus.RT:StdDevP }

Number of trials cash out with no pumps.anl trials cash out no pumps {Begin Comments

} {Begin Filters ExplodeAtt 0

PointsBalloon 0.00

} {Begin Rows Subject 1 } {Begin Cols } {Begin Data Trial 1 } {Begin Options 0 1 0 1 2 1 1 1 1 0 30 1 Trial:CountNum by Subject 1 Trial:CountNum }


These are the SPSS scripts:


BART create additional variables for calculations.

  • This subtracts one from all presses per trial (1-40) to account for the fact that one button press was either a cash-out or an explosion.

COMPUTE CountNumTrial1=CountNumTrial1 - 1. EXECUTE.

COMPUTE CountNumTrial2=CountNumTrial2 - 1. EXECUTE.

COMPUTE CountNumTrial3=CountNumTrial3 - 1. EXECUTE.

COMPUTE CountNumTrial4=CountNumTrial4 - 1. EXECUTE.

COMPUTE CountNumTrial5=CountNumTrial5 - 1. EXECUTE.

COMPUTE CountNumTrial6=CountNumTrial6 - 1. EXECUTE.

COMPUTE CountNumTrial7=CountNumTrial7 - 1. EXECUTE.

COMPUTE CountNumTrial8=CountNumTrial8 - 1. EXECUTE.

COMPUTE CountNumTrial9=CountNumTrial9 - 1. EXECUTE.

COMPUTE CountNumTrial10=CountNumTrial10 - 1. EXECUTE.

COMPUTE CountNumTrial11=CountNumTrial11 - 1. EXECUTE.

COMPUTE CountNumTrial12=CountNumTrial12 - 1. EXECUTE.

COMPUTE CountNumTrial13=CountNumTrial13 - 1. EXECUTE.

COMPUTE CountNumTrial14=CountNumTrial14 - 1. EXECUTE.

COMPUTE CountNumTrial15=CountNumTrial15 - 1. EXECUTE.

COMPUTE CountNumTrial16=CountNumTrial16 - 1. EXECUTE.

COMPUTE CountNumTrial17=CountNumTrial17 - 1. EXECUTE.

COMPUTE CountNumTrial18=CountNumTrial18 - 1. EXECUTE.

COMPUTE CountNumTrial19=CountNumTrial19 - 1. EXECUTE.

COMPUTE CountNumTrial20=CountNumTrial20 - 1. EXECUTE.

COMPUTE CountNumTrial21=CountNumTrial21 - 1. EXECUTE.

COMPUTE CountNumTrial22=CountNumTrial22 - 1. EXECUTE.

COMPUTE CountNumTrial23=CountNumTrial23 - 1. EXECUTE.

COMPUTE CountNumTrial24=CountNumTrial24 - 1. EXECUTE.

COMPUTE CountNumTrial25=CountNumTrial25 - 1. EXECUTE.

COMPUTE CountNumTrial26=CountNumTrial26 - 1. EXECUTE.

COMPUTE CountNumTrial27=CountNumTrial27 - 1. EXECUTE.

COMPUTE CountNumTrial28=CountNumTrial28 - 1. EXECUTE.

COMPUTE CountNumTrial29=CountNumTrial29 - 1. EXECUTE.

COMPUTE CountNumTrial30=CountNumTrial30 - 1. EXECUTE.

COMPUTE CountNumTrial31=CountNumTrial31 - 1. EXECUTE.

COMPUTE CountNumTrial32=CountNumTrial32 - 1. EXECUTE.

COMPUTE CountNumTrial33=CountNumTrial33 - 1. EXECUTE.

COMPUTE CountNumTrial34=CountNumTrial34 - 1. EXECUTE.

COMPUTE CountNumTrial35=CountNumTrial35 - 1. EXECUTE.

COMPUTE CountNumTrial36=CountNumTrial36 - 1. EXECUTE.

COMPUTE CountNumTrial37=CountNumTrial37 - 1. EXECUTE.

COMPUTE CountNumTrial38=CountNumTrial38 - 1. EXECUTE.

COMPUTE CountNumTrial39=CountNumTrial39 - 1. EXECUTE.

COMPUTE CountNumTrial40=CountNumTrial40 - 1. EXECUTE.


  • This changes the number of pumps for each trial (1-40) to missing (-9998) if there was an explosion on that trial.

DO IF (TotalExplodeAtt1 = 1). RECODE CountNumTrial1 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt2 = 1). RECODE CountNumTrial2 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt3 = 1). RECODE CountNumTrial3 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt4 = 1). RECODE CountNumTrial4 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt5 = 1). RECODE CountNumTrial5 (ELSE=-9998). END IF. EXECUTE. DO IF (TotalExplodeAtt6 = 1). RECODE CountNumTrial6 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt7 = 1). RECODE CountNumTrial7 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt8 = 1). RECODE CountNumTrial8 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt9 = 1). RECODE CountNumTrial9 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt10 = 1). RECODE CountNumTrial10 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt11 = 1). RECODE CountNumTrial11 (ELSE=-9998). END IF. EXECUTE. DO IF (TotalExplodeAtt12 = 1). RECODE CountNumTrial12 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt13 = 1). RECODE CountNumTrial13 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt14 = 1). RECODE CountNumTrial14 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt15 = 1). RECODE CountNumTrial15 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt16 = 1). RECODE CountNumTrial16 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt17 = 1). RECODE CountNumTrial17 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt18 = 1). RECODE CountNumTrial18 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt19 = 1). RECODE CountNumTrial19 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt20 = 1). RECODE CountNumTrial20 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt21 = 1). RECODE CountNumTrial21 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt22 = 1). RECODE CountNumTrial22 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt23 = 1). RECODE CountNumTrial23 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt24 = 1). RECODE CountNumTrial24 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt25 = 1). RECODE CountNumTrial25 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt26 = 1). RECODE CountNumTrial26 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt27 = 1). RECODE CountNumTrial27 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt28 = 1). RECODE CountNumTrial28 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt29 = 1). RECODE CountNumTrial29 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt30 = 1). RECODE CountNumTrial30 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt31 = 1). RECODE CountNumTrial31 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt32 = 1). RECODE CountNumTrial32 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt33 = 1). RECODE CountNumTrial33 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt34 = 1). RECODE CountNumTrial34 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt35 = 1). RECODE CountNumTrial35 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt36 = 1). RECODE CountNumTrial36 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt37 = 1). RECODE CountNumTrial37 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt38 = 1). RECODE CountNumTrial38 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt39 = 1). RECODE CountNumTrial39 (ELSE=-9998). END IF. EXECUTE.

DO IF (TotalExplodeAtt40 = 1). RECODE CountNumTrial40 (ELSE=-9998). END IF. EXECUTE.


  • This creates variables for each ballloon (1-40) for each color. This is unfortunately needed so that a variable is created for every possible color-trial scenario to calculate the pumps by color and by quaritle later.

DO IF (MeanWhichBalloon1 = 1). RECODE CountNumTrial1 (ELSE=Copy) INTO Blue1. END IF. EXECUTE.

DO IF (MeanWhichBalloon2 = 1). RECODE CountNumTrial2 (ELSE=Copy) INTO Blue2. END IF. EXECUTE.

DO IF (MeanWhichBalloon3 = 1). RECODE CountNumTrial3 (ELSE=Copy) INTO Blue3. END IF. EXECUTE.

DO IF (MeanWhichBalloon4 = 1). RECODE CountNumTrial4 (ELSE=Copy) INTO Blue4. END IF. EXECUTE.

DO IF (MeanWhichBalloon5 = 1). RECODE CountNumTrial5 (ELSE=Copy) INTO Blue5. END IF. EXECUTE.

DO IF (MeanWhichBalloon6 = 1). RECODE CountNumTrial6 (ELSE=Copy) INTO Blue6. END IF. EXECUTE.

DO IF (MeanWhichBalloon7 = 1). RECODE CountNumTrial7 (ELSE=Copy) INTO Blue7. END IF. EXECUTE.

DO IF (MeanWhichBalloon8 = 1). RECODE CountNumTrial8 (ELSE=Copy) INTO Blue8. END IF. EXECUTE.

DO IF (MeanWhichBalloon9 = 1). RECODE CountNumTrial9 (ELSE=Copy) INTO Blue9. END IF. EXECUTE.

DO IF (MeanWhichBalloon10 = 1). RECODE CountNumTrial10 (ELSE=Copy) INTO Blue10. END IF. EXECUTE.

DO IF (MeanWhichBalloon11 = 1). RECODE CountNumTrial11 (ELSE=Copy) INTO Blue11. END IF. EXECUTE.

DO IF (MeanWhichBalloon12 = 1). RECODE CountNumTrial12 (ELSE=Copy) INTO Blue12. END IF. EXECUTE.

DO IF (MeanWhichBalloon13 = 1). RECODE CountNumTrial13 (ELSE=Copy) INTO Blue13. END IF. EXECUTE.

DO IF (MeanWhichBalloon14 = 1). RECODE CountNumTrial14 (ELSE=Copy) INTO Blue14. END IF. EXECUTE.

DO IF (MeanWhichBalloon15 = 1). RECODE CountNumTrial15 (ELSE=Copy) INTO Blue15. END IF. EXECUTE.

DO IF (MeanWhichBalloon16 = 1). RECODE CountNumTrial16 (ELSE=Copy) INTO Blue16. END IF. EXECUTE.

DO IF (MeanWhichBalloon17 = 1). RECODE CountNumTrial17 (ELSE=Copy) INTO Blue17. END IF. EXECUTE.

DO IF (MeanWhichBalloon18 = 1). RECODE CountNumTrial18 (ELSE=Copy) INTO Blue18. END IF. EXECUTE.

DO IF (MeanWhichBalloon19 = 1). RECODE CountNumTrial19 (ELSE=Copy) INTO Blue19. END IF. EXECUTE.

DO IF (MeanWhichBalloon20 = 1). RECODE CountNumTrial20 (ELSE=Copy) INTO Blue20. END IF. EXECUTE.

DO IF (MeanWhichBalloon21 = 1). RECODE CountNumTrial21 (ELSE=Copy) INTO Blue21. END IF. EXECUTE.

DO IF (MeanWhichBalloon22 = 1). RECODE CountNumTrial22 (ELSE=Copy) INTO Blue22. END IF. EXECUTE.

DO IF (MeanWhichBalloon23 = 1). RECODE CountNumTrial23 (ELSE=Copy) INTO Blue23. END IF. EXECUTE.

DO IF (MeanWhichBalloon24 = 1). RECODE CountNumTrial24 (ELSE=Copy) INTO Blue24. END IF. EXECUTE.

DO IF (MeanWhichBalloon25 = 1). RECODE CountNumTrial25 (ELSE=Copy) INTO Blue25. END IF. EXECUTE.

DO IF (MeanWhichBalloon26 = 1). RECODE CountNumTrial26 (ELSE=Copy) INTO Blue26. END IF. EXECUTE.

DO IF (MeanWhichBalloon27 = 1). RECODE CountNumTrial27 (ELSE=Copy) INTO Blue27. END IF. EXECUTE.

DO IF (MeanWhichBalloon28 = 1). RECODE CountNumTrial28 (ELSE=Copy) INTO Blue28. END IF. EXECUTE.

DO IF (MeanWhichBalloon29 = 1). RECODE CountNumTrial29 (ELSE=Copy) INTO Blue29. END IF. EXECUTE.

DO IF (MeanWhichBalloon30 = 1). RECODE CountNumTrial30 (ELSE=Copy) INTO Blue30. END IF. EXECUTE.

DO IF (MeanWhichBalloon31 = 1). RECODE CountNumTrial31 (ELSE=Copy) INTO Blue31. END IF. EXECUTE.

DO IF (MeanWhichBalloon32 = 1). RECODE CountNumTrial32 (ELSE=Copy) INTO Blue32. END IF. EXECUTE.

DO IF (MeanWhichBalloon33 = 1). RECODE CountNumTrial33 (ELSE=Copy) INTO Blue33. END IF. EXECUTE.

DO IF (MeanWhichBalloon34 = 1). RECODE CountNumTrial34 (ELSE=Copy) INTO Blue34. END IF. EXECUTE.

DO IF (MeanWhichBalloon35 = 1). RECODE CountNumTrial35 (ELSE=Copy) INTO Blue35. END IF. EXECUTE.

DO IF (MeanWhichBalloon36 = 1). RECODE CountNumTrial36 (ELSE=Copy) INTO Blue36. END IF. EXECUTE.

DO IF (MeanWhichBalloon37 = 1). RECODE CountNumTrial37 (ELSE=Copy) INTO Blue37. END IF. EXECUTE.

DO IF (MeanWhichBalloon38 = 1). RECODE CountNumTrial38 (ELSE=Copy) INTO Blue38. END IF. EXECUTE.

DO IF (MeanWhichBalloon39 = 1). RECODE CountNumTrial39 (ELSE=Copy) INTO Blue39. END IF. EXECUTE.

DO IF (MeanWhichBalloon40 = 1). RECODE CountNumTrial40 (ELSE=Copy) INTO Blue40. END IF. EXECUTE.


  • Similarly, this creates new variables for all of the red ballloons.

DO IF (MeanWhichBalloon1 = 2). RECODE CountNumTrial1 (ELSE=Copy) INTO Red1. END IF. EXECUTE.

DO IF (MeanWhichBalloon2 = 2). RECODE CountNumTrial2 (ELSE=Copy) INTO Red2. END IF. EXECUTE.

DO IF (MeanWhichBalloon3 = 2). RECODE CountNumTrial3 (ELSE=Copy) INTO Red3. END IF. EXECUTE.

DO IF (MeanWhichBalloon4 = 2). RECODE CountNumTrial4 (ELSE=Copy) INTO Red4. END IF. EXECUTE.

DO IF (MeanWhichBalloon5 = 2). RECODE CountNumTrial5 (ELSE=Copy) INTO Red5. END IF. EXECUTE.

DO IF (MeanWhichBalloon6 = 2). RECODE CountNumTrial6 (ELSE=Copy) INTO Red6. END IF. EXECUTE.

DO IF (MeanWhichBalloon7 = 2). RECODE CountNumTrial7 (ELSE=Copy) INTO Red7. END IF. EXECUTE.

DO IF (MeanWhichBalloon8 = 2). RECODE CountNumTrial8 (ELSE=Copy) INTO Red8. END IF. EXECUTE.

DO IF (MeanWhichBalloon9 = 2). RECODE CountNumTrial9 (ELSE=Copy) INTO Red9. END IF. EXECUTE.

DO IF (MeanWhichBalloon10 = 2). RECODE CountNumTrial10 (ELSE=Copy) INTO Red10. END IF. EXECUTE.

DO IF (MeanWhichBalloon11 = 2). RECODE CountNumTrial11 (ELSE=Copy) INTO Red11. END IF. EXECUTE.

DO IF (MeanWhichBalloon12 = 2). RECODE CountNumTrial12 (ELSE=Copy) INTO Red12. END IF. EXECUTE.

DO IF (MeanWhichBalloon13 = 2). RECODE CountNumTrial13 (ELSE=Copy) INTO Red13. END IF. EXECUTE.

DO IF (MeanWhichBalloon14 = 2). RECODE CountNumTrial14 (ELSE=Copy) INTO Red14. END IF. EXECUTE.

DO IF (MeanWhichBalloon15 = 2). RECODE CountNumTrial15 (ELSE=Copy) INTO Red15. END IF. EXECUTE.

DO IF (MeanWhichBalloon16 = 2). RECODE CountNumTrial16 (ELSE=Copy) INTO Red16. END IF. EXECUTE.

DO IF (MeanWhichBalloon17 = 2). RECODE CountNumTrial17 (ELSE=Copy) INTO Red17. END IF. EXECUTE.

DO IF (MeanWhichBalloon18 = 2). RECODE CountNumTrial18 (ELSE=Copy) INTO Red18. END IF. EXECUTE.

DO IF (MeanWhichBalloon19 = 2). RECODE CountNumTrial19 (ELSE=Copy) INTO Red19. END IF. EXECUTE.

DO IF (MeanWhichBalloon20 = 2). RECODE CountNumTrial20 (ELSE=Copy) INTO Red20. END IF. EXECUTE.

DO IF (MeanWhichBalloon21 = 2). RECODE CountNumTrial21 (ELSE=Copy) INTO Red21. END IF. EXECUTE.

DO IF (MeanWhichBalloon22 = 2). RECODE CountNumTrial22 (ELSE=Copy) INTO Red22. END IF. EXECUTE.

DO IF (MeanWhichBalloon23 = 2). RECODE CountNumTrial23 (ELSE=Copy) INTO Red23. END IF. EXECUTE.

DO IF (MeanWhichBalloon24 = 2). RECODE CountNumTrial24 (ELSE=Copy) INTO Red24. END IF. EXECUTE.

DO IF (MeanWhichBalloon25 = 2). RECODE CountNumTrial25 (ELSE=Copy) INTO Red25. END IF. EXECUTE.

DO IF (MeanWhichBalloon26 = 2). RECODE CountNumTrial26 (ELSE=Copy) INTO Red26. END IF. EXECUTE.

DO IF (MeanWhichBalloon27 = 2). RECODE CountNumTrial27 (ELSE=Copy) INTO Red27. END IF. EXECUTE.

DO IF (MeanWhichBalloon28 = 2). RECODE CountNumTrial28 (ELSE=Copy) INTO Red28. END IF. EXECUTE.

DO IF (MeanWhichBalloon29 = 2). RECODE CountNumTrial29 (ELSE=Copy) INTO Red29. END IF. EXECUTE.

DO IF (MeanWhichBalloon30 = 2). RECODE CountNumTrial30 (ELSE=Copy) INTO Red30. END IF. EXECUTE.

DO IF (MeanWhichBalloon31 = 2). RECODE CountNumTrial31 (ELSE=Copy) INTO Red31. END IF. EXECUTE.

DO IF (MeanWhichBalloon32 = 2). RECODE CountNumTrial32 (ELSE=Copy) INTO Red32. END IF. EXECUTE.

DO IF (MeanWhichBalloon33 = 2). RECODE CountNumTrial33 (ELSE=Copy) INTO Red33. END IF. EXECUTE.

DO IF (MeanWhichBalloon34 = 2). RECODE CountNumTrial34 (ELSE=Copy) INTO Red34. END IF. EXECUTE.

DO IF (MeanWhichBalloon35 = 2). RECODE CountNumTrial35 (ELSE=Copy) INTO Red35. END IF. EXECUTE.

DO IF (MeanWhichBalloon36 = 2). RECODE CountNumTrial36 (ELSE=Copy) INTO Red36. END IF. EXECUTE.

DO IF (MeanWhichBalloon37 = 2). RECODE CountNumTrial37 (ELSE=Copy) INTO Red37. END IF. EXECUTE.

DO IF (MeanWhichBalloon38 = 2). RECODE CountNumTrial38 (ELSE=Copy) INTO Red38. END IF. EXECUTE.

DO IF (MeanWhichBalloon39 = 2). RECODE CountNumTrial39 (ELSE=Copy) INTO Red39. END IF. EXECUTE.

DO IF (MeanWhichBalloon40 = 2). RECODE CountNumTrial40 (ELSE=Copy) INTO Red40. END IF. EXECUTE.

  • This makes a variable for the number of pumps for each post-explosion balloon. It is first done for the blue baloons, then for the red.

DO IF (TotalExplodeAtt1 = 1 & MeanWhichBalloon2 = 1). RECODE CountNumTrial2 (ELSE=Copy) INTO afterExpl_2_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt2 = 1 & MeanWhichBalloon3 = 1). RECODE CountNumTrial3 (ELSE=Copy) INTO afterExpl_3_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt3 = 1 & MeanWhichBalloon4 = 1). RECODE CountNumTrial4 (ELSE=Copy) INTO afterExpl_4_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt4 = 1 & MeanWhichBalloon5 = 1). RECODE CountNumTrial5 (ELSE=Copy) INTO afterExpl_5_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt5 = 1 & MeanWhichBalloon6 = 1). RECODE CountNumTrial6 (ELSE=Copy) INTO afterExpl_6_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt6 = 1 & MeanWhichBalloon7 = 1). RECODE CountNumTrial7 (ELSE=Copy) INTO afterExpl_7_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt7 = 1 & MeanWhichBalloon8 = 1). RECODE CountNumTrial8 (ELSE=Copy) INTO afterExpl_8_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt8 = 1 & MeanWhichBalloon9 = 1). RECODE CountNumTrial9 (ELSE=Copy) INTO afterExpl_9_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt9 = 1 & MeanWhichBalloon10 = 1). RECODE CountNumTrial10 (ELSE=Copy) INTO afterExpl_10_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt10 = 1 & MeanWhichBalloon11 = 1). RECODE CountNumTrial11 (ELSE=Copy) INTO afterExpl_11_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt11 = 1 & MeanWhichBalloon12 = 1). RECODE CountNumTrial12 (ELSE=Copy) INTO afterExpl_12_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt12 = 1 & MeanWhichBalloon13 = 1). RECODE CountNumTrial13 (ELSE=Copy) INTO afterExpl_13_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt13 = 1 & MeanWhichBalloon14 = 1). RECODE CountNumTrial14 (ELSE=Copy) INTO afterExpl_14_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt14 = 1 & MeanWhichBalloon15 = 1). RECODE CountNumTrial15 (ELSE=Copy) INTO afterExpl_15_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt15 = 1 & MeanWhichBalloon16 = 1). RECODE CountNumTrial16 (ELSE=Copy) INTO afterExpl_16_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt16 = 1 & MeanWhichBalloon17 = 1). RECODE CountNumTrial17 (ELSE=Copy) INTO afterExpl_17_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt17 = 1 & MeanWhichBalloon18 = 1). RECODE CountNumTrial18 (ELSE=Copy) INTO afterExpl_18_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt18 = 1 & MeanWhichBalloon19 = 1). RECODE CountNumTrial19 (ELSE=Copy) INTO afterExpl_19_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt19 = 1 & MeanWhichBalloon20 = 1). RECODE CountNumTrial20 (ELSE=Copy) INTO afterExpl_20_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt20 = 1 & MeanWhichBalloon21 = 1). RECODE CountNumTrial21 (ELSE=Copy) INTO afterExpl_21_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt21 = 1 & MeanWhichBalloon22 = 1). RECODE CountNumTrial22 (ELSE=Copy) INTO afterExpl_22_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt22 = 1 & MeanWhichBalloon23 = 1). RECODE CountNumTrial23 (ELSE=Copy) INTO afterExpl_23_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt23 = 1 & MeanWhichBalloon24 = 1). RECODE CountNumTrial24 (ELSE=Copy) INTO afterExpl_24_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt24 = 1 & MeanWhichBalloon25 = 1). RECODE CountNumTrial25 (ELSE=Copy) INTO afterExpl_25_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt25 = 1 & MeanWhichBalloon26 = 1). RECODE CountNumTrial26 (ELSE=Copy) INTO afterExpl_26_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt26 = 1 & MeanWhichBalloon27 = 1). RECODE CountNumTrial27 (ELSE=Copy) INTO afterExpl_27_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt27 = 1 & MeanWhichBalloon28 = 1). RECODE CountNumTrial28 (ELSE=Copy) INTO afterExpl_28_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt28 = 1 & MeanWhichBalloon29 = 1). RECODE CountNumTrial29 (ELSE=Copy) INTO afterExpl_29_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt29 = 1 & MeanWhichBalloon30 = 1). RECODE CountNumTrial30 (ELSE=Copy) INTO afterExpl_30_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt30 = 1 & MeanWhichBalloon31 = 1). RECODE CountNumTrial31 (ELSE=Copy) INTO afterExpl_31_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt31 = 1 & MeanWhichBalloon32 = 1). RECODE CountNumTrial32 (ELSE=Copy) INTO afterExpl_32_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt32 = 1 & MeanWhichBalloon33 = 1). RECODE CountNumTrial33 (ELSE=Copy) INTO afterExpl_33_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt33 = 1 & MeanWhichBalloon34 = 1). RECODE CountNumTrial34 (ELSE=Copy) INTO afterExpl_34_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt34 = 1 & MeanWhichBalloon35 = 1). RECODE CountNumTrial35 (ELSE=Copy) INTO afterExpl_35_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt35 = 1 & MeanWhichBalloon36 = 1). RECODE CountNumTrial36 (ELSE=Copy) INTO afterExpl_36_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt36 = 1 & MeanWhichBalloon37 = 1). RECODE CountNumTrial37 (ELSE=Copy) INTO afterExpl_37_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt37 = 1 & MeanWhichBalloon38 = 1). RECODE CountNumTrial38 (ELSE=Copy) INTO afterExpl_38_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt38 = 1 & MeanWhichBalloon39 = 1). RECODE CountNumTrial39 (ELSE=Copy) INTO afterExpl_39_Blue. END IF. EXECUTE.

DO IF (TotalExplodeAtt39 = 1 & MeanWhichBalloon40 = 1). RECODE CountNumTrial40 (ELSE=Copy) INTO afterExpl_40_Blue. END IF. EXECUTE.

  • This is the post-explosion variable for red balloons.

DO IF (TotalExplodeAtt1 = 1 & MeanWhichBalloon2 = 2). RECODE CountNumTrial2 (ELSE=Copy) INTO afterExpl_2_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt2 = 1 & MeanWhichBalloon3 = 2). RECODE CountNumTrial3 (ELSE=Copy) INTO afterExpl_3_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt3 = 1 & MeanWhichBalloon4 = 2). RECODE CountNumTrial4 (ELSE=Copy) INTO afterExpl_4_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt4 = 1 & MeanWhichBalloon5 = 2). RECODE CountNumTrial5 (ELSE=Copy) INTO afterExpl_5_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt5 = 1 & MeanWhichBalloon6 = 2). RECODE CountNumTrial6 (ELSE=Copy) INTO afterExpl_6_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt6 = 1 & MeanWhichBalloon7 = 2). RECODE CountNumTrial7 (ELSE=Copy) INTO afterExpl_7_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt7 = 1 & MeanWhichBalloon8 = 2). RECODE CountNumTrial8 (ELSE=Copy) INTO afterExpl_8_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt8 = 1 & MeanWhichBalloon9 = 2). RECODE CountNumTrial9 (ELSE=Copy) INTO afterExpl_9_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt9 = 1 & MeanWhichBalloon10 = 2). RECODE CountNumTrial10 (ELSE=Copy) INTO afterExpl_10_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt10 = 1 & MeanWhichBalloon11 = 2). RECODE CountNumTrial11 (ELSE=Copy) INTO afterExpl_11_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt11 = 1 & MeanWhichBalloon12 = 2). RECODE CountNumTrial12 (ELSE=Copy) INTO afterExpl_12_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt12 = 1 & MeanWhichBalloon13 = 2). RECODE CountNumTrial13 (ELSE=Copy) INTO afterExpl_13_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt13 = 1 & MeanWhichBalloon14 = 2). RECODE CountNumTrial14 (ELSE=Copy) INTO afterExpl_14_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt14 = 1 & MeanWhichBalloon15 = 2). RECODE CountNumTrial15 (ELSE=Copy) INTO afterExpl_15_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt15 = 1 & MeanWhichBalloon16 = 2). RECODE CountNumTrial16 (ELSE=Copy) INTO afterExpl_16_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt16 = 1 & MeanWhichBalloon17 = 2). RECODE CountNumTrial17 (ELSE=Copy) INTO afterExpl_17_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt17 = 1 & MeanWhichBalloon18 = 2). RECODE CountNumTrial18 (ELSE=Copy) INTO afterExpl_18_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt18 = 1 & MeanWhichBalloon19 = 2). RECODE CountNumTrial19 (ELSE=Copy) INTO afterExpl_19_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt19 = 1 & MeanWhichBalloon20 = 2). RECODE CountNumTrial20 (ELSE=Copy) INTO afterExpl_20_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt20 = 1 & MeanWhichBalloon21 = 2). RECODE CountNumTrial21 (ELSE=Copy) INTO afterExpl_21_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt21 = 1 & MeanWhichBalloon22 = 2). RECODE CountNumTrial22 (ELSE=Copy) INTO afterExpl_22_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt22 = 1 & MeanWhichBalloon23 = 2). RECODE CountNumTrial23 (ELSE=Copy) INTO afterExpl_23_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt23 = 1 & MeanWhichBalloon24 = 2). RECODE CountNumTrial24 (ELSE=Copy) INTO afterExpl_24_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt24 = 1 & MeanWhichBalloon25 = 2). RECODE CountNumTrial25 (ELSE=Copy) INTO afterExpl_25_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt25 = 1 & MeanWhichBalloon26 = 2). RECODE CountNumTrial26 (ELSE=Copy) INTO afterExpl_26_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt26 = 1 & MeanWhichBalloon27 = 2). RECODE CountNumTrial27 (ELSE=Copy) INTO afterExpl_27_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt27 = 1 & MeanWhichBalloon28 = 2). RECODE CountNumTrial28 (ELSE=Copy) INTO afterExpl_28_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt28 = 1 & MeanWhichBalloon29 = 2). RECODE CountNumTrial29 (ELSE=Copy) INTO afterExpl_29_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt29 = 1 & MeanWhichBalloon30 = 2). RECODE CountNumTrial30 (ELSE=Copy) INTO afterExpl_30_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt30 = 1 & MeanWhichBalloon31 = 2). RECODE CountNumTrial31 (ELSE=Copy) INTO afterExpl_31_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt31 = 1 & MeanWhichBalloon32 = 2). RECODE CountNumTrial32 (ELSE=Copy) INTO afterExpl_32_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt32 = 1 & MeanWhichBalloon33 = 2). RECODE CountNumTrial33 (ELSE=Copy) INTO afterExpl_33_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt33 = 1 & MeanWhichBalloon34 = 2). RECODE CountNumTrial34 (ELSE=Copy) INTO afterExpl_34_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt34 = 1 & MeanWhichBalloon35 = 2). RECODE CountNumTrial35 (ELSE=Copy) INTO afterExpl_35_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt35 = 1 & MeanWhichBalloon36 = 2). RECODE CountNumTrial36 (ELSE=Copy) INTO afterExpl_36_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt36 = 1 & MeanWhichBalloon37 = 2). RECODE CountNumTrial37 (ELSE=Copy) INTO afterExpl_37_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt37 = 1 & MeanWhichBalloon38 = 2). RECODE CountNumTrial38 (ELSE=Copy) INTO afterExpl_38_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt38 = 1 & MeanWhichBalloon39 = 2). RECODE CountNumTrial39 (ELSE=Copy) INTO afterExpl_39_Red. END IF. EXECUTE.

DO IF (TotalExplodeAtt39 = 1 & MeanWhichBalloon40 = 2). RECODE CountNumTrial40 (ELSE=Copy) INTO afterExpl_40_Red. END IF. EXECUTE.

BART Create Primary Variables syntax only after missing variables have been defined.

  • !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Make sure to set -9998 as missing in SPSS for each variable in the dataset before you do the following total calculations!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
  • This calculates total adjusted pumps for all trials that were not explosions (remember to define missing values beforehand for each CountNumTrial).

COMPUTE TotalAdjustedPumps=SUM (CountNumTrial1 , CountNumTrial10 , CountNumTrial11 , CountNumTrial12 ,

CountNumTrial13 , CountNumTrial14 , CountNumTrial15 , CountNumTrial16 , CountNumTrial17 , 
 CountNumTrial18 , CountNumTrial19 , CountNumTrial2 , CountNumTrial20 , CountNumTrial21 , 
   CountNumTrial22 , CountNumTrial23 , CountNumTrial24 , CountNumTrial25 , CountNumTrial26 , 
   CountNumTrial27 , CountNumTrial28 , CountNumTrial29 , CountNumTrial3 , CountNumTrial30 , 
   CountNumTrial31 , CountNumTrial32 , CountNumTrial33 , CountNumTrial34 , CountNumTrial35 , 
   CountNumTrial36 , CountNumTrial37 , CountNumTrial38 , CountNumTrial39 , CountNumTrial4 , 
   CountNumTrial40 , CountNumTrial5 , CountNumTrial6 , CountNumTrial7 , CountNumTrial8 , 
   CountNumTrial9).

EXECUTE.

  • This calculates mean adjusted pumps for all trials that were not explosions (remember to define missing values beforehand for each CountNumTrial).

COMPUTE MeanAdjustedPumps=Mean (CountNumTrial1 , CountNumTrial10 , CountNumTrial11 , CountNumTrial12 ,

   CountNumTrial13 , CountNumTrial14 , CountNumTrial15 , CountNumTrial16 , CountNumTrial17 , 
   CountNumTrial18 , CountNumTrial19 , CountNumTrial2 , CountNumTrial20 , CountNumTrial21 , 
   CountNumTrial22 , CountNumTrial23 , CountNumTrial24 , CountNumTrial25 , CountNumTrial26 , 
   CountNumTrial27 , CountNumTrial28 , CountNumTrial29 , CountNumTrial3 , CountNumTrial30 , 
   CountNumTrial31 , CountNumTrial32 , CountNumTrial33 , CountNumTrial34 , CountNumTrial35 , 
   CountNumTrial36 , CountNumTrial37 , CountNumTrial38 , CountNumTrial39 , CountNumTrial4 , 
   CountNumTrial40 , CountNumTrial5 , CountNumTrial6 , CountNumTrial7 , CountNumTrial8 , 
   CountNumTrial9).

EXECUTE.

  • This calculates the mean blue adjusted pumps.

COMPUTE MeanBlueAdjustedPumps=mean (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,

   Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,
   Blue25,Blue26,Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,
   Blue39,Blue40).

EXECUTE.

  • This calculates the mean red adjusted pumps.

COMPUTE MeanRedAdjustedPumps=mean (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,

   Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,
   Red25,Red26,Red27,Red28,Red29,Red30,Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,
   Red39,Red40).

EXECUTE.

  • This calculates the total blue adjusted pumps.

COMPUTE TotalBlueAdjustedPumps=SUM (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,

   Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,
   Blue25,Blue26,Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,
   Blue39,Blue40).

EXECUTE.

  • This calculates the total red adjusted pumps.

COMPUTE TotalRedAdjustedPumps=SUM (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,

   Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,
   Red25,Red26,Red27,Red28,Red29,Red30,Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,
   Red39,Red40).

EXECUTE.


  • This computes the mean adjusted pumps for each quartile (1-10, 11-20, 21-30, 31-40) for the blue balloons.

COMPUTE Quart1BlueAdjustedPumps=Mean (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10). EXECUTE.

COMPUTE Quart2BlueAdjustedPumps= Mean (Blue11,Blue12,Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20). EXECUTE.

COMPUTE Quart3BlueAdjustedPumps= Mean (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,Blue27,Blue28,Blue29,Blue30). EXECUTE.

COMPUTE Quart4BlueAdjustedPumps= Mean (Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40). EXECUTE.

  • This computes the mean adjusted pumps for each quartile (1-10, 11-20, 21-30, 31-40) for the red balloons.

COMPUTE Quart1RedAdjustedPumps=Mean (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10). EXECUTE.

COMPUTE Quart2RedAdjustedPumps= Mean (Red11,Red12,Red13,Red14,Red15,Red16,Red17,Red18,Red19,Red20). EXECUTE.

COMPUTE Quart3RedAdjustedPumps= Mean (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30). EXECUTE.

COMPUTE Quart4RedAdjustedPumps= Mean (Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40). EXECUTE.


  • This calculates the mean post-explosion pumps for the blue balloons.

COMPUTE MeanBlueAfterExpl=mean (afterExpl_2_Blue,afterExpl_3_Blue,afterExpl_4_Blue,afterExpl_5_Blue,

   afterExpl_6_Blue,afterExpl_7_Blue,afterExpl_8_Blue,afterExpl_9_Blue,afterExpl_10_Blue,
   afterExpl_11_Blue,afterExpl_12_Blue,afterExpl_13_Blue,afterExpl_14_Blue,afterExpl_15_Blue,
   afterExpl_16_Blue,afterExpl_17_Blue,afterExpl_18_Blue,afterExpl_19_Blue,afterExpl_20_Blue, afterExpl_21_Blue,
   afterExpl_22_Blue,afterExpl_23_Blue,afterExpl_24_Blue,afterExpl_25_Blue,afterExpl_26_Blue,
   afterExpl_27_Blue,afterExpl_28_Blue,afterExpl_29_Blue,afterExpl_30_Blue,afterExpl_31_Blue,
   afterExpl_32_Blue,afterExpl_33_Blue,afterExpl_34_Blue,afterExpl_35_Blue,afterExpl_36_Blue,
   afterExpl_37_Blue,afterExpl_38_Blue,afterExpl_39_Blue,afterExpl_40_Blue).

EXECUTE.

  • This calculates the mean post-explosion pumps for red balloons.

COMPUTE MeanRedAfterExpl=mean (afterExpl_2_Red,afterExpl_3_Red,afterExpl_4_Red,afterExpl_5_Red,

   afterExpl_6_Red,afterExpl_7_Red,afterExpl_8_Red,afterExpl_9_Red,afterExpl_10_Red,afterExpl_11_Red,
   afterExpl_12_Red,afterExpl_13_Red,afterExpl_14_Red,afterExpl_15_Red,afterExpl_16_Red,
   afterExpl_17_Red,afterExpl_18_Red,afterExpl_19_Red,afterExpl_20_Red,afterExpl_21_Red,
   afterExpl_22_Red,afterExpl_23_Red,afterExpl_24_Red,afterExpl_25_Red,afterExpl_26_Red,
   afterExpl_27_Red,afterExpl_28_Red,afterExpl_29_Red,afterExpl_30_Red,afterExpl_31_Red,
   afterExpl_32_Red,afterExpl_33_Red,afterExpl_34_Red,afterExpl_35_Red,afterExpl_36_Red,
   afterExpl_37_Red,afterExpl_38_Red,afterExpl_39_Red,afterExpl_40_Red).

EXECUTE.

  • This calculates the ratio between mean adjusted red pumps to blue pumps, higher numbers mean the pumps are similar for the two colors.

COMPUTE RatioMeanRedtoBlueAdjPumps=MeanRedAdjustedPumps / MeanBlueAdjustedPumps. EXECUTE.


  • Compute Standard Deviation of Blue Pumps in balloons that didn't explode

COMPUTE SDofBlueBART=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,Blue11,Blue12,

   Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20,Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,
   Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).

EXECUTE.

  • Compute Standard Deviation of Red Pumps in balloons that didn't explode


COMPUTE SDofRedBART=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,Red11,Red12,Red13,Red14,

   Red15,Red16,Red17,Red18,Red19,Red20,Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30,
   Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).

EXECUTE.

  • Compute standard deviation of blue pumps after explosions*

COMPUTE SDofBlueAfterExplosions=Sd (afterExpl_2_Blue,afterExpl_3_Blue,afterExpl_4_Blue,

   afterExpl_5_Blue,afterExpl_6_Blue,afterExpl_7_Blue,afterExpl_8_Blue,afterExpl_9_Blue,
   afterExpl_10_Blue,afterExpl_11_Blue,afterExpl_12_Blue,afterExpl_13_Blue,afterExpl_14_Blue,
   afterExpl_15_Blue,afterExpl_16_Blue,afterExpl_17_Blue,afterExpl_18_Blue,afterExpl_19_Blue,
   afterExpl_20_Blue,afterExpl_21_Blue,afterExpl_22_Blue,afterExpl_23_Blue,afterExpl_24_Blue,
   afterExpl_25_Blue,afterExpl_26_Blue,afterExpl_27_Blue,afterExpl_28_Blue,afterExpl_29_Blue,
   afterExpl_30_Blue,afterExpl_31_Blue,afterExpl_32_Blue,afterExpl_33_Blue,afterExpl_34_Blue,
   afterExpl_35_Blue,afterExpl_36_Blue,afterExpl_37_Blue,afterExpl_38_Blue,afterExpl_39_Blue,
   afterExpl_40_Blue).

EXECUTE.

  • compute standard deviation of red pumps after explosions

COMPUTE SDofRedAfterExplosions=Sd (afterExpl_2_Red,afterExpl_3_Red,afterExpl_4_Red,afterExpl_5_Red,

   afterExpl_6_Red,afterExpl_7_Red,afterExpl_8_Red,afterExpl_9_Red,afterExpl_10_Red,afterExpl_11_Red,
   afterExpl_12_Red,afterExpl_13_Red,afterExpl_14_Red,afterExpl_15_Red,afterExpl_16_Red,
   afterExpl_17_Red,afterExpl_18_Red,afterExpl_19_Red,afterExpl_20_Red,afterExpl_21_Red,
   afterExpl_22_Red,afterExpl_23_Red,afterExpl_24_Red,afterExpl_25_Red,afterExpl_26_Red,
   afterExpl_27_Red,afterExpl_28_Red,afterExpl_29_Red,afterExpl_30_Red,afterExpl_31_Red,
   afterExpl_32_Red,afterExpl_33_Red,afterExpl_34_Red,afterExpl_35_Red,afterExpl_36_Red,
   afterExpl_37_Red,afterExpl_38_Red,afterExpl_39_Red,afterExpl_40_Red).

EXECUTE.


  • Compute the standard deviations of the blue quartiles


COMPUTE SDofBlue1=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10). EXECUTE.


COMPUTE SDofBlue2=Sd (Blue11,Blue12,

   Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20).

EXECUTE.


COMPUTE SDofBlue3=Sd (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,

   Blue27,Blue28,Blue29,Blue30).

EXECUTE.


COMPUTE SDofBlue4=Sd (Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40). EXECUTE.

  • Compute the standard deviations of the red quartiles

COMPUTE SDofRed1=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10). EXECUTE .

COMPUTE SDofRed2=Sd (Red11,Red12,Red13,Red14,

   Red15,Red16,Red17,Red18,Red19,Red20).

EXECUTE .

COMPUTE SDofRed3=Sd (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30). EXECUTE .

COMPUTE SDofRed4=Sd (

   Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).

EXECUTE.

  • Compute standard deviations for blue and red balloons on first and second half of test


COMPUTE SDofBlue1stHalf=Sd (Blue1,Blue2,Blue3,Blue4,Blue5,Blue6,Blue7,Blue8,Blue9,Blue10,Blue11,Blue12,

   Blue13,Blue14,Blue15,Blue16,Blue17,Blue18,Blue19,Blue20).

EXECUTE.

COMPUTE SDofBlue2ndHalf=Sd (Blue21,Blue22,Blue23,Blue24,Blue25,Blue26,

   Blue27,Blue28,Blue29,Blue30,Blue31,Blue32,Blue33,Blue34,Blue35,Blue36,Blue37,Blue38,Blue39,Blue40).

EXECUTE.

COMPUTE SDofRed1stHalf=Sd (Red1,Red2,Red3,Red4,Red5,Red6,Red7,Red8,Red9,Red10,Red11,Red12,Red13,Red14,

   Red15,Red16,Red17,Red18,Red19,Red20).

EXECUTE.

COMPUTE SDofRed2ndHalf=Sd (Red21,Red22,Red23,Red24,Red25,Red26,Red27,Red28,Red29,Red30,

   Red31,Red32,Red33,Red34,Red35,Red36,Red37,Red38,Red39,Red40).

EXECUTE.

  • This calculates total explosions

COMPUTE TotalExplosions=SUM (TotalExplodeAtt1, TotalExplodeAtt2,TotalExplodeAtt3,TotalExplodeAtt4,TotalExplodeAtt5, TotalExplodeAtt6,TotalExplodeAtt7,TotalExplodeAtt8,TotalExplodeAtt9,TotalExplodeAtt10,TotalExplodeAtt11,TotalExplodeAtt12,TotalExplodeAtt13,TotalExplodeAtt14, TotalExplodeAtt15,TotalExplodeAtt16,TotalExplodeAtt17,TotalExplodeAtt18,TotalExplodeAtt19,TotalExplodeAtt20,TotalExplodeAtt21,TotalExplodeAtt22,TotalExplodeAtt23, TotalExplodeAtt24,TotalExplodeAtt25,TotalExplodeAtt26,TotalExplodeAtt27,TotalExplodeAtt28,TotalExplodeAtt29,TotalExplodeAtt30,TotalExplodeAtt31,TotalExplodeAtt32, TotalExplodeAtt33,TotalExplodeAtt34,TotalExplodeAtt35,TotalExplodeAtt36,TotalExplodeAtt37,TotalExplodeAtt38,TotalExplodeAtt39,TotalExplodeAtt40). EXECUTE.


  • Compute the SD of blue pumps divided by the mean adjusted blue pumps

COMPUTE SDblueByMeanBlue=SDofBlueBART / MeanBlueAdjustedPumps. EXECUTE.

  • Compute the SD of red pumps divided by the mean adjusted red pumps

COMPUTE SDredByMeanRed=SDofRedBART / MeanRedAdjustedPumps. EXECUTE.

Text file scoring method

TableName = "Qry_BART_Compute3"

               Dim aryScore(31)
               for s = 1 to ubound(aryScore)
                               aryScore(s) = null
               next


               kk = 1
               ' ===============================================================================================
               ' TotalAdjustedPumps: adjusted pumps for all balloons for whole task.
               ' ===============================================================================================
               strSQL = "SELECT sum(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("SumValue")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' MeanAdjustedPumps: mean adjusted pumps for all balloons for whole task.
               ' ===============================================================================================
               strSQL = "SELECT subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(CountTrials) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               TotalRec = ers.recordcount


               strSQL = "SELECT sum(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
               else
                               aryScore(kk) = null
               end if
               MeanAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' SDAdjustedPumps: mean adjusted pumps for all balloons for whole task.
               ' ===============================================================================================
               strSQL = "SELECT STDEV(CountTrials) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(CountTrials) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("SumValue")
               else
                               aryScore(kk) = null
               end if
               SDAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' MeanRedAdjustedPumps: mean adjusted pumps for red balloons.
               ' ===============================================================================================
               strSQL = "SELECT subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Red) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               TotalRec = ers.recordcount


               strSQL = "SELECT sum(Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
               else
                               aryScore(kk) = null
               end if
               MeanRedAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' SDRedAdjustedPumps: mean adjusted pumps for red balloons.
               ' ===============================================================================================
               strSQL = "SELECT STDEV(Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Red) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("SumValue")
               else
                               aryScore(kk) = null
               end if
               SDRedAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' MeanBlueAdjustedPumps: mean adjusted pumps for blue balloons.
               ' ===============================================================================================
               strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Blue) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               TotalRec = ers.recordcount


               strSQL = "SELECT sum(Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
               else
                               aryScore(kk) = null
               end if
               MeanBlueAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' SDBlueAdjustedPumps: mean adjusted pumps for blue balloons.
               ' ===============================================================================================
               strSQL = "SELECT STDEV(Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID & " and len(Blue) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("SumValue")
               else
                               aryScore(kk) = null
               end if
               SDBlueAdjustedPumps = aryScore(kk)
               kk = kk + 1


               ' ===============================================================================================
               ' RatioMeanRedtoBlueAdjPumps: mean red adjusted pumps/mean blue adjusted pumps.
               ' ===============================================================================================
               if (isnull(MeanRedAdjustedPumps) = false and isnull(MeanBlueAdjustedPumps) = false and MeanBlueAdjustedPumps <> 0) then
                               aryScore(kk) = MeanRedAdjustedPumps/MeanBlueAdjustedPumps
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Quart Adjusted Pumps: mean of the adjusted pumps of the red/blue balloons on trials 1-10, 11-20, 21-30, 31-40.
               ' ===============================================================================================
               for i = 1 to 2
                               if (i = 1) then
                                               BLN = "Red"
                               else
                                               BLN = "Blue"
                               end if
                               for j = 1 to 4
                                               StartN = (10 * (j-1)) + 1
                                               EndN = 10 * j
                                               strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(" & Bln & ") > 0"
                                               strSQL = strSQL & " and Trial >= " & StartN & " and Trial <= " & EndN
                                               Set ers = Server.CreateObject("ADODB.Recordset")
                                               ers.Open strSQL, DataConn, adOpenStatic
                                               TotalRec = ers.recordcount


                                               strSQL = "SELECT sum(" & BLN & ") as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
                                               strSQL = strSQL & " and Trial >= " & StartN & " and Trial <= " & EndN
                                               Set ers = Server.CreateObject("ADODB.Recordset")
                                               ers.Open strSQL, DataConn, adOpenStatic
                                               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                                                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
                                               else
                                                               aryScore(kk) = null
                                               end if
                                               kk = kk + 1
                               next
               next


               ' ===============================================================================================
               ' MeanRedAfterExpl: mean adjusted pumps on red balloons immediately after an explosion on the preceding trial.
               ' ===============================================================================================
               strSQL = "SELECT [Subject] FROM " & TableName & " where [Subject]=" & SubjectID & " and len(AfterExpl_Red) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               'response.write strSQL
               'response.flush
               ers.Open strSQL, DataConn, adOpenStatic
               TotalRec = ers.recordcount


               strSQL = "SELECT sum(AfterExpl_Red) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' MeanBlueAfterExpl: mean adjusted pumps on blue balloons immediately after an explosion on the preceding trial.
               ' ===============================================================================================
               strSQL = "SELECT Subject FROM " & TableName & " where [Subject]=" & SubjectID & " and len(AfterExpl_Blue) > 0"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               TotalRec = ers.recordcount


               strSQL = "SELECT sum(AfterExpl_Blue) as SumValue FROM " & TableName & " where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof and TotalRec <> 0 and isnull(ers("SumValue")) = false then
                               aryScore(kk) = formatnumber(ers("SumValue")/TotalRec, 2)
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' TotalPoints[Session]: total points earned on the task
               ' ===============================================================================================
               strSQL = "SELECT TotalPointsSession FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("TotalPointsSession")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Mean StimulusRT
               ' ===============================================================================================
               strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("MeanValue")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Median StimulusRT
               ' ===============================================================================================
               sSQL = "SELECT * FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and StimulusRT is not null order by StimulusRT"
               aryScore(kk) = RunSQL_MEDIAN(sSQL,"StimulusRT")
               kk = kk + 1


               ' ===============================================================================================
               ' SD StimulusRT
               ' ===============================================================================================
               strSQL = "SELECT STDEV(StimulusRT) as STDDEV FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("STDDEV")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' MeanRTRed: Mean RT on all red balloon presses (i.e., red balloon pumps and cashouts)
               ' ===============================================================================================
               strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and PickBalloon='Red'"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("MeanValue")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' MeanRTBlue: Mean RT on all blue balloon presses (i.e., blue balloon pumps and cashouts)
               ' ===============================================================================================
               strSQL = "SELECT avg(cast(StimulusRT as float)) as MeanValue FROM Qry_BART_TRIAL_Raw where [Subject]=" & SubjectID & " and PickBalloon='Blue'"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("MeanValue")
               else
                               aryScore(kk) = null
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' RedExplosions: Total number of Red balloon explosions
               ' ===============================================================================================
               strSQL = "SELECT SUM(TotalExplodeAtt) as RedExplosions from Qry_BART_Compute3 where [Subject]=" & SubjectID & " and PickBalloon='Red'"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("RedExplosions")
               else
                               aryScore(kk) = 0
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' BlueExplosions: Total number of Blue balloon explosions
               ' ===============================================================================================
               strSQL = "SELECT SUM(TotalExplodeAtt) as BlueExplosions from Qry_BART_Compute3 where [Subject]=" & SubjectID & " and PickBalloon='Blue'"
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if not ers.eof then
                               aryScore(kk) = ers("BlueExplosions")
               else
                               aryScore(kk) = 0
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Coefficient of Variation: SDAdjustedPumps  / MeanAdjustedPumps
               ' ===============================================================================================
               if (isnull(SDAdjustedPumps) = true or isnull(MeanAdjustedPumps) = true or MeanAdjustedPumps = 0) then
                               aryScore(kk) = null
               else
                               aryScore(kk) = SDAdjustedPumps / MeanAdjustedPumps
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Coefficient of Variation- red balloons: SDRedAdjustedPumps / MeanRedAdjustedPumps
               ' ===============================================================================================
               if (isnull(SDRedAdjustedPumps) = true or isnull(MeanRedAdjustedPumps) = true or MeanRedAdjustedPumps = 0) then
                               aryScore(kk) = null
               else
                               aryScore(kk) = SDRedAdjustedPumps / MeanRedAdjustedPumps
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Coefficient of Variation- blue balloons: SDBlueAdjustedPumps / MeanBlueAdjustedPumps
               ' ===============================================================================================
               if (isnull(SDBlueAdjustedPumps) = true or isnull(MeanBlueAdjustedPumps) = true or MeanBlueAdjustedPumps = 0) then
                               aryScore(kk) = null
               else
                               aryScore(kk) = SDBlueAdjustedPumps / MeanBlueAdjustedPumps
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' TotalPumps
               ' ===============================================================================================
               strSQL = "SELECT max(Trial) as MaxTrial FROM ePrime_BART where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if ers.eof then
                               aryScore(kk) = 0
               else
                               aryScore(kk) = ers("MaxTrial")
               end if
               kk = kk + 1


               ' ===============================================================================================
               ' Cash out Without Pump
               ' ===============================================================================================
               strSQL = "SELECT * FROM Qry_BART_CashoutWoPump where [Subject]=" & SubjectID
               Set ers = Server.CreateObject("ADODB.Recordset")
               ers.Open strSQL, DataConn, adOpenStatic
               if ers.eof then
                               aryScore(kk) = 0
               else
                               aryScore(kk) = ers.recordcount
               end if



History of Checking Scoring

  • Andy Dean independently checked Stone’s results in 2009 and 2010 and found his results to be accurate.
  • In April 2011, Andy Dean and Eugene Oh checked Stone’s results a second time. All results were accurate, except for two issues. 1) The BART_RatioMeanRedtoBlueAdjPumps variable was being scored incorrectly by Stone’s script. He fixed this error and it is now identical to that determined independently. 2) The BART_TotalPointsSession variable (the total points earned over the task) was found to be inconsistent with adjusted pumps. While this variable should be the total adjusted pumps multiplied by 5, in many cases it was not. This was determined to be an error in the calculation of explosion trials. In the eprime program, if the participant presses the “cashout” key at the exact same time that the explosion algorithm indicates the balloon should explode, that trial is still coded as an explosion in the explosion column (ExplodeAtt = 1), but it is correctly NOT coded as an explosion in the calculation of points earned (the presentation to the participant is also correct). Thus, when using the ExplodeAtt variable to determine which balloons actually exploded, the variable needs to be adjusted so that cashouts which occurred instantaneously with ExplodeAtt = 1 are NOT considered explosion trials (this calculation must also account for the participant’s handedness which determines which key is used for cashouts and pumping). In June and July 2011 Andy Dean worked with Stone and the CNP scoring script is now correct.
  • In July 2011 Andy Dean worked with Stone to add variables which computed how many trials were completed by the subject (BART_TRIALCOMP) and how many times the participant cashed out without pumping at all (BART_CASHOUTWOPUMP). These variables can be used to exclude potentially problematic particpants.
  • In July 2011 Andy Dean found that a handful of participants had data that was outside the range of possibility on the task (e.g., more explosions than possible, more mean pumps than possible, etc.). Stone Shih determined that this was due to duplicate data for these and other cases. The following LA2K participants had duplicate data removed from the system in July 2011: 10421, 10445, 10478, 10484, 10506, 10566, 10575, 10595, 10668.
  • In May 2012 Andy Dean found an error in which, for a subset of participants (N ~ 236), the Trials Completed variable = 1, even though other variables (e.g., pumps, number of explosions) suggested that the task was completed (in which case Trials Completed should = 40). Andy worked with Stone Shih and they determined it was a coding error. This error was fixed.
  • In June 2012 Andy Dean produced the figures and tables below and found all results to be accurate.

Data Distributions

Frequency of cashing out without pumping

NoPumps.png

The following data consists of healthy control subjects who completed the study, were not flagged, completed the BART, and had fewer than 3 cashouts without pumping

AdjBoth.png

BlueRedHisto1.png

Traject.png

Negative relationship between age and mean adjusted pumps (both balloons)

AgeB.png

Positive relationship between education and mean adjusted pumps (both balloons)

EduB.png

Women tend to pump less than men (p = .000)

GenderB.png

Hispanic participants tend to pump less than Non-Hispanic participants (p = .000)

HispanicB.png

References

Dean, AC, Sugar, C, Hellemann, G, & London, E (2011) Is all risk bad? Young adult cigarette smokers fail to take adaptive risk in a laboratory decision-making test. Psychopharmacology [Epub ahead of print]

Jentsch JD, Woods JA, Groman SM, Seu E (2010) Behavioral characteristics and neural mechanisms mediating performance in a rodent version of the Balloon Analog Risk Task. Neuropsychopharmacology 35: 1797-806

Lejuez CW, Aklin WM, Jones HA, Richards JB, Strong DR, Kahler CW, Read JP (2003) The Balloon Analogue Risk Task (BART) differentiates smokers and nonsmokers. Exp Clin Psychopharmacol 11: 26-33

Lejuez CW, Read JP, Kahler CW, Richards JB, Ramsey SE, Stuart GL, Strong DR, Brown RA (2002) Evaluation of a behavioral measure of risk taking: the Balloon Analogue Risk Task (BART). J Exp Psychol Appl 8: 75-84

Pleskac TJ, Wallsten TS, Wang P, Lejuez CW (2008) Development of an automatic response mode to improve the clinical utility of sequential risk-taking tasks. Exp Clin Psychopharmacol 16: 555-64

Wallsten TS, Pleskac TJ, Lejuez CW (2005) Modeling behavior in a clinically diagnostic sequential risk-taking task. Psychol Rev 112: 862-80

go back to HTAC