psychopy.org | Reference | Downloads | Github

How to vary rating scale labels between different, randomized blocks of an experiment


#1

I would like to know how to vary the labels for a rating scale in PsychoPy v3.0.0b8 on MacOS, Version 10.13.5. The experiment I have designed using the Builder view has four blocks, in which participants are asked to rate various sound files of talkers in terms of the talkers’ friendliness, reliability, intelligence, or successfulness, with each block corresponding to one of these characteristics (see Figure 1 below for a screenshot of the blocks’ setup in the Builder view). I would like to set the labels at the opposite ends of the rating scale as a variable in the experiment, so that the labels in one block are “least friendly, most friendly,” the labels in another are “least reliable, most reliable,” and so on. I have tried to achieve this by indicating $parameters in the “Labels” box under RatingScale Properties and creating a column, entitled “parameters”, in the Excel file (conditionsFile.xlsx) tied to the outer loop of the trial blocks (each of which is tied to a different file indicated in the column “filename” of the conditionsFile). A screenshot of the conditionsFile is provided below (Figure 2). However, this method was unsuccessful, with no labels appearing on any of the rating scales. I also attempted to set the “Scale description” under RatingScale Properties as $parameters, referring to the noted Excel file column, but still did not find any success in establishing variable labels/descriptions for the four different rating scales in the experiment. Is there any way in PsychoPy3 to set the scale labels to be variable, using either the Builder view or code?

(Figure 1)

(Figure 2)


#2

HI @mrh1998, have you thought about using the new Slider? see here. With Slider, you would define your lables independently from the rating scale using text stim. However, if you want to stick with rating scale, you need to add a code component because ratingscale does not update unless you reinitiate the ratingscale object.

So, create the ratingscale called ‘rating’ in Builder, but add a code component, and on every routine:

rating = visual.RatingScale(win=win, name='rating', marker='triangle', size=1.0, pos=[0.0, -0.4], choices=YOUR_VARIABLE, tickHeight=-1)

Note, you put your parameters variable in the “choices” parameter.


#3

Hi @dvbridges,

I used the code you suggested, altering it slightly by using ‘scale’ in place of ‘choices’, and was able to vary the rating scale labels across the different blocks. Thank you for your help! However, when I did this, my rating scale changed to have seven tick marks, showing 1 as the lowest value and 7 as the highest value (see below), even though I have 5 set as the highest value in text stim (see below). Do you know if there is any way to keep the rating component as a 5-point scale with the newly added scale description (e.g., by indicating the highest and lowest values in the code)?


#4

Ah yes you will need to define your low and high ticks each time to initialise the rating scale in your code component, so:

rating = visual.RatingScale(win, ...etc, low=1, high=5, ...etc)