Staircase Design in PsychoPy

Hello,

I am trying to create a speech in noise experiment in the builder. The experiment will be a simple speech in noise task in which the participants will perceive a sentence and based on the responses of the participants (correct vs incorrect) the level of signal will change accordingly.

I have never created an experiment using the staircase design in PscyhoPy and would like to know where I can get started. I am aware that there are tutorial videos online but they mainly cover visual tasks.

Any help would be greatly appreciated, Thanks

Hello @Michael,

I am trying to create a staircase experiment in which there is a constant noise sound presneetd with every sentence. Based on the responses of the participants (1= correct, 0 = incorrect) the volume of the sentences presented (sginlan) should change. So three correct responses to a given trial should then make the 4th trial harder (3 down and 1 up staircase). I am not sure exactly what I can add to the code component to allow this to happen.

Here is the experiment in the builder:
StaricaseTest.psyexp (12.4 KB)

Thank you

@jon, sorry for this!

I am not sure who the best contact person would be.

This is handled in the settings of the staircase loop dialog, where you have specified the N up/ N down.

So it’s not really clear what your question is, but looking at your.psyexp file, there seems to be an issue with the nesting of loops. You have a 15 × 3 trial loop nested within the staircase. So that means that 45 trials would elapse before the staircase would be able to modify the stimulus volume. I don’t imagine that is what you are after.

I’m guessing that you want the staircase loop to immediately surround the trial routine, so that every time the trial routine is shown, the stimulus volume is changed, in accordance with the response on the last trial.

The question then becomes how to control the values that are currently coming from your conditions file - you didn’t post that, so it is hard to know what to suggest there.

@Michael I apologize if my previous explanation was not clear.

“I’m guessing that you want the staircase loop to immediately surround the trial routine, so that every time the trial routine is shown, the stimulus volume is changed, in accordance with the response on the last trial.” → this is exactly what I want to do.

a) if I don’t include the loop around my trial then how can I use an excel file indicating the exact sentences I want to play?
b) also I would like the volume to change after every trial based on participants’ responses (1= correct and 0 = incorrect). I added a code in my script but I am not sure if this would take care of the issue.

StaricaseTest.psyexp (12.7 KB)

Thanks

As far as I understand it, this bit needs to happen in code - i.e. create a list of the sentences and what their associated response should be, and then extract a pair of those for each trial. Again, without seeing your conditions file and knowing more about your task, we can’t give more detailed suggestions of how to implement that.

The staircase loop takes care of all these calculations for you. All you need to do is supply the keyboard component with a variable name that contains the correct response for the current trial.

You should probably work through these three excellent video tutorials on adaptive staircases in PsychoPy by Yentl de Kloe:

and/or work through the relevant chapter of the Builder textbook: