lists, randomization and repeats


Author
Message
elobot10
elobot10
Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)
Group: Forum Members
Posts: 11, Visits: 59
Hi,

I am having some difficulty with the list element. I'm trying to use it to randomly select stimuli from an item without any repeats,
but I keep getting a couple of repeats nonetheless.

I am designing an experiment in which participants make yes/no judgements about a series of words (50 traits, 50 social roles, 20 group identities) based on whether they feel they are true
of them, or if they are true of a friend. The experiment consists of 24 blocks (12 about the self, 12 about the friend; 2 x 5 with traits, 2 x 5 with roles, 2 x 2 with groups),
each with 10 trials. Each word is displayed on screen one at a time. The traits, roles and groups are all saved in their own item elements, and I'm using a list element to randomly select
a number corresponding to an index in each item, with the intention of preventing any word repetition. I want participants to see each word once and only once per target (once for them
and once for their friend). I thought that I had adjusted the paramters of the list elements to ensure this, but I keep getting a couple of repeats.

The relevant parts of my code are available below.

Thanks for your help!

<values>
/friend = ""
/completed = 0
/item_count = 0
/list_length = 0
/word = ""
/type = ""
/person = ""
</values>

<values>
/current_role = 0
/current_trait = 0
/current_group = 0
</values>

<list traititemselect>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

<item traits>
/1 = "trait_1"
/2 = "trait_2"
/3 = "trait_3"
/4 = "trait_4"
/5 = "trait_5"
/6 = "trait_6"
/7 = "trait_7"
/8 = "trait_8"
/9 = "trait_9"
/10 = "trait_10"
/11 = "trait_11"
/12 = "trait_12"
/13 = "trait_13"
/14 = "trait_14"
/15 = "trait_15"
/16 = "trait_16"
/17 = "trait_17"
/18 = "trait_18"
/19 = "trait_19"
/20 = "trait_20"
/21 = "trait_21"
/22 = "trait_22"
/23 = "trait_23"
/24 = "trait_24"
/25 = "trait_25"
/26 = "trait_26"
/27 = "trait_27"
/28 = "trait_28"
/29 = "trait_29"
/30 = "trait_30"
/31 = "trait_31"
/32 = "trait_32"
/33 = "trait_33"
/34 = "trait_34"
/35 = "trait_35"
/36 = "trait_36"
/37 = "trait_37"
/38 = "trait_38"
/39 = "trait_39"
/40 = "trait_40"
/41 = "trait_41"
/42 = "trait_42"
/43 = "trait_43"
/44 = "trait_44"
/45 = "trait_45"
/46 = "trait_46"
/47 = "trait_47"
/48 = "trait_48"
/49 = "trait_49"
/50 = "trait_50"
</item>

//A list of social roles

<list roleitemselect>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

<item roles>
/1 = "role_1"
/2 = "role_2"
/3 = "role_3"
/4 = "role_4"
/5 = "role_5"
/6 = "role_6"
/7 = "role_7"
/8 = "role_8"
/9 = "role_9"
/10 = "role_10"
/11 = "role_11"
/12 = "role_12"
/13 = "role_13"
/14 = "role_14"
/15 = "role_15"
/16 = "role_16"
/17 = "role_17"
/18 = "role_18"
/19 = "role_19"
/20 = "role_20"
/21 = "role_21"
/22 = "role_22"
/23 = "role_23"
/24 = "role_24"
/25 = "role_25"
/26 = "role_26"
/27 = "role_27"
/28 = "role_28"
/29 = "role_29"
/30 = "role_30"
/31 = "role_31"
/32 = "role_32"
/33 = "role_33"
/34 = "role_34"
/35 = "role_35"
/36 = "role_36"
/37 = "role_37"
/38 = "role_38"
/39 = "role_39"
/40 = "role_40"
/41 = "role_41"
/42 = "role_42"
/43 = "role_43"
/44 = "role_44"
/45 = "role_45"
/46 = "role_46"
/47 = "role_47"
/48 = "role_48"
/49 = "role_49"
/50 = "role_50"
</item>

<list groupitemselect>
/poolsize = 20
/resetinterval = 0
</list>

<item groups>
/1 = "group_1"
/2 = "group_2"
/3 = "group_3"
/4 = "group_4"
/5 = "group_5"
/6 = "group_6"
/7 = "group_7"
/8 = "group_8"
/9 = "group_9"
/10 = "group_10"
/11 = "group_11"
/12 = "group_12"
/13 = "group_13"
/14 = "group_14"
/15 = "group_15"
/16 = "group_16"
/17 = "group_17"
/18 = "group_18"
/19 = "group_19"
/20 = "group_20"
</item>

