Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

invalid value for correct_response

Hi All,

I am trying to set up a short proficiency task as a follow up for my main task. The sketchpad is supposed to display a question and then 4 options, the participant has to click on the option they deem correct.

in my loop table I have set the correct_response indicating which of the 4 options is the correct one for each trial. I have first done so by selecting the column name (option_a /option_b ...), and I was getting an error. So I changed the value in the correct_response column to the value of the response.

The error still persists: Invalid value in correct_response: sagt opp

item-stack: experiment[run].proficiency_loop[run].proficiency_sequence[prepare].question_response[prepare]

I have used the correct_response variable in previous experiments I have build, but I have mostly had keyboard response, and the current task is set with a mouse response. I have linked the mouse response to the target sketchpad and named the ROIs. I am attaching how the sketchpad looks like.

How should I define the value in correct_response for a mouse response? Thank you!

Marta

Comments

  • Hi @m.vel,

    I'd start with checking what the response variable loks like. You could output it to the console to see exactly what gets registered when you click on an option. This might help identifying why the computation of the score fails.

    Have you checked this out?

    Regards,

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice,

    Thank you for the advice. But I cannot see what gets registered as the experiment finishes as soon as we get to the experiment itself.

    I did check the discussion post you shared with me, and have done all the steps mentioned by Seb in his response already. So my regions for the ROI are defined, and I do have a value in my correct_response column. As I said, I already tried this by having the column name in which the correct response is (i.e. option_a), and I also tried putting the value within the column that corresponded to the correct response.

    My ROIs are named after the column name.

    It is however odd that the experiment fails at the beginning of the loop, even though the dirts sketchpad does not contain the correct_response variable. So it must be something how the variable is set in the loop table. I have another experiment that i am now working on with a mouse click response, but I do not set the correct:response since it is an exploratory study; and a part of some lack of precision in the ROIs, the experiment runs until the end. I used the correct_reponse variable many time in my tasks with keyboard response, and setting it up was straightforward: I would insert the key that they needed to press to get an accurate response. I applied the same logic to the click response, and named the ROIs after the values inserted in the correct_response variable, but that is not working.

    I am attaching the experiment, in case you have the time to look at it. I might have missed something simple. Thanks!

    Marta


  • Hi again,

    I removed the correct_response column from my loop table and the experiment runs fine. So it must be something how the correct response was implemented. I would really like to have it though, as then extracting accuracy would be automatic.

    I will look into more how correct_response has to be formulated for mouse reposnes, but if you any advice it is welcome.

    Marta

  • Hi @m.vel,

    When replying, if you use my handler (@Fab), I get notified that a message has arrived for me.

    I've had a quick look at your task. Here are some of the problems I spotted.

    First, for mouse responses, you need to use code to compute var.correct manually based on var.cursor_roi and the variable where you store the correct response. If you're unfamiliar with collecting mouse response, I recommend you take a look at this tutorial: https://youtu.be/21cgX_zHDiA?si=C9SS2IutH0Xl-j6W.

    var.cursor_roi is where the name of the object clicked on is registered. I believe that the automatic scoring based on a correct_response variable is failing because it compares the response to the correct response and not the cursor_roi to the correct response. When you click, the response is 1. But what you want is the name of the object clicked on: var.cursor_roi. Hence, after collecting the mouse response, you need code like this to calculate the score:

    if (var.cursor_roi == var.correct_response_value):
       var.correct = 1
    else:
       var.correct = 0
    

    Second, I noticed that you did not implement something to make sure that the trial does not end if the subject clicks anywhere else than on one of the objects. Again, this is covered in the tutorial. You need to place the mouse response collected inside a nested loop and include a repeat_cycle object set to stop cycling if cursor_roi is different from empty.

    Finally, I noticed that you're using two loggers. There is not need or rationale reason for this. You should use the same logger (using several loggers can mess the task up). In any case, I'm not sure why you feel you have to insert a logger after the question and again after the proficiency response. The logger located at the end will registered everything that's happened in the trial, including the response to question_response. So no need to insert the liogger twice within the trial sequence.

    I attach the correct task here (in Open Sesame 4):

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice,

    Thank you for this. I indeed did not know that there was it was necessary to calculate the variable score. So I will implement that.

    Yes, I did in the meantime implement a nested loop, very helpful to keep off the undefined clicks. My initial intention, before the nested loop, was to have a specific to check where the participants were clicking before the response was presented, so we could check that the cursor was not already in a palce where a response button appears. Silly, I am not aware as the nested loops keep this much cleaner.

    Thank you!

  • Hi @Fab ,

    I am attaching the new version of the task with two nested loops in the experiment loop. I have dine two because in the first one I want to make sure that the participants click on the continue (fortsett) button, but I do not need to collect any reposes here.

    The second nested loop (nested only in the main loop, not in the "question loop") is the actual task.

    I added an inline script as per your suggestion but I still get the same error message as before:

    Invalid value in correct_response: option_a

    item-stack: experiment[run].proficiency_loop[run].proficiency_sequence[run].question_loop[run].question_sequence[prepare].question_response[prepare]

    I thought this was because I had two cycles, one for the question loop and the second one for the proficiency response loop. So I tried removing the loop for the question (in case the inline script was checking the response value also for that click response), but the fail message was the same.

    I am attaching the experiment, it would be great if you could take a look. Thank you.

    Marta


  • Hi @m.vel,

    I took a look at your new version and spotted the following problems:

    (1) the name of the variable you use to refer to the correct response did not correspond in the loop and in your evaluation code. In the code you are using correct_response_variable but in the loop you were using "correct_response". The loop must contain a variable named the same as in your code, like this:

    (2) In your code, you had written the following:

    if (var.cursor.roi == correct_response_variable):
    

    This line contains two errors. The first is that you were referring to correct_response_variable, which is not defined. To access the variable called correct_response_variable, you need to prefix it with var. like this:


    The second problem with your code was that you referred to var.cursor.roi instead of var.cursor_roi. The second contains the name of the object clicked, the first does not. So the code should be like this:


    I attach your task with the corrections:

    A suggestion, to facilitaste the processing of the data from the log:If you'd like to easily separate the lines corresponding to the response to the quesrion from those corresponding to the proficiency screen, you could add a variable called "phase" in both the question_loop and the prof_response_loop and set these to "question" and "proficiency" values respectively.

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab,

    Thank you for all your help. The task runs as I intended now.

    However, I have encountered a new problem: I uploaded it on my local JATOS and the click area is no longer restricted to the defined ROIs: the task progresses regardless of where I click.

    I know this might not be within your area of expertise and I can post about it on the JATOS section, but do you happen to have some insight of why this happens? Are the ROIs not transmitted to OSWeb?

    Marta

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games