Welcome! Log In Create A New Profile

Advanced

Using mouse clicks to save Likert scale response

Posted by kms 
kms
Using mouse clicks to save Likert scale response
May 04, 2024 06:01AM
Hi Jaewon,

We would like to create a Likert scale like object on the screen and be able to register (button or key-presses like) responses from participants on the specified numbers of the scale (like 1, 2 and so on).

Is there any example code or documentation on how we could go about doing it in ML, perhaps using mouse tracker function?

Thanks.
Re: Using mouse clicks to save Likert scale response
May 06, 2024 12:54PM
It seems a matter of imagination. There are many ways to do so and I think everything necessary is well-documented already.

The entire scale can be drawn with a tool like MS Paint or PowerPoint and presented as an image in NIMH ML. Then you can check key input or set a fixation window on each scale level to capture the mouse cursor.

If some visual feedback is desired, like the attached mouse_input task, you can create some interactive scene with existing adapters or build a custom adapter.
Attachments:
open | download - mouse_input.zip (5.2 KB)
open | download - key_input.zip (5 KB)
kms
Re: Using mouse clicks to save Likert scale response
October 19, 2024 03:10AM
Thanks, Jaewon! We were finally able to get this to work for us, thanks to your scripts.

One thing we were wondering was if there is any function to revert the cursor's placement at a designated neutral location at the beginning of each new trial (instead of where it was at the end of the previous trial) to discourage people from clicking on the same or nearby response every time just because it is closer in position to the previous response. Could you suggest an easy way to do this? Thank you!
Re: Using mouse clicks to save Likert scale response
October 19, 2024 09:52AM
Call the setCursorPos method of the mouse tracker before your Likert scale scene starts.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#Trackers

...
scene = create_scene(con);
mouse_.setCursorPos([0 0]);
run_scene(scene);
...

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.