Choice Task based on Rating (one session)
Hi there,
I am wondering what would be the best way to program an experiment in which choices are matched based on previous ratings (slider).
I have created a task in which food images are rated based on perceived health and taste using a slider (as posted in another discussion). From this I have the variables var.taste and var.health.
In the second part, the choice task, I would like to match the food images such that half the items are less tasty and more healthy and the other half is random. This way the choices each participant has to make are customised to their idiosyncratic preferences. Additional complexities: besides the food images there will be nutritional-score images which are linked to the food images and should be displayed.
Cheers for your input :-)!
Comments
Hi @Jenna004,
Based on your description, it seems to me that you'll need to do some coding.
My suggestion would be to work with arrays. You could add a variable to the loop where you present the images for rating and store a unique integer index in that variable for each picture. Let's say you present 10 pictures, you'd have the indexes 0,1,2,3,4,5,6,7,8, and 9 as the indexes. You'd then have to store the rating in an array at the index corresponding to the picture (so that, for example, if picture 3 is presented first,, and the value of the rating is 8, your rating array would be [0,0,0,8,0,0,0,0,0], and so on.
Let's say that in the choice task you want to select a picture of a rating inferior to that of picture 5, you could create an array containing the list of pictures ([0,1,2,3,4,5,6,7,8,9]), use code to shuffle it (e.g., [7,0,3,5,9,4,1,2,8,8-6]) and then scan it and test whether the rating for the picture corresponding tp each element of that array is greater or lower than that of picture 5. Let's say you're scanning the previously mentioned shuffled order, the code would then test whether the rating for picture7 is lower than for picture 5. If it is, you could then set picture 7 as the picture to be presented with picture 5. On trials where you want to present a picture with a rating superior to that of your test picture, you'd do something similar but set the condition differently. You can find information searching the forum for key words such as "shuffling" and "randomization".
That, in a nutshell, is one way to do it. If you wanted to make sure that the distance in ratings is more or less equivalent across trials, then it'd get quite a bit more complicated. Same if you want to make sure that there is large difference in the frequency with which pictures are shown. Might not even be possible, depending on the ratings your subjects give pictures to start with.
In summary, you'll need to get comfortable with programming to solve this one, I think. Either in Python, or in Javascript. Perhaps other users will have alternative solutions, but the above mentioned way is how I'd go about it.
Good luck!
Fabrice.
Thanks for your input., Fabrice!
I have managed to solve it using DataMatrix. If anyone reading this, is interested in the code let me know :-)