How to implement a variable stop-signal delay in the stop-signal task?
Dear all,
I have activated your version of the stop-signal task (SST), but I would to implement an adaptive procedure that prolongs the stop-signal delay (SSD, i.e., the period of time between the target stimulus and the stop-signal) after each successful Stop-trial and shortens it after each unsuccessful one.
More specifically, at the start of the experiment the SSD should be 200 ms, and after a successful inhibition the SSD increases with 50 ms, and after an unsuccessful inhibition the SSD decreases with 50 ms (with a minimum SSD of 50 ms).
At the moment, the SSDs are fixed (that is, there are four standard different SSDs that will occur equally often during the experiment), but this makes the SST non-adaptive.
Can you guys help me out with this? Thank you in advance!
Best,
Rubin
Comments
Hi Rubin,
In the end of a trial sequence, you can add an
inline_scriptand put this code in therun phase:Also, the variable
var.SSDneeds to be initialized somewhere in the beginning of the experiment. So, you could add anotherinline_scriptsomewhere in the beginning of a block or of the exeperiment and add the line;var.SSD = 200. Does this make sense?Eduard
Hi Eduard,
Thank you for your quick response! Your code does make sense, but if I try that I get an error message
Are you able to check what's wrong? Here is the structure of my experiment.

This is your code for the adaptive SSD that I've implemented

But in the end, I get this error message:

Maybe the problem is that my python inline script should be in the coroutine list (which isn't possible at the moment in opensesame)?
Hope you can help me out with this!
Best,
Rubin
Hi rubin,
the variables
var.SSDandvar.stop_afterhave to have the same name. Otherwise, you can't do the operationvar.stop_after + 50. Like the error message says, the variable does not exist.Eduard
Hi Eduard,
Oh that was a stupid mistake .. However: I changed the 'stop_after' variables into 'SSD', and I still get the error message saying that SSD is not defined.
Ruben
If you initialize
var.SSDin theinline_script, you don't need the column in theloop table. In fact, this is the reason, you get the error you are talking about as there is no specified value in most of the rows.Does this make sense? Can you try that and let me know whether the problem was solved?
Eduard
And also:
There is an error in the inline_script "SSD_adaptive". In the second if statement, you have to replace and SSD >99 with and var.SSD >99. The variable SSD doesnt exist, but only var.SSD.
Eduard
Dear all
Thank you RubinCS for posing this question (I too am trying to implement a variable SSD), and thank you eduard for your answer, which was very helpful! I used the code you suggested and it worked. I have made a minor modification for the code: My loop contains a variable called stop_signal (with 0 = inhibit response) and I added this to the code “and var.stop_signal == 0”. As far as I know the SSD should only increase if the participant inhibits his response correctly and the SSD should decrease when the participant erroneously reacts although he should inhibit his response. If you don’t add this argument “and var.stop_signal == 0” then the SSD changes after every response (regardless of whether it was a stop trial or not). I’m not sure if my suggestion is of any use but it seemed to work for me (I’m rather new to OpenSesame)… I hope this helps!
I have 2 follow-up questions and hopefully someone can help me out:
At the moment the SSD increases continuously (given that my experiment will contain around 400 trials this means that the SSD could be somewhere around 2000ms for example). I want the SSD to be between 0 and 500ms (so 500ms should be the absolute maximum). How can I define this range from 0 to 500ms with 500ms being the top maximum?
Normally the rate of stop trials is about 25%. I could adjust the ratio of stop signals in the loop and then adjust the amount of cycles in order to get a rate of 25% stop trials. Is there an another, easier way to get the intended rate of stop trials? For example some kind of weighting procedure?
Thank you for your help!
Hi,
You can apply the adjustment only if the SSD is smaller than 500 ms. Or fix it, once it exceeds the limits:
Yes?
Can you elaborate a little more what it is precisely that you need?
Eduard
Dear Eduard
Thank you for your answer and your help!
I'm sorry, I'm going to try to be more precise: In my stop signal task I would like to have 25% stop trials and 75% go trials (e.g. 400 trials in total --> 300 go trials and 100 stop trials). I solved this problem by creating 8 rows in a loop with 6 go trials and 2 stop trials and by letting each cycle repeat 50 times (= 50 * 6 and 50 * 2). It seems to work this way but I wanted to know if there is a more elegant way to get the intended rate (i.e. 300 go trials, 100 stop trials). For example by using python?
Does that make more sense?
Thank you for your help!
Kind regards
Hi,
Is there a reason, you prefer not to do it the way you're doing it right now? It seems like a perfectly fine way to me (maybe you can even use 3 go and 1 nogo trial instead). Of course, you can also do it with some scripting if you wish, but it would boil down to the same thing.
Eduard
Hello all,
Even with your advices, I can't insert an SSD to the stopsignal task example. It works when the answer of stop trial is a mistake and the SSD decrease of -50 but when the answer is correct (none) nothing happened: no increase of 50 ms.
Thanks for your help
Frédéric
Hi frederic,
Can you attach your experiment? I'd like to have a look (it is easier to work with actual code than with screenshots). I have a hunch though. Can you try replacing
Nonewith'None'? I think Opensesame converts theNonein the loop table automatically to a string, so that you have to keep this in mind when making the comparison.Does that make sense?
Eudard