Brian2828 wrote:
> I'm working with a dataset for the Logan stop signal task (basically a
> type of  reaction time task with a random subset of trials requiring
> that the particpant "stop" a prepotent response in the presence of an
> auditory stop signal)and am having trouble writing script that will
> analyze performance sequentially across trials.  I want to know how
> previous trials influence responses on the following trials.
> 
> The data are organized in the data set below.  I would like to take
> the average of the React variable (reaction time)on trial N-1 where
> trial N (trials where event = stop) and trial N-1 (event = Go).  I
> would then like to compare these reaction times to responses on trials
> N + 1.
> 
> Generally, I need to calculate an average of specific trials relative
> to performance on previous trials.  The location of stops are random. 
> Has anyone performed similar anaylses?  Any suggestions/thoughts would
> be greatly appreciated.
> 
> Thanks,
> Brian
> 
> Subj    Trial   Cond    Event   React   Key     XX      DUR
> 1     14      O       go      306     68      N/A     200
> 1     15      X       go      432     65      N/A     200
> 1     16      X       stop    N/A     320     N/A     250
> 1     17      O       go      393     68      N/A     250
> 1     18      O       go      523     68      N/A     250
> 1     19      X       go      420     65      N/A     250
> 1     20      O       go      447     68      N/A     250
> 1     21      O       go      528     68      N/A     250
> 1     22      X       go      604     65      N/A     250
> 1     23      X       go      525     65      N/A     250
> 1     24      X       stop    N/A     320     N/A     300
> 1     25      O       go      343     68      N/A     300
> 1     26      O       go      389     68      N/A     300
> 1     27      X       go      403     65      N/A     300
> 1     28      X       go      480     65      N/A     300
> 1     29      O       stop    N/A     320     N/A     350
> 1     30      O       go      450     68      N/A     350
> 1     31      O       go      421     68      N/A     350
> 1     32      X       stop    390     65      N/A     300
> 1     33      O       stop    N/A     320     N/A     350
> 1     34      O       go      437     68      N/A     350

You'll get more help with SPSS questions in the SPSS 
newsgroup (comp.soft-sys.stat.spss).

You need to use the LAG function.  LAG can only look at 
prior records in the file, so you'll need to sort in 
ascending order of trial for some things, in decending order 
for others.  SOmething like this:

* ----- Start of syntax --------- .
* Create flags for Trials N-1, N, and N+1 .
* Trial Type N-1 is a GO trial just before a STOP.

sort cases by subj trial(d).
if (event = 'go') and (lag(event)= 'stop') ttype = 1.
exe.

* Trial N follows Trial N-1.

sort cases by subj trial.
if lag(ttype) = 1 ttype = 2.
exe.

* Trial N+1 = GO after STOP .

if (event = 'go') and (lag(event)= 'stop') ttype = 3.
exe.

value labels ttype
  1 'N-1'
  2 'N'
  3 'N+1'.

* ----- End of syntax --------- .

This does not compute Trial Types for all of your cases--I 
wasn't sure what you want to do when you have two STOPs in a 
row, for example, or serveral GOs in a row.  But it should 
get you started.

Cheers,
Bruce
-- 
Bruce Weaver
[EMAIL PROTECTED]
www.angelfire.com/wv/bwhomedir/

.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to