Setting duration based on a calculation with variables
Hi,
I'm creating a test on inhibition of responses. In the first part the participant completes a number of trials responding as quickly as possible to say whether an arrow is pointing left or right.
In the next block of trials I introduce a 'stop signal' in half of the trials. When they hear the stop signal the participant shouldn't respond. The problem I'm having is that I want to set the timing of the stop signal based on the participants reaction time in the first block of trials - so for example, if their reaction time had been 850ms, then I'd like the stop signal to be given 400ms before that. I've tried defining this as [avg_rt] - 400 but that doesn't seem to work - do you have any suggestions?
Thanks,
Jonathan
Comments
Hi Jonathan,
What part does not work? Please provide more details, then we can help you better. So, what did you try, what do you see, are there error messages, etc.
Thanks,
eduard
Hi Eduard,
I have set up the trial as follows:
I hope that makes sense, just in case I've also attached the version of the experiment that isn't working:
Thanks,
Jonathan
Hi Jonathan,
There is probably a way to do it like you intend to, but I don't remember exactly what the syntax is supposed to be. A way to get around it, is to add an inline script before that sketchpad, in whose prepare phase you define the duration first. (e.g. var.dur = var.avg_rt- 200), then you can add [dur] as duration in the sketchpad and it should work. If you want the avg_rt to keep on updating during the experiment, you do it on every trial (so in the block loop), or if it should stay constant for a block, you do it before the loop.
Good luck,
Eduard
Thanks - I'll try that!
That seems to be working - thank you!