Howdy, Stranger!

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

Supported by

Randomising a widget response page

I need to randomise the widget response page of my experiment. I currently have this code in place and it works perfectly:

set timeout infinite
set spacing 25
set rows "1;1;1;1"
set question "Select the black and white animal you saw. Or select 'don't know'"
set options "draw image center=1 file=c_bird.jpg scale=1 show_if=always"
set only_render no
set margins "50;100;50;100"
set form_var response
set form_title "Form title"
set description "A simple multiple choice item"
set cols "1;1"
set button_text Ok
set allow_multiple no
set advance_immediately yes
set theme gray
widget 0 0 2 1 label text="Target selection"
widget 0 1 2 1 label center=no text="Select which black and white animal you saw or if you don't know select 'don't know' "
widget 0 2 1 1 image_button path="bw[T1].jpg"
widget 1 2 1 1 image_button path="bw_[picture3].jpg"
widget 0 3 1 1 image_button path="bw_[picture2].jpg"
widget 1 3 1 1 button text="Don't know"

How can I adapt this code so that it randomises the order my widget buttons appear on the screen? At the moment the right answer is always the first button [T1].

Thanks,
Jenny

Comments

  • Hi Jenny,

    You can randomise the order of the buttons by turning the positions, meaning the column and/or the row, of the buttons into variables (e.g. widget 0 [positions_row] 1 1 image_button path="bw[T1].jpg"). These variables can be created in a loop somewhere in your experiment.

    For more information, please refer to this thread:

    Best,
    Laurent

  • edited March 2017

    Thanks Laurent,
    I have now adjusted my code and created the variables in a loop relevant to the rows and columns on my form so it looks like this:
    widget 0 0 2 1 label text="Target selection"
    widget 0 1 2 1 label center=no text="Select which black and white animal you saw or if you don't know select 'don't know' "
    widget "[pos_col]" "[pos_row]" 1 1 image_button image_id="[position]" path="bw_[T1].jpg"
    widget "[pos_col]" "[pos_row]" 1 1 image_button image_id="[position2]" path="bw_[picture3].jpg"
    widget "[pos_col]" "[pos_row]" 1 1 image_button image_id="[position3]" path="bw_[picture2].jpg"
    widget 1 3 1 1 button text="Don't know"

    However, I am now just getting one picture in a random position on the screen instead of 3 random pictures. How can I rectify this?

    Jenny

  • Hi Jenny,

    I'm not sure what the problem is, would you mind sharing your experiment so i can have a look at it?

  • Thanks so much for taking a look. The issue is on the widget page in which participants have to select their answer. I need the correct answer to display and then two random pictures also. However, it also can't display the same picture twice on the page otherwise it will be confusing for them.

  • Hi Jenny,

    Attached is the experiment, it should display three option now. What happened was that the answer options (the widgets) were allocated to the same location within a trial, resulting only in a single option. I have changed the widget_loop so that all location are unique (note that there are only 6 possible combinations). Furthermore, it was not necessary to include additional location variables so i have removed them to avoid confusion.

    What still needs to be done though, is making sure that the answer options do no display the same alternative twice (i.e. when your target is the same as one of the stimuli in your RSVP). I think you can achieve this by merging the block_loop with the picture_loop. Since the target is assigned in the former, you can manually decide which of the alternatives in your RSVP should be left out and add the remaining stimuli to the loop.

    Let me know if that helped!

  • That is perfect! When I ran it again it selected the same T1 6 times because of the widget loop so I have just merged that too so my block loop has lots of variables in it but will work the data out later!

    Thank you so much for your help and patience, you have literally saved my degree!

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