Howdy, Stranger!

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

Supported by

How can I give a response-ratio in feedback ?

Hi again !

I need your assistance again. In a previous post (http://forum.cogsci.nl/index.php?p=/discussion/2563/how-to-measure-reaction-time-releasing-a-key?new=1), I requested your help to understand how measuring some time with the release of a key.

I'm blocked on a second step. I would like to keep only the valid results and give the response-ratio every 50 trials. (Participants will be instructed to distribute their answers as equitably as possible on the left and right.)

For the moment I insert this inline script between the repeat cycle and the logger :

  • if not (var.response_time < 100) and not (var.response == None) :
  • var.count_resp += 1
  • if var.response == "p":
  • var.resp_healthy += 1
  • if var.response == "a":
  • var.resp_injured += 1

And this feedback at the end of the trial sequence :

  • Your response ratio is :
    • Right : [([resp_healthy]/[count_resp])*100] %
    • Left : [([resp_injured]/[count_resp])*100] %
  • Remember, you have to divide your responses as equally as possible between left and right.
  • Press the space bar to continue.

There is two problems. First the counter (count_resp) increase even if the conditions ((var.response_time < 100) and (var.response == None)) were not respected. Then, I don't succeed to display the percentage of the response-ratio on the feedback screen.

If you have any idea to do that, you'll really save me ! :smile:

Thanks for reading,

Ronan G.

Comments

  • Hi Ronan,

    First the counter (count_resp) increase even if the conditions ((var.response_time < 100) and (var.response == None)) were not respected

    I don't see right away what could be the issue, but you need to check whether there is an error in the code (e.g. you conditional is not defined correctly), or whether the data looks different to what you expect (e.g. the response is never "none"). If you check the logfile you should be able to get closer to the problem.

    Btw, why not simpler?:

    if var.response_time >= 100 and var.response != None :
        var.count_resp += 1
         if var.response == "p":
              var.resp_healthy += 1
         if var.response == "a":
              var.resp_injured += 1
    

    Then, I don't succeed to display the percentage of the response-ratio on the feedback screen.

    What exactly is the issue? Are you using a sketchpad or a feedback item? For feedback purposes, you should use the feedback item (see here). Also, be aware, currently you would not obtain the correct ratios because you bump into rounding errors.

    Note the difference:

    # dividing to integers
    print 10/100
    
    # dividing an integer and a float
    print 10/100.0
    # I guess the 2nd one, is what you're interested in?
    

    Good luck,

    Eduard

    Buy Me A Coffee

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