# [Beginner question] How to implement a rating system partly defined by the subject of an experiment?

Hello everyone,

I am a total newcomer to Psychopy and very much a beginner in experiment design. I am currently designing a Magnitude Estimation study, where I ask subjects to rate a stimulus based on a reference stimulus they have rated beforehand.

For instance, at the start of the experiment, the reference stimulus can be given a rating of 1, 5, 50 or a 100, any positive number preferred by the subject. Then, the subject rates the following stimuli according to how different they perceive them to be with respect to the stimulus, on the scale they have defined.

In Psychopy, I would thus like to add sliders in the response tasks where each slider is defined by the reference number chosen by the speaker (who would probably write it in a dialogue box under a reference stimulus).

Is there any way to do this easily (i.e. with just the Builder?) I have no programming knowledge in Python, only a basic level in R.

All the best,

Cameron

You could define a Variable component whose â€śEnd Routineâ€ť value is the range that you want the slider to use based on the participantâ€™s response - Iâ€™m not 100% clear on your design but it could be something like:

``````list(range(mySlider.rating))
``````

(with `mySlider` being the name of the component which the participant specifies the range on)

Then in the Slider component which uses this range, set its vales to be

``````\$myVariable
``````

(where `myVariable` is whatever you called the Variable component)

1 Like

Thank you! Defining a variable seems to be a way to solve this. Iâ€™ll need to play around with my experiment a bit more to see how variables work.

I may have an additional question for now: how do you link up a participantâ€™s response (such as the numerical value provided by the participant) to the defined variable using the Builder?

Thanks,

Cameron