Variable interstimulus interval (ISI) for stop trials in a stop signal task
Kelsey A Brown
kbrown6 at wellesley.edu
Tue Sep 9 22:37:48 UTC 2014
Hello Everyone,
I received incredibly helpful answers for my previous question that I
posted here, so I thought I would seek your valuable input on a second part
of a stop signal task I have encountered some difficultly building. One of
the defining parts of a stop signal task is having a variable ISI before
the presentation of a stop signal. I would like to write a script that
tells E-prime to make the ISI=250 ms for all go trials. For stop trials,
the ISI for the first stop signal would be 250 ms, but the ISI for all
future stop signals would be dependent on previous performance on stop
trials. If the participant was successful at inhibiting pressing the button
on the previous stop trial and their percent correct (accuracy on stop
trials) is greater that 30% then the program would increase the previous
trials stop signal delay (the ISI) for the next stop signal by 50 ms. If
the participant was successful in inhibiting in pressing the button on the
previous stop trial and their percent correct is less than 30% then the
program would keep the stop signal delay for the next trial the same as it
was in the previous trial. If the participant was not successful in
inhibiting their button pressing on the previous stop trial and their
percent correct is greater then 30% the program will keep the stop signal
delay (ISI) equal to the ISI in the previous stop trial. If the participant
was not successful in inhibiting their button pressing on the previous stop
trial and their percent correct is less than 30% then the program would
subtract 50 ms from the ISI of the previous stop signal trial.
stop signal delay and ISI are used interchangeably, but they mean the same
thing.
To begin, in the experiment object properties, I made initDelay(initial
delay)= 250. I also set DurationChange=50.
In the script I wrote:
Dim nDelay As Double 'actual delay for each trial
Dim min, max, nerr, ncor, ff, ncc As Integer
Dim pctcor, pcterr, pct, fpct, cpct As Single
Dim ferr As String
Dim pp As Single
'set guidelines for what to present when the person was correct too often
and you want to increase the delay
Sub SetSlowState(c As nDelay)
nDelay = nDelay + CDbl(c.GetAttrib("DurationChange"))
c.SetAttrib "ISIduration", c.GetAttrib("nDelay")
End Sub
Sub SetFastState (c As nDelay)
nDelay = nDelay - CDbl(c.GetAttrib("DurationChange"))
c.SetAttrib "ISIduration", c.GetAttrib("nDelay")
Dim Delay As Integer
If fileexists(c.GetAttrib("Subject") & "-ISI.txt") Then
Open c.GetAttrib("Subject") & "-ISI.txt" For Input As #1
Input #1, Delay
Close #1
nDelay = CDbl(Delay)
Else
nDelay = CDbl(c.GetAttrib(initDelay))
End If
'I'm still confused how to set variable ISI in a text file that changes
nerr=0 'num forced errors
ncor=0 ' num correct
pcterr=0.0 ' percent error
ncc=0 ' num correct??
'ISI.duration= nDelay If c.GetAtrib("TrialType")="go"
If c.GetAttrib ("TrialType")="stop" Then
If (pctcor>.30) Then
SetSlowState c,nDelay
'this routine should increase the ITI making it harder
If (pctcor<.30) Then
SetFastState c,nDelay
'this routine should decrease the ITI making it easier
If c.GetAttrib ("TrialType")="stop" And If (pctcor<.30) Then ISI.duration=
x - 50
ISI.duration = 250 If c.GetAtrib("TrialType")="go"
Then If c.GetAttrib ("TrialType")="stop"
Then ISI.duration = If c.GetAttrib("CorrectAnswer")= "" And
If (pctcor>.30)
debug.Print "Forced Error"
nerr = nerr + 1' Forced Errors
Then ISI.duration= 'previous stoptrial ISI + 50
If c.GetAttrib("CorrectAnswer")="" And If (pctcor<.30) Then ISI.duration=
'previous stop trial ISI - 50.
'i'm trying to set it up so that the isi for the first stop trial is equal
to 250ms but increases by 50ms if pctcor>.30 but decreases by 50 ms if
pctcor<.30.
I'm assuming it is some sort of if then statement structured something like
what I wrote below.
Then ISI.duration = 250 Else ISI.duration = 250+50
The script above is what I came up with my professor, but I'm not sure the
script is accomplishing exactly what it is meant to by tracking the stop
signal ISI on all trials and either adding to that ISI or subtracting 50 ms
from that ISI for the following trial depending on the participants stop
trial accuracy percentage. I know that some of the above script is writing
the same thing in multiple ways, but I figured it would be helpful to post
everything that I have come up with so far. The script is basically a
jumble of things we think might potentially work to write the program in
the way we want it to run, but I would certainly appreciate any input.
Hopefully this all makes sense. Perhaps there is an easier way to keep
track of the ISI on all stop trials and program the variable ISI that I
have not previously considered?
Thanks for any help in advance.
-Kelsey
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/bd478347-111a-4ddd-94e6-ab3b648637d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140909/6fb4ed8d/attachment.htm>
More information about the Eprime
mailing list