Staircase Design

Hello

It is my first time designing a staircase experiment in PsychoPy.

What is the goal? I want a 3 down and 1 up staircase design, in which on the first trial a random stimulus is presented with a start value of 65 dB. If the answer is correct (coded as 1) then the next trial should be the same level. The trials will become easier or harder after 3 consecutive responses. So in other words, after 3 incorrect trials, the 4th trial should become easier or in other words the signal should be louder (1 down) .

I believe the built-in staircase portion should take care of these calculations (since the steps and start value is included)?

What is the problem? I am having some issues 1) calling in my csv file which will include different sentences. and 2) having PsychoPy adjust the volume of the stimuli based on previous responses.

I am attaching my csv and .psyexp files. Any help would be appreciated
StaricaseTest.psyexp (11.4 KB)
Test.xlsx (8.3 KB)

Hi Serena,

Before offering suggestions here, I just want to check is the goal to run this staircase locally (in the lab) or online (in a browser) ? if the second the approach I would suggest is slightly different.

Assuming in the lab, I believe these are the steps you need the following:

To change the sentence trial by trial Yes this is a bit tricky with the staircase loop type, as it doesn’t take a csv file. What I would suggest you do it something like the attached. Where you load in the sentences in advance (see I added an extra routine at the start) and then sample them randomly in the main staircase loop (do you want to sample the sentences without replacement? or just randomly?) .
StaricaseTest.psyexp (15.3 KB)

To adjust the volume In your sound_1 component, in the “playback” tab - you want the volume to be level (which should be automatically created by the staircase loop based on your settings and the accuracy of response on each trial.

Hope this helps moving forward!
Becca

Hello @Becca,

thank you so much for your response. The goal is to run the experiment locally. The code that you have created makes perfect sense (so thanks for that). The code also works fine (without errors) after removing my piece of code from the script.

I do have a couple of questions:

  1. In regards to the staircase properties: should the values (e.g., start value, min value, etc) be between 0 and 1? Or can I add integers (like 65) since I am specifying my step type to be dB?

  2. Also, the volume does not seem to change based on the step sizes I am specifying. I tried both integers (steps of 5) and decimal (steps of 0.4) but the volume does not change according to my staircase. In other words, if I have a 1 up and 1 down design, and if my start value is 0.4 and step size is 0.5 then if I get a trial correct, the next one should become “harder” with a volume level of -0.1, and if I get the answer incorrect then the next trial should become “easier” with a volume level of 0.9? I am attaching an excel file that shows the volume levels as they are not moving in step sizes of 0.5.
    Test Round.csv (2.0 KB)
    Corrected Code.psyexp (14.0 KB)

thanks in advance for your time

Hi Serena,

Pleased to hear this helped!

For volume, PsychoPy is expecting values between 0 (quietest) and 1 (loudest) so it is possible that this is why you had no perceivable difference using step sizes of 5 or 0.4, I would suggest something like 0.01 to get started, but you of course want to check what a 0.01 difference in PsychoPy units maps onto in terms of dB with your hardware using and SPL meter.

Hope that helps!
Becca

Thank you so much @Becca. I truly appreciate your detailed responses.

Another issue that I am encountering now is how the staircase is calculating the “levels” for the next trial. So I have a 3 down and 1 up staircase (so after 3 correct responses the fourth trial should get harder and vice versa) however, in the beginning of the experiment this is not the case (this is shown on the excel rows 2-4). Although I have a correct response the volume level changes for every trial.

The staircase works fine starting trial 7 (or row 8 on the excel) in which the volume only decreases after getting 3 correct responses.

Attached is a sample excel data file.
No Change_StaricaseTest_2022_Apr_10_1155.csv (2.7 KB)

Thank you

Hi Serena,

I think the 3-down 1 up algorithm doesn’t start until the first reversal (this is to make sure that your participant doesn’t end up “stuck” at super high intensities/volumes that they find very easy at the beginning of the experiment - does that make sense?

Becca

Yes @Becca, that makes perfect sense. Thank you so much again

Also, I have learned that staircase Handler might allow for actual dB values (e.g. 60 dB)? I have been trying to convert the volume levels (0-1) in PsychoPy to dB and have not been successful in finding an effective way to do that.

I came across the staircase handler and am not sure if this was designed to take care of this issue?
Sample Code found online:
staircase = data.StairHandler(startVal=20.0,
stepType=‘lin’,
stepSizes=[8, 4, 4, 2, 2, 1, 1], # reduce step size every two reversals
minVal=0, maxVal=90,
nUp=1, nDown=3, # will home in on the 80% threshold
nTrials=50)

If this would allow me to enter actual dB values and just have PsychoPy present stimuli at those given levels, does that mean I need to remove the staircase loop and have that code in the begin routine portion?

Hi Serena,

The stairhandler is actually what is used in builder (you can select db in the step type dropdown in your loop)
I think this might actually be new since I last used stair handler in PsychoPy. It looks like you can set stair type to be dB though I am afraid that I don’t know too well how to use that. In my own research I conducted an independant auditory calibration, plotting the db SPL change with linear steps in PsychoPy unit (0 - 1) then I used that to inform my staircase volume choices. I would suggest doing this anyway - try using dB units and measure with an SPL meter that the change in actual output corresponds as expected. Hope that helps!
Becca

Hello Becca and Serena,

I think that you could help me concerning the following issue that I have :

I simply wondered if any of you knew how to interpret de decrease of intensity from PsychoPy during a staircase ?

I do apologise for the inconvenience and thank you in advance !
Sarah