From Pheno Wiki
Jump to: navigation, search

go back to HTAC



This task is a "go/no-go" continuous performance task requiring subjects to rapidly discriminate between two classes of stimuli and to respond in one condition while withholding responses in the other condition. It is similar to Conners' “CPT-II” in which the two conditions are defined by letter stimuli: the "go" condition is associated with any letter other than "X" (non-X trials), while the "no-go" condition is associated with the letter "X" (X trials). The majority (90%) of trials are "go" (non-X) trials, establishing a "prepotent" tendency to respond, and thus presumably making errors in the "no-go" condition (only 10% of trials) more likely, particularly among individuals who have difficulty withholding inappropriate responses.

Task Design

There are 18 blocks, 20 trials/block, yielding a total of 360 trials. The 18 blocks comprise 6 blocks each containing trials at one of three inter-trial intervals (ITIs): 1000, 2000, or 4000 ms. The order of the 18 blocks is randomized. Within each block there are two "X" trials, and 18 non-X trials. The first 2 trials of any block cannot be "X" trials. The entire task thus involves 36 "X" trials ("no-go") and 324 "non-X" trials ("go").

Each trial involves presentation of a single letter in the center of the computer screen. Letters are size 80 with Arial bold font. The subject is instructed to press and release the "down-arrow" key as quickly as they can after viewing each letter. However, when presented the letter “X” they are instructed not to press the key or make any type of response. The other possible letters are A, B, C, D, F, I, L, O, and T.

Each letter is presented for 250 ms, leaving either 750, 1750, or 3750 ms of remainder response time depending on the ISI for that trial.

There is a brief practice of 10 trials from the 2000 ms ISI type. Only one “X” trial is presented in this practice period.

The entire task runs for ~14.5 minutes.

Cleaning Rules

- Overall task accuracy must be at least 50% on "go" trials ("hits" greater than or equal to 162) to be included;

- Response times less than 100 ms are excluded.

Primary Variables for Analysis (note some specific variables names may differ from the below, this is being worked on during January 2012 but not finished at the date of this writing which is 1/10/12):

The main variables [variable names in brackets] for analysis include:

1. hit rate (proportion of correct responses on valid "go" trials corrected to be non-zero)(range 162 to 324)

[computed as: CPT_Hit_Rate = ((CPT_Hits+0.5)/(CPT_validgotrials+1))];

2. false alarm rate (proportion of valid false alarms on "no-go" or "X" trials umber of false alarms (range 0 to 36)

[computed as: CPT_FA_Rate = ((CPT_FA+0.5)/(CPT_validnogotrials+1))];

3. median response time for hits [CPT_MD_H]; and

4. standard deviation of response time for hits [CPT_SD_H].

Additional Variables for Analysis

There are two main kinds of additional variables for analysis: those that apply across all trial conditions and those that apply to specific trial conditions.

For overall analyses across trials many investigators compute indices of discriminability and/or response bias, which in some circumstances are more informative than simple hit rates and false alarm rates as indications of both accuracy and response style. There are several ways to compute such indices, including the most widely used methods derived from signal detection theory (d-prime and beta), and other less widely used but according to some, theoretically superior measures (such as the Probability of correct discrimination or Pr, and the Response Bias statistic Br, computed under two-high threshold theory; see below). Before conducting most of these analyses it is important to compute overall "hit rate" and "false alarm rate" that express these parameters as proportions and that assure non-zero values to avoid division by zero errors in computations. Algorithms to compute these indices are provided below.

Some analyses consider accuracy and response time parameters at each of the three inter-trial intervals (ITI). Thus we have for each ITI the number of hits (CPT_HIT_xS), number of false alarms (CPT_FA_xS), median response time for hits (CPT_MD_H_xS, and standard deviation of response time for hits (CPT_SD_H_xS), where "x" in each each of these variable names represents the ITI, which is either 1, 2, or 4 seconds.

Notes for CNP Trial-by-Trial Data

ExperimentName: format = CPT_[version]_[computer name]; e.g., CPT_v1_Rama

PTID: Participant ID

Block: note these values run from 6 to 23; the first 5 blocks are for the practice trials and these are excluded from this extracted E-Prime file.

Trial: note these values run from 1 to 20 within each block.

Group: this denotes hand used (1 = right, 2 = left)

SessionDate: Date of session.

SessionTime: ? needs recoding - appears to be fixed at Jan 1 1900: 0h 0m 0s

ProcedureBlock: values are Main1, Main2, Main4, where the numeric portion indicates the ITI in seconds.

StimDisplay1RESP: shows the response, either {DOWNARROW} or MISSING.

StimDisplay1ACC: this codes the accuracy of the response; 1 = correct, 0 = incorrect (so note, if the stimulus is not "X", then the correct response is {DOWNARROW}, but if the stimulus is "X" then the correct response is MISSING.





[Special notes for CIDAR version: The task is co-registered with EEG marks to record the stimulus type (X or Non-X) and ISI type (1000, 2000, or 4000 ms) and subject’s response time.]

Important E-Prime Variables and notes about the Eprime trial structure (important for writing new code on trial-by-trial data):

Note the E-Prime task structure involves two sequential events, "Stim" (which runs for 250ms) and then "Blank" which follows "Stim" and continues until the end of the trial. The actual response times are thus either equal to Stim.RT (if the response occurred within the first 250ms) or equal to Blank.RT plus 250ms.

“RunningBlock” – signifies practice (“Practice”) vs real trials (“SubBlocks”)

“StimulusTrial” – the letter of the stimulus

“Stim.ACC” – accuracy of the response to the stimulus during the 250ms the letter is on screen (“0”, “1”)

“Stim.RT” – reaction time of the stimulus during the 250ms the letter is on screen (0-250)

“Blank.ACC” – accuracy of the stimulus during the remaining time the letter is not on screen (“0”, “1”)

“Blank.RT” – reaction time of the stimulus during the remaining time the letter is not on screen (0-750, 0-1750, or 0-3750)

“ProcedureBlock” – signifies which ISI time stimulus was from (“Main1”, “Main2”, “Main4”)

“SubBlocks.Cycle” – block number (1-6)


“CPT” 1 Same specs as above

“CPTv2.0” 2 Added EEG markers to mark the stimulus and response. However, due to programming errors the task could not correctly mark the response times. Only the mark for the beginning of stimulus is accurate. Response marks can’t be used.

“CPTv3.0” 3 Completely revamped the coding. Fixed the EEG markers to work correctly. All marks are correct and response time functions properly. Entirely new variables to use to do analysis.

“CPTv4.0” 4 Added EEG marks for correct inhibition trials with “XIncorr” mark. Adds 50 ms to each trial.

“CPTv4.1” 5 Now outputs edat file and a text file to a set file location for SISTAT

“CPTv.4.2” 6 Switched EEGon and Wait 2 at the beginning of test to allow for the first stimulus mark. Added OtherIncorr mark to Save Info script. “writeport 128+40” and added Slide 1 to the first start delay of every trial block to prevent event mark overlaps.


SPSS Analysis:


  • The following code computes Pr ("discriminability") and Br ("response bias") index scores
  • following the methods described by Corwin J, Neuropsychology 1994, Vol. 8, No. 1, 110-117.
  • The first step is to compute corrected hit rate (cHR) and corrected false alarm rate (cFAR) to avoid infinite and indeterminate computations.
  • The resulting cHR and cFAR values are similar to proportions with the correction being to add 0.5 to the numerator and one to the denominator.
  • This explains why the denominator in cHR calculation is 325, which is 324 (total number of non-X trials on this task) plus one.
  • Similarly the denominator for cFAR is the number of X trials (36) plus one.



  • The variables Pr and Br are computed from the corrected hit rate and false alarm rate as follows.


  • We can also compute the other conventional measures from signal detection theory (d-prime, and signal detection theory with logistic distributions.
  • along with the non-parametric measures A-prime and c.

COMPUTE CPT_dprime = idf.normal(CPT_cHR,0,1) - idf.normal(CPT_cFAR,0,1). EXECUTE.

Gerhard Helleman Analysis Written to Analyze CIDAR datasets:

                                                  • Define Hits, Missess, Comissions (False Alarms)
                                          • Calculate CorrectHitRT and omission*************************
          • note that the data structure is set up as:
  • 1: Presenting the stimulus (250s) - reaction in this time are STIMresp
  • 2: Time after the stimulus - reaction in this time are Blankresp
              • changenotes 4-19-11:
  • RT is aggregated using the Median now
  • removed the testing code that did not include the 100ms cutoff

DO IF (RunningBlock="SubBlocks").

   DO IF (StimulusTrial~="X").
       DO IF (StimACC=1 and BlankACC=0).
           DO IF (StimRT>100).
               COMPUTE CorrectRT.hit.valid = StimRT.
               COMPUTE CorrectRT.hit.750 = StimRT.
               COMPUTE HitCorr.valid=1.
               COMPUTE HitCorr.750=1.
               COMPUTE MissCorr.valid=1.
               COMPUTE MissCorr.750=1.
           End if.
           ELSE IF (StimACC=0 and BlankACC=1).
           COMPUTE CorrectRT.hit.valid = BlankRT+250.
           COMPUTE CorrectRT.hit.Total=BlankRt+250.
           COMPUTE HitCorr.valid=1.
           COMPUTE HitCorr.Total=1.
           DO IF BlankRT<750.
               COMPUTE CorrectRT.hit.750 = BlankRT+250.
               COMPUTE HitCorr.750=1.
               COMPUTE MissCorr.750=1.
           END IF.
           COMPUTE MissCorr.valid=1.

COMPUTE MissCorr.750=1.

       END IF.
   END IF.

end if.

DO IF (RunningBlock="SubBlocks").

   DO IF (StimulusTrial="X").
       DO IF (StimRT>0 or  BlankRT>0).
           COMPUTE IncInh=1.
           COMPUTE CorrInh=1.
       END IF.
   END IF.

end if.

                                              • Total hits and commissions*****************.




 /BREAK=Subject Session
 /HitCorr.total_sum = SUM( 
 /HitCorr.valid_sum = SUM(HitCorr.valid) 

/HitCorr.750_sum = SUM(HitCorr.750)

 /IncInh_sum = SUM(IncInh)

                                                • Calculate HR FAR Pr Br 3 flavours**********************.

COMPUTE,misscorr.total_sum). compute inhtrial=sum(incinh_sum,corrinh_sum). COMPUTE = (HitCorr.total_sum+.5)/( . COMPUTE FAR = (IncInh_sum+.5)/(inhtrial+1). COMPUTE = misscorr.total_sum.

execute. COMPUTE = COMPUTE = (FAR)/(1-( . EXECUTE .

COMPUTE corrtrial.valid=sum(hitcorr.valid_sum,misscorr.valid_sum). COMPUTE HR.valid = (HitCorr.valid_sum+.5)/(corrtrial.valid+1) . COMPUTE omission.valid = misscorr.valid_sum.

execute. COMPUTE Pr.valid = HR.valid-FAR. COMPUTE Br.valid = (FAR)/(1-(HR.valid-FAR)) . EXECUTE .

COMPUTE corrtrial.750=sum(hitcorr.750_sum,misscorr.750_sum). COMPUTE HR.750 = (HitCorr.750_sum+.5)/(corrtrial.750+1) . COMPUTE omission.750 = misscorr.750_sum.

execute. COMPUTE Pr.750 = HR.750-FAR. COMPUTE Br.750 = (FAR)/(1-(HR.750-FAR)) . EXECUTE .

      • based on classic signal detection theory *****

Compute,0,1)-IDF.NORMAL(FAR,0,1). Compute =-.5*(IDF.NORMAL(,0,1)+IDF.NORMAL(FAR,0,1)). execute. Compute* execute.

Compute dprime.valid=IDF.NORMAL(HR.valid,0,1)-IDF.NORMAL(FAR,0,1). Compute criterionc.valid=-.5*(IDF.NORMAL(HR.valid,0,1)+IDF.NORMAL(FAR,0,1)). execute. Compute beta.ratio.valid=exp(criterionc.valid*dprime.valid). execute.

Compute dprime.750=IDF.NORMAL(HR.750,0,1)-IDF.NORMAL(FAR,0,1). Compute criterionc.750 =-.5*(IDF.NORMAL(HR.750,0,1)+IDF.NORMAL(FAR,0,1)). execute. Compute beta.ratio.750=exp(criterionc.750*dprime.750). execute.

            • end of signal detection stuff.
                                                  • Calculate Correct Hit RT for each ISI type****************************.

DO IF (ProcedureBlock="Main1").

 COMPUTE CorrectRT.hit.valid.ISI1=CorrectRT.hit.valid.
	COMPUTE CorrectRT.hit.750.ISI1=CorrectRT.hit.750.

ELSE IF (ProcedureBlock="Main2").

 COMPUTE CorrectRT.hit.valid.ISI2=CorrectRT.hit.valid.
	COMPUTE CorrectRT.hit.750.ISI2=CorrectRT.hit.750.

ELSE IF (ProcedureBlock="Main4").

 COMPUTE CorrectRT.hit.valid.ISI4=CorrectRT.hit.valid.
	COMPUTE CorrectRT.hit.750.ISI4=CorrectRT.hit.750.



                                                    • Create Block data*********************************

DO IF (SubBlocksCycle=1). Compute Compute CorrectRt.hit.valid.Block1=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block1=CorrectRT.hit.750. ELSE IF (SubBlocksCycle=2). Compute Compute CorrectRt.hit.valid.Block2=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block2=CorrectRT.hit.750. ELSE IF (SubBlocksCycle=3). Compute Compute CorrectRt.hit.valid.Block3=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block3=CorrectRT.hit.750. ELSE IF (SubBlocksCycle=4). Compute Compute CorrectRt.hit.valid.Block4=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block4=CorrectRT.hit.750. ELSE IF (SubBlocksCycle=5). Compute Compute CorrectRt.hit.valid.Block5=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block5=CorrectRT.hit.750. ELSE IF (SubBlocksCycle=6). Compute Compute CorrectRt.hit.valid.Block6=CorrectRT.hit.valid. Compute CorrectRt.hit.750.Block6=CorrectRT.hit.750. END IF.


                                              • Create new dataset with final variables**************************.


 /BREAK=Subject  Session
 /Age = MEAN(Age) 
 /Sex = FIRST(Sex) 

/corrtrial.valid=mean(corrtrial.valid) /corrtrial.750=mean(corrtrial.750) / inhtrial=Mean(inhtrial)

/omission.valid = MEAN(omission.750) 
/omission.750 = MEAN(omission.750)  
 /commiss =MEAN(IncInh_sum) 
  /HR.valid = MEAN(HR.valid) 
 /Pr.valid = MEAN(Pr.valid) 
 /Br.valid =MEAN(Br.valid) 
 /hit_rt.valid = median(CorrectRT.hit.valid) 
 /hit_rtsd.valid = SD(CorrectRT.hit.valid) 
 /Block1_RT.valid = median(CorrectRt.hit.valid.Block1) 
 /Block2_RT.valid = median(CorrectRt.hit.valid.Block2) 
 /Block3_RT.valid = median(CorrectRt.hit.valid.Block3)
 /Block4_RT.valid = median(CorrectRt.hit.valid.Block4) 
 /Block5_RT.valid = median(CorrectRt.hit.valid.Block5) 
 /Block6_RT.valid = median(CorrectRt.hit.valid.Block6) 
 /Block1_RTSD.valid = SD(CorrectRt.hit.valid.Block1) 
 /Block2_RTSD.valid = SD(CorrectRt.hit.valid.Block2) 
 /Block3_RTSD.valid = SD(CorrectRt.hit.valid.Block3) 
 /Block4_RTSD.valid = SD(CorrectRt.hit.valid.Block4) 
 /Block5_RTSD.valid = SD(CorrectRt.hit.valid.Block5) 
 /Block6_RTSD.valid = SD(CorrectRt.hit.valid.Block6)
 /ISI1_HitRT.valid = median(CorrectRt.hit.valid.ISI1)
 /ISI2_HitRT.valid = median(CorrectRt.hit.valid.ISI2) 
 /ISI4_HitRT.valid = median(CorrectRt.hit.valid.ISI4)

/HR.750 = MEAN(HR.750)

 /Pr.750 = MEAN(Pr.750) 
 /Br.750 =MEAN(Br.750) 
 /hit_rt.750 = median(CorrectRT.hit.750) 
 /hit_rtsd.750 = SD(CorrectRT.hit.750) 
 /Block1_RT.750 = median(CorrectRt.hit.750.Block1) 
 /Block2_RT.750 = median(CorrectRt.hit.750.Block2) 
 /Block3_RT.750 = median(CorrectRt.hit.750.Block3)
 /Block4_RT.750 = median(CorrectRt.hit.750.Block4) 
 /Block5_RT.750 = median(CorrectRt.hit.750.Block5) 
 /Block6_RT.750 = median(CorrectRt.hit.750.Block6) 
 /Block1_RTSD.750 = SD(CorrectRt.hit.750.Block1) 
 /Block2_RTSD.750 = SD(CorrectRt.hit.750.Block2) 
 /Block3_RTSD.750 = SD(CorrectRt.hit.750.Block3) 
 /Block4_RTSD.750 = SD(CorrectRt.hit.750.Block4) 
 /Block5_RTSD.750 = SD(CorrectRt.hit.750.Block5) 
 /Block6_RTSD.750 = SD(CorrectRt.hit.750.Block6)
 /ISI1_HitRT.750 = median(CorrectRt.hit.750.ISI1)
 /ISI2_HitRT.750 = median(CorrectRt.hit.750.ISI2) 
 /ISI4_HitRT.750 = median(CorrectRt.hit.750.ISI4).

                                              • Create hit_rtse***************************************.

DATASET ACTIVATE CPT. COMPUTE hit_rtse.valid=(hit_rtsd.valid)/(Sqrt(324-omission.valid)). COMPUTE hit_rtse.750=(hit_rtsd.750)/(SQRT(324-omission.750)) . EXECUTE .

  • Custom SPSS Script to Analyze Data from a Single Case (Assumes you have created a *.sav file with data from one person.

  • Select only test trials (i.e., remove practice).


  • Make sure all values of RT listed as zero are changed to 'missing'.


  • Trial Listing.


 /TABLES=SubBlocks.Sample Trial ResponseTime StimulusTrial StimDisplay1.RESP StimDisplay1.RT 
 /TITLE='Case Summaries'
  • Compute CPT Summary Statistics.

If ((StimulusTrial="X") and (StimDisplay1.Resp="{DOWNARROW}")) RespType=1. If ((StimulusTrial="X") and (StimDisplay1.Resp <>"{DOWNARROW}")) RespType=2. If ((StimulusTrial <> "X") and (StimDisplay1.Resp="{DOWNARROW}")) RespType=3. If ((StimulusTrial <> "X") and (StimDisplay1.Resp<>"{DOWNARROW}")) RespType=4. If (StimDisplay1.RT <150) RespType=5. VALUE LABELS

 RespType 1 "False Alarm (press on X)" 2 "Correct Rejection (no press on X)" 3 "Hit (press non-X)" 4 "Miss (no press non-X)" 5 "Early (resp < 150ms)".


If (StimulusTrial="X") StimType=1. If (StimulusTrial <>"X") StimType=2. EXECUTE.


 /TABLES=ResponseTime BY RespType
  • Examine RT for correct responses and false alarms (i.e., when RT is not missing, and further when RT > 150 ms; others are early...).

USE ALL. COMPUTE filter_$=(StimDisplay1.RT > 150). VARIABLE LABEL filter_$ 'StimDisplay1.RT > 100 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE.

EXAMINE VARIABLES=StimDisplay1.RT BY ResponseTime



The query:

"conners CPT"[All Fields] OR "Conners continuous performance test"[All Fields] OR ("continuous performance test"[All Fields] AND "Conners"[All Fields])

Yields 112 hits on PubMed as of 20JUN2011.

CNP Manual Description: Continuous Performance Task Description: A Continuous Performance Task, or CPT, is a psychological test which measures a person's sustained and selective attention. Sustained attention is the ability to maintain a consistent focus on some continuous activity or stimuli and is associated with impulsivity. Selective attention is the ability to focus on relevant stimuli and ignore competing stimuli. This skill is associated with distractibility. There are a variety of CPT’s, the more commonly used being the Conner's CPT-II and the Test of Variables of Attention (TOVA). These attention tests are often used as part of a battery of tests to understand a person's 'executive functioning' or their capacity to sort and manage information. They may also be used specifically to support a diagnosis of ADHD. Scoring: There are three main scores that are used: 1. Reaction time- this measures the amount of time between the presentation of the stimulus and the client's response. 2. Omission errors- this indicates the number of times the target was presented, but the client did not respond/click the mouse. High omission rates indicate that the subject is either not paying attention (distractibility) to stimuli or has a sluggish response. 3. Commission errors- this score indicates the number of times the client responded but no target was presented. A fast reaction time and high commission error rate points to difficulties with impulsivity. A slow reaction time with high commission and omission errors, indicates inattention in general. Examinee’s scores are compared with the normative scores for the age, group and gender of the individual being tested.

Directions for Administration and Scoring: Materials: Manual Estimated Time: 14 minutes General Directions: • Open CPT file. Click “Run” and fill in participant’s ID. • Enter Session #. • Skip age, but enter gender. • Read instructions verbatim to participant. Say,

During this task letters will appear on the screen, one at a time. Rest your hand on the table with your index finger on the spacebar, quickly press and release the spacebar when you see any letter EXCEPT the letter X. Try as hard as you can not to press the spacebar when you see the letter X. Try to press as fast as possible without error.

Press the SPACEBAR to continue. Press “Y” to do 10 practice trials.

• Watch the examinee as they complete the practice trial to be sure they are responding correctly and using the correct button. • After the practice say,

Good job, you may now press the “Enter” key to begin the real test.

• This test will run continuously for about 12 minutes. • After the test is complete a message will appear saying “You are done.” • Press “Shift, Q” to see results. • Record all results on “Data Capture Form.”

go back to HTAC