Howdy, Stranger!

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

Supported by

How do I define a "correct mouse response" for OSweb?

As you can see in the attached image I'm trying to generate a reasoning task with multiple choices. However, I couldn't manage to define correct response for mouse. Could you help me, I need to define correct response for my analysis it, thanks already.


Peace,


Metin.

Comments

  • Hi @meto ,


    Could you upload the experiment?


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Hi Metin,

    When you mean define correct responses for mouse item, you don't mean the type of click you give, but the item that you select. Is that so? In this case, I think this tutorial of Lotje will be quite useful to you:

    Eduard

    Buy Me A Coffee

  • Hi dear @eduard, no I didn't mean region of interest. I meant correct response for my analysis. My experiment has 4 multiple choices, but only one of them is correct and I have to define the correct response. Thanks you for your interest. :)


    Peace,


    Metin

  • So, you mean, you need to define which of the four images is the one participants should click at?

    I guess the way to go is to define four fixed regions on the screen, and define which of the four is supposed to be the target. This you can easily do with the loop table with a variable that codes the correct field. Then, depending on the value for the correct variable, you assign the response alternatives to the fields, making sure that the correct alternative is presented at the location that is assgined as correct response.

    I haven't checked your code in detail, but the general idea makes sense. For each field define the edge points, and check whether a click falls within the edges. You'll have for fields to check, but as you defined the correct field beforehand, you will know whether to code a response as correct or incorrect depending on which field was clicked.

    Does that make sense?

    Eduard

    Buy Me A Coffee

  • I defined four images, participants are allowed to click any option they want. However, three of them are false answers and one of them is the correct answer.


    This task consist of 8 questions and the location of the options changes in every question

    Thanks,

    Metin

  • edited March 28

    Hi @meto ,


    Your script looks good! :)


    You can do the following:

    • Add a column to your block_loop where you define the correct response. Note that, because "correct_response" is a built-in variable, you should use a different column header (I think OpenSesame will get confused when a mouse_response item has a string as correct response)
    • Define per trial which stimulus (resim1, resim2, resim3 or resim4) is the correct answer. Now your block_loop should look something like below (note that I I just chose random images as correct ones, so you'll have to adjust that):


    • Add a bit of code to the inline_javascript items to determine whether the currently checked image ROI contains the correct image. For example, in the item called 'option1', the code becomes (see line 16-21):
    vars.start_x_resim1_roi = vars.x_resim1 - (vars.w_resim1 / 2)
    vars.start_y_resim1_roi = vars.y_resim1 - (vars.h_resim1 / 2)
    vars.end_x_resim1_roi = vars.x_resim1 + (vars.w_resim1 / 2)
    vars.end_y_resim1_roi = vars.y_resim1 + (vars.h_resim1 / 2)
    
    if (
    vars.cursor_x >= vars.start_x_resim1_roi &
    vars.cursor_x < vars.end_x_resim1_roi &
    vars.cursor_y >= vars.start_y_resim1_roi &
    vars.cursor_y < vars.end_y_resim1_roi
    ){
    
    vars.resim1_clicked = "yes"
    
    
    // IF resim1 contains the correct answer
    // AND the participant clicked on this image,
    // set correct to 1
    if (vars.correct_picture == "resim1"){
        vars.correct = 1
        }
    
    
    }
    
    else
    {
    vars.resim1_clicked = "no"
    }
    
    console.log(vars.resim1_clicked)
    


    • The variable "correct" should now get the value 1 for correct responses and 0 for errors
    • Make sure to reset the variable correct to 0 for each trial. You can do this by appending another inline_javascript item to the trial_sequence and placing the following line in its Run tab:


    // Give the correct variable a starting value
    vars.correct = 0
    


    I attached an example (but as said before, please note that I didn't check the correct responses).


    Cheers,


    Lotje


    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited March 28

    PS: I noticed that your logger was not placed at the correct place in the overview area. You should log the responses at the end of every trial sequence. Otherwise, only the information from the last trial will be logged. I changed that in the above-attached experiment.

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Thanks a lot @lvanderlinden for all of your helps. I did everything you said, including the 'logger' now the task runs smoothly and I can collect correct responses, thank you :)


    Peace,


    Metin

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