*********************************************
INTRO + FRIEND NAME + INSTRUCTIONS
*********************************************

<text ready_to_start>
/items = ("You are now ready to start the experiment.

For each question:

press 'y' to answer 'yes'

press'n' to answer 'no'
")
/ fontstyle = ("Arial",3%)
/ size = (80%, 10%)
/ position = (50%, 50%)
/ hjustify = left
</text>

<textbox friend_name>
/ caption = "Please enter your friend's name before proceeding."
/required = true
/position = (30%,50%)
/ monkeyresponse = ["FRIEND"]
</textbox>

<surveypage enter_friend>
/questions = [1=friend_name]
/ showpagenumbers = false
/ showquestionnumbers = false
/ ontrialend = [
values.friend = textbox.friend_name.response
]
/branch = [
surveypage.ready_to_start
]
</surveypage>

<surveypage ready_to_start>
/ stimulusframes = [1=ready_to_start]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<text timeout>
/items = ("4 seconds have passed. Please respond as soon as you can.")
/ fontstyle = ("Arial",3%)
/ size = (80%, 10%)
/ position = (50%, 20%)
/ hjustify = left
/color = red
</text>

<text you>
/items = ("YOU")
/position = (50%, 20%)
/ txcolor = blue
/ fontstyle = ("Arial", 20%)
/erase = false
</text>

<text friend>
/items = ("<%values.friend%>")
/position = (50%, 20%)
/ txcolor = green
/ fontstyle = ("Arial", 20%)
/ erase = false
</text>

*********************************************
YES/NO RATINGS
*********************************************

****Text elements****
<text self_word>
/items = ("Does this describe you?")
/ position = (50,80)
/ txcolor =black
/fontstyle = ("Arial", 5%)
/erase = false
</text>

<text friend_word>
/items = ("Does this describe <%values.friend%> ?")
/ position = (50,80)
/ txcolor =black
/fontstyle = ("Arial", 5%)
</text>

<text traits>
/items = item.traits
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 20%)
/select = values.current_trait
/ size = (80%, 10%)
</text>

<text roles>
/items = item.roles
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 10%)
/select = values.current_role
/ size = (80%, 10%)
</text>

<text groups>
/items = item.groups
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 20%)
/select = values.current_group
/ size = (80%, 10%)
</text>

***TRIALS***

<trial self_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "self";
values.current_trait = list.traititemselect.nextindex;
values.word = text.traits.currentitem
]
/stimulustimes = [0=text.self_word, text.traits, text.you; 4000=text.timeout]
/validresponse = (21,49)
/responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "friend";
values.current_trait = list.traititemselect.nextindex;
values.word = text.traits.currentitem
]
/stimulustimes = [0=text.friend_word, text.traits, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/beginresponsetime = 0
</trial>

<trial self_roles>
/ontrialbegin = [
values.type = "role";
values.person = "self";
values.current_role = list.roleitemselect.nextindex;
values.word = text.roles.currentitem
]
/stimulustimes = [0=text.self_word, text.roles, text.you; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_roles>
/ontrialbegin = [
values.type = "role";
values.person = "friend";
values.current_role = list.roleitemselect.nextindex;
values.word = text.roles.currentitem
]
/stimulustimes = [0=text.friend_word, text.roles, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial self_groups>
/ontrialbegin = [
values.type = "group";
values.person = "self";
values.current_group = list.groupitemselect.nextindex;
values.word = text.groups.currentitem
]
/stimulustimes = [0=text.self_word, text.groups, text.you; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_groups>
/ontrialbegin = [
values.type = "group";
values.person = "friend";
values.current_group = list.groupitemselect.nextindex;
values.word = text.groups.currentitem
]
/stimulustimes = [0=text.friend_word, text.groups, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

*********************************************
   BLOCKS
*********************************************

<block intro>
/trials = [1=surveypage.enter_friend]
</block>

<block self_traits_1>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_2>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_3>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_4>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_5>
/trials = [1-10=trial.self_traits]
</block>

<block friend_traits_1>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_2>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_3>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_4>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_5>
/trials = [1-10=trial.friend_traits]
</block>

<block self_roles_1>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_2>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_3>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_4>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_5>
/trials = [1-10=trial.self_roles]
</block>

<block friend_roles_1>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_2>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_3>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_4>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_5>
/trials = [1-10=trial.friend_roles]
</block>

<block self_groups_1>
/trials = [1-10=trial.self_groups]
</block>

<block self_groups_2>
/trials = [1-10=trial.self_groups]
</block>

<block friend_groups_1>
/trials = [1-10=trial.friend_groups]
</block>

<block friend_groups_2>
/trials = [1-10=trial.friend_groups]
</block>

********************************************* 
 EXPERIMENT
*********************************************
<expt full_exp>
/blocks = [1=block.intro; 2-13=noreplacenorepeat(block.friend_groups_1,block.friend_groups_2,
block.friend_roles_1,block.friend_roles_2,block.friend_roles_3,block.friend_roles_4,block.friend_roles_5,
block.friend_traits_1,block.friend_traits_2,block.friend_traits_3,block.friend_traits_4,block.friend_traits_5,
block.self_groups_1, block.self_groups_2,
block.self_roles_1, block.self_roles_2, block.self_roles_3, block.self_roles_4, block.self_roles_5,
block.self_traits_1, block.self_traits_2, block.self_traits_3, block.self_traits_4, block.self_traits_5)]
</expt>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
elobot10 - Thursday, June 28, 2018
Hi,

I am having some difficulty with the list element. I'm trying to use it to randomly select stimuli from an item without any repeats,
but I keep getting a couple of repeats nonetheless.

I am designing an experiment in which participants make yes/no judgements about a series of words (50 traits, 50 social roles, 20 group identities) based on whether they feel they are true
of them, or if they are true of a friend. The experiment consists of 24 blocks (12 about the self, 12 about the friend; 2 x 5 with traits, 2 x 5 with roles, 2 x 2 with groups),
each with 10 trials. Each word is displayed on screen one at a time. The traits, roles and groups are all saved in their own item elements, and I'm using a list element to randomly select
a number corresponding to an index in each item, with the intention of preventing any word repetition. I want participants to see each word once and only once per target (once for them
and once for their friend). I thought that I had adjusted the paramters of the list elements to ensure this, but I keep getting a couple of repeats.

The relevant parts of my code are available below.

Thanks for your help!

<values>
/friend = ""
/completed = 0
/item_count = 0
/list_length = 0
/word = ""
/type = ""
/person = ""
</values>

<values>
/current_role = 0
/current_trait = 0
/current_group = 0
</values>

<list traititemselect>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

<item traits>
/1 = "trait_1"
/2 = "trait_2"
/3 = "trait_3"
/4 = "trait_4"
/5 = "trait_5"
/6 = "trait_6"
/7 = "trait_7"
/8 = "trait_8"
/9 = "trait_9"
/10 = "trait_10"
/11 = "trait_11"
/12 = "trait_12"
/13 = "trait_13"
/14 = "trait_14"
/15 = "trait_15"
/16 = "trait_16"
/17 = "trait_17"
/18 = "trait_18"
/19 = "trait_19"
/20 = "trait_20"
/21 = "trait_21"
/22 = "trait_22"
/23 = "trait_23"
/24 = "trait_24"
/25 = "trait_25"
/26 = "trait_26"
/27 = "trait_27"
/28 = "trait_28"
/29 = "trait_29"
/30 = "trait_30"
/31 = "trait_31"
/32 = "trait_32"
/33 = "trait_33"
/34 = "trait_34"
/35 = "trait_35"
/36 = "trait_36"
/37 = "trait_37"
/38 = "trait_38"
/39 = "trait_39"
/40 = "trait_40"
/41 = "trait_41"
/42 = "trait_42"
/43 = "trait_43"
/44 = "trait_44"
/45 = "trait_45"
/46 = "trait_46"
/47 = "trait_47"
/48 = "trait_48"
/49 = "trait_49"
/50 = "trait_50"
</item>

//A list of social roles

<list roleitemselect>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

<item roles>
/1 = "role_1"
/2 = "role_2"
/3 = "role_3"
/4 = "role_4"
/5 = "role_5"
/6 = "role_6"
/7 = "role_7"
/8 = "role_8"
/9 = "role_9"
/10 = "role_10"
/11 = "role_11"
/12 = "role_12"
/13 = "role_13"
/14 = "role_14"
/15 = "role_15"
/16 = "role_16"
/17 = "role_17"
/18 = "role_18"
/19 = "role_19"
/20 = "role_20"
/21 = "role_21"
/22 = "role_22"
/23 = "role_23"
/24 = "role_24"
/25 = "role_25"
/26 = "role_26"
/27 = "role_27"
/28 = "role_28"
/29 = "role_29"
/30 = "role_30"
/31 = "role_31"
/32 = "role_32"
/33 = "role_33"
/34 = "role_34"
/35 = "role_35"
/36 = "role_36"
/37 = "role_37"
/38 = "role_38"
/39 = "role_39"
/40 = "role_40"
/41 = "role_41"
/42 = "role_42"
/43 = "role_43"
/44 = "role_44"
/45 = "role_45"
/46 = "role_46"
/47 = "role_47"
/48 = "role_48"
/49 = "role_49"
/50 = "role_50"
</item>

<list groupitemselect>
/poolsize = 20
/resetinterval = 0
</list>

<item groups>
/1 = "group_1"
/2 = "group_2"
/3 = "group_3"
/4 = "group_4"
/5 = "group_5"
/6 = "group_6"
/7 = "group_7"
/8 = "group_8"
/9 = "group_9"
/10 = "group_10"
/11 = "group_11"
/12 = "group_12"
/13 = "group_13"
/14 = "group_14"
/15 = "group_15"
/16 = "group_16"
/17 = "group_17"
/18 = "group_18"
/19 = "group_19"
/20 = "group_20"
</item>

*********************************************
INTRO + FRIEND NAME + INSTRUCTIONS
*********************************************

<text ready_to_start>
/items = ("You are now ready to start the experiment.

For each question:

press 'y' to answer 'yes'

press'n' to answer 'no'
")
/ fontstyle = ("Arial",3%)
/ size = (80%, 10%)
/ position = (50%, 50%)
/ hjustify = left
</text>

<textbox friend_name>
/ caption = "Please enter your friend's name before proceeding."
/required = true
/position = (30%,50%)
/ monkeyresponse = ["FRIEND"]
</textbox>

<surveypage enter_friend>
/questions = [1=friend_name]
/ showpagenumbers = false
/ showquestionnumbers = false
/ ontrialend = [
values.friend = textbox.friend_name.response
]
/branch = [
surveypage.ready_to_start
]
</surveypage>

<surveypage ready_to_start>
/ stimulusframes = [1=ready_to_start]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<text timeout>
/items = ("4 seconds have passed. Please respond as soon as you can.")
/ fontstyle = ("Arial",3%)
/ size = (80%, 10%)
/ position = (50%, 20%)
/ hjustify = left
/color = red
</text>

<text you>
/items = ("YOU")
/position = (50%, 20%)
/ txcolor = blue
/ fontstyle = ("Arial", 20%)
/erase = false
</text>

<text friend>
/items = ("<%values.friend%>")
/position = (50%, 20%)
/ txcolor = green
/ fontstyle = ("Arial", 20%)
/ erase = false
</text>

*********************************************
YES/NO RATINGS
*********************************************

****Text elements****
<text self_word>
/items = ("Does this describe you?")
/ position = (50,80)
/ txcolor =black
/fontstyle = ("Arial", 5%)
/erase = false
</text>

<text friend_word>
/items = ("Does this describe <%values.friend%> ?")
/ position = (50,80)
/ txcolor =black
/fontstyle = ("Arial", 5%)
</text>

<text traits>
/items = item.traits
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 20%)
/select = values.current_trait
/ size = (80%, 10%)
</text>

<text roles>
/items = item.roles
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 10%)
/select = values.current_role
/ size = (80%, 10%)
</text>

<text groups>
/items = item.groups
/position = (50%,40%)
/txcolor = black
/fontstyle = ("Arial", 20%)
/select = values.current_group
/ size = (80%, 10%)
</text>

***TRIALS***

<trial self_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "self";
values.current_trait = list.traititemselect.nextindex;
values.word = text.traits.currentitem
]
/stimulustimes = [0=text.self_word, text.traits, text.you; 4000=text.timeout]
/validresponse = (21,49)
/responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "friend";
values.current_trait = list.traititemselect.nextindex;
values.word = text.traits.currentitem
]
/stimulustimes = [0=text.friend_word, text.traits, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/beginresponsetime = 0
</trial>

<trial self_roles>
/ontrialbegin = [
values.type = "role";
values.person = "self";
values.current_role = list.roleitemselect.nextindex;
values.word = text.roles.currentitem
]
/stimulustimes = [0=text.self_word, text.roles, text.you; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_roles>
/ontrialbegin = [
values.type = "role";
values.person = "friend";
values.current_role = list.roleitemselect.nextindex;
values.word = text.roles.currentitem
]
/stimulustimes = [0=text.friend_word, text.roles, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial self_groups>
/ontrialbegin = [
values.type = "group";
values.person = "self";
values.current_group = list.groupitemselect.nextindex;
values.word = text.groups.currentitem
]
/stimulustimes = [0=text.self_word, text.groups, text.you; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

<trial friend_groups>
/ontrialbegin = [
values.type = "group";
values.person = "friend";
values.current_group = list.groupitemselect.nextindex;
values.word = text.groups.currentitem
]
/stimulustimes = [0=text.friend_word, text.groups, text.friend; 4000=text.timeout]
/validresponse = (21,49)
/ responseinterrupt = immediate
/ beginresponsetime = 0
</trial>

*********************************************
   BLOCKS
*********************************************

<block intro>
/trials = [1=surveypage.enter_friend]
</block>

<block self_traits_1>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_2>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_3>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_4>
/trials = [1-10=trial.self_traits]
</block>

<block self_traits_5>
/trials = [1-10=trial.self_traits]
</block>

<block friend_traits_1>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_2>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_3>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_4>
/trials = [1-10=trial.friend_traits]
</block>

<block friend_traits_5>
/trials = [1-10=trial.friend_traits]
</block>

<block self_roles_1>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_2>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_3>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_4>
/trials = [1-10=trial.self_roles]
</block>

<block self_roles_5>
/trials = [1-10=trial.self_roles]
</block>

<block friend_roles_1>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_2>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_3>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_4>
/trials = [1-10=trial.friend_roles]
</block>

<block friend_roles_5>
/trials = [1-10=trial.friend_roles]
</block>

<block self_groups_1>
/trials = [1-10=trial.self_groups]
</block>

<block self_groups_2>
/trials = [1-10=trial.self_groups]
</block>

<block friend_groups_1>
/trials = [1-10=trial.friend_groups]
</block>

<block friend_groups_2>
/trials = [1-10=trial.friend_groups]
</block>

********************************************* 
 EXPERIMENT
*********************************************
<expt full_exp>
/blocks = [1=block.intro; 2-13=noreplacenorepeat(block.friend_groups_1,block.friend_groups_2,
block.friend_roles_1,block.friend_roles_2,block.friend_roles_3,block.friend_roles_4,block.friend_roles_5,
block.friend_traits_1,block.friend_traits_2,block.friend_traits_3,block.friend_traits_4,block.friend_traits_5,
block.self_groups_1, block.self_groups_2,
block.self_roles_1, block.self_roles_2, block.self_roles_3, block.self_roles_4, block.self_roles_5,
block.self_traits_1, block.self_traits_2, block.self_traits_3, block.self_traits_4, block.self_traits_5)]
</expt>


<trial self_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "self";
values.current_trait = list.traititemselect.nextindex;
values.word = text.traits.currentitem
]

Doing the highlighted bit /ontrialbegin is problematic. This will not reflect the word that actually ends up being displayed by the trial, because selection has not yet occured for the respective <text> element. If you move setting values.word /ontrialend, you'll get an accurate reflection of what actually happened in the respective trial.

More importantly,

> I want participants to see each word once and only once per target (once for them and once for their friend).

is not how you set up your script. If you want each word once *per target* (self / friend), then you need separate <lists> for that. In other words, you ought to do

<list traititemselect_self>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

and

<list traititemselect_friend>
/poolsize = 50
/selectionrate = always
/resetinterval = 0
</list>

and then sample from the proper list in the respective <trial> elements:

<trial self_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "self";
values.current_trait = list.traititemselect_self.nextindex;
...
</trial>

<trial friend_traits>
/ontrialbegin = [
values.type = "trait";
values.person = "friend";
values.current_trait = list.traititemselect_friend.nextindex;
...
</trial>


elobot10
elobot10
Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)Partner Member (746 reputation)
Group: Forum Members
Posts: 11, Visits: 59

Thanks! Everything is working now.

I'm guessing that the repeats were happening because, with both 'self' and 'friend' using the same list, 50 indices were being shared across 100 trials so the counter kept resetting?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
elobot10 - Sunday, July 1, 2018

Thanks! Everything is working now.

I'm guessing that the repeats were happening because, with both 'self' and 'friend' using the same list, 50 indices were being shared across 100 trials so the counter kept resetting?

> I'm guessing that the repeats were happening because, with both 'self' and 'friend' using the same list, 50 indices were being shared across 100 trials so the counter kept resetting?

Yes, that is exactly right (and is the expected behavior). It's like drawing from a single deck of 50 cards with two hands in sets of 10 (e.g. draw 10 cards with the left hand, draw another 10 cards with the left hand, draw 10 cards with the right hand, ...): There is no guarantee that you'd end up with each hand having drawn each unique card exactly once. Using two separate <list>s (i.e. two separate decks of 50 cards, one for each hand, in the above analogy) solves that. Hope this clarifies!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search