Howdy, Stranger!

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

Supported by

Java Counterbalance Issue

Hi there,

I have an experiment that i'm hoping to run on osweb. Everything seems to be work smoothly except for the the counterbalancing of the conditions.

My experiment has 2 main conditions: an auditory block (that contains 4 different loops) and a visual block (contains 4 different loops). I want to counterbalance the order of which block the participants sees first.

So far i have this java code:

if(vars.subject_parity === "even"){

vars.condition1 = "AuditoryBlock"

vars.condition2 = "VisualBlock"

}else {

vars.condition1 = "VisualBlock"

vars.condition2 = "AuditoryBlock"

}

The code works fine in that I don't get any errors. But when i test the experiment and put the subject number an even number, sometimes the I get visual first and sometimes auditory first. Same thing when i try an odd number; sometimes the counterbalancing is right sometimes it's not. I'm not sure what i'm doing wrong.

In the main experimental loop that contains both blocks and their loops i created a variable called condition and put [condition1] in row 1 and [condition2] in row 2.

In the main sequence I set the loop visualBlock to Run If [condition] = VisualBlock and AuditoryBlock to Run If [condition] = AuditoryBlock.

I hope this all make sense.


Any help is greatly appreciated!


-Gazelle

Comments

  • Hi @Gazelle_M

    Your logic looks right.

    The first thing that I am wondering is: how do you set a subject number? If you specify the subject number in the allowed subject number field, then osweb randomly samples a number from this field.

    Furthermore: are you testing this in jatos or with the option to directly run your experiment in the browser? Jatos has its own system for distributing subject numbers, which you can override, but we'll talk about that when it is applicable.

    Buy Me A Coffee

  • Hi Daniel, 

    Thank you so much for your reply! 

     That’s a very good point. When I click on tools —> osweb, the possible subject numbers are set by default as 0,1. Should I change that? 

    When I run it locally on opensesame (using the double green arrow), if I set the subject number 2 or 4, I get different conditions for each one. Same thing for the web browser option and jatos. When I look at the log the subject parity is odd but the condition is sometimes [condition2] or [condition1]. same thing for even subject parity.  


    I should also mention that i have texts on several sketchpad that i put the show if : [subject_parity] = ‘odd’ or [subject_parity] = ‘even’ 

    These codes always seem to be working in accordance with the subject number. 


    I’m attaching my experiment below. I would appreciate it if you could maybe take a look at it and see if you spot an error. I have a feeling that I did something with specifying the conditions in the main experimental loop and sequence. 



    Thank you so much for your help!  

  • edited August 2

    Hi @Gazelle_M ,

    I have been dealing with a loooot of counterbalancing issues and your thread captured my attention. I can't be more help than Daniel but I have noticed something that may have a contribution.

    You defined your [condition] variables in rows in the experimental loop as [condition1] and [condition2] and in your sequence looks like this:


    Shouldn't they be named [condition1] = VisualBlock, [condition2] = AuditoryBlock instead? Since you have the javascript code with condition1 and condition2, maybe you could just try adding the 1 and 2 in the run if statement? But your code also has the "else" statement; so the only thing I can comment is that you defined your variables as condition1 and condition2, and then defined another named condition that includes these two, but I think somehow there is a confusion there.

    For a simpler solution maybe; in my experiment (which had no javascript for counterbalancing), I had defined all my variable names as columns. So if my column(thus variable) name was [condition], the rows below them would be VisualBlock and AuditoryBlock, and my run if statement would be as you did in the screenshot.

    For JATOS, if you leave the Possible subject number field empty in the Tools, JATOS uses the subject_nr that itself assigns (which, as far as I noticed, is the component result ID in JATOS).

    As I said, these are just what I learnt from my own adventure and just wanted to share :)

    Best,

    H

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