Howdy, Stranger!

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

Supported by

conditioned randomization

Hi

I have 32 words to be presented in the middle screen (Focal) along with another 32 words to be presented either on the left or right the screen (Periphery). If I use completely randomized design, there would be 1024 compositions, but I want to present only 32 pairs randomly selected from the possible pairs of 32 focal and 32 periphery words.

Please can you kindly advice how to deal with this randomized selection ?


Thanks in advance,

Masoud

Comments

  • Hi Masoud,

    What do you mean with:

    but I want to present only 32 pairs randomly selected from the possible pairs of 32 focal and 32 periphery words.

    YOu can shuffle both word lists and then just select one by one from each list. Would that work?

    Eduard

  • Dear Eduard,

    Please could you advice how to to this? Is there need for an inline script?

    Masoud

  • Yes, I think so.

    Syntax is straightfoward:

    import random
    list1 = [1,2,3]
    list2 = [4,5,6]
    random.shuffle(list1)
    random.shuffle(list2)
    combined_list = [(l1,l2) for (l1,l2) in zip(list1,list2)]
    

    Now you have a list of lists (representing trials). Within a trial list, the first item can be shown in the center and the second on in the periphery.

    Eduard

    Thanked by 1mfp49
  • Dear Eduard

    Thanks,

    I have the following variables in the Loop:

    correct_response focal periphery periphery_position

    1-RCTRL BOOK ZEBRA 384

    2-LCTRL CAT LETTER -384

    ...

    32-...

    The participant is expected to press RCTRL when see a reading stuff in the middle screen otherwise LCTRL.

    Shall I use the "list1" and list2" as the column names in the Loop? Please kindly advice where to introduce the variable names in the inline script?

    Peace,

    Masoud

  • Hi Masoud,


    No, you have to use Inline coding to define these lists (i.e. onelist = focal, secondlist=peripherie). Once randomized, and matched, you have to put another inline script in the loop sequence, in which you extract the current pair from the list (based on the current trial number). That means, that in your loop table, you only need a trial counter ( a variable that counts from 0-31). Based on that counter you can index the lists, set the correct response (e.g. "if reading in middle: correct_response = RCTRL"), and the position of the words.


    Hope this helps. In any case, try to get started on it and see how far you get. Maybe learning some Python in the mean time will also be very helpful, certainly on the long run.


    Eduard

    Thanked by 1mfp49
Sign In or Register to comment.