group conditions


Author
Message
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: 13K, Visits: 104K
You essentially would do something like this (using <text> elements for illustrative purposes ony; it works the same with <picture> elements):

<values>
/ condition = ""
/ youravatar = 1
/ player1avatar = 1
/ player2avatar = 1
/ player3avatar = 1
</values>


<expt same>
/ onexptbegin = [values.condition = "same"]
/ blocks = [1=myblock]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

<expt different>
/ onexptbegin = [values.condition = "different"]
/ blocks = [1=myblock]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block myblock>
/ trials = [1=selectavatar; 2=mytrial]
</block>

<trial selectavatar>
/ ontrialend = [if (trial.selectavatar.response=="target1") values.youravatar=1]
/ ontrialend = [if (trial.selectavatar.response=="target2") values.youravatar=2]
/ ontrialend = [if (trial.selectavatar.response=="target3") values.youravatar=3]
/ ontrialend = [if (trial.selectavatar.response=="target4") values.youravatar=4]
/ ontrialend = [if (values.condition=="same") {
    values.player1avatar=values.youravatar;
    values.player2avatar=values.youravatar;
    values.player3avatar=values.youravatar; }
    ]
/ ontrialend = [if (values.condition=="different") {
    list.targetitems.removeitem(values.youravatar);
    values.player1avatar=list.targetitems.nextvalue;
    values.player2avatar=list.targetitems.nextvalue;
    values.player3avatar=list.targetitems.nextvalue; }
    ]
/ stimulusframes = [1=target1, target2, target3, target4]
/ inputdevice = mouse
/ validresponse = (target1,target2,target3,target4)
</trial>

<trial mytrial>
/ stimulusframes = [1=you, player1, player2, player3]
/ validresponse = (57)
</trial>

<text you>
/ items = targetoptions
/ select = values.youravatar
/ position = (25%, 25%)
/ txcolor = red
</text>

<text player1>
/ items = targetoptions
/ select = values.player1avatar
/ position = (75%, 25%)
</text>

<text player2>
/ items = targetoptions
/ select = values.player2avatar
/ position = (25%, 75%)
</text>

<text player3>
/ items = targetoptions
/ select = values.player3avatar
/ position = (75%, 75%)
</text>

<list targetitems>
/ items = (1,2,3,4)
/ selectionrate = always
</list>

<text target1>
/ items = targetoptions
/ position = (20%, 55%)
/ size = (20%, 20%)
/ select = 1
</text>

<text target2>
/ items = targetoptions
/ position = (40%, 55%)
/ size = (20%, 20%)
/ select = 2
</text>

<text target3>
/ items = targetoptions
/ position = (60%, 55%)
/ size = (20%, 20%)
/ select = 3
</text>

<text target4>
/ items = targetoptions
/ position = (80%, 55%)
/ size = (20%, 20%)
/ select = 4
</text>

<item targetoptions>
/1 = "Avatar_yellow.PNG"
/2 = "Avatar_green.PNG"
/3 = "Avatar_red.PNG"
/4 = "Avatar_blue.PNG"
</item>

Entering an odd (1,3,5,...) group number will run the "same" condition. Entering an even (2,4,6,...) group number will run the "different" condition. I also would not use a <surveypage> to have people select their avatar; using a standard <trial> is easier -- just click on the desired option.
If you prefer using a <surveypage> with <checkboxes>, see this example on how to restrict the number of selectable options:
https://www.millisecond.com/download/library/v3/selectitems/selectitems.zip

lotteettol
lotteettol
Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)Partner Member (707 reputation)
Group: Forum Members
Posts: 6, Visits: 55
Hello!
In my study, I would like to make people choose one of 4 different avatars and make them believe that they take part in the study in a team of three persons: either three persons who chose the same color or three persons who chose different colors. So, in the end I would have eight different possibilities: "You are yellow/green/red/blue and the rest chose the same avatar." or "You are y/g/r/b and the rest chose different avatars"
For example: Mister X selects red --> a) condition similar --> group: red red red b) condition unsimilar --> group: red green blue
I would like to start with the instruction below. Then I would like to show them the group (pictures of the avatars) they are allegedly working with. Could you tell me how to create the different groups afterwards according to the avatar they chose before?
Thank you!

<item targetlabel>
/1 = "Avatare"
</item>

<item target>
</item>


<item targetoptions>
/1 = "Avatar_yellow.PNG"
/2 = "Avatar_green.PNG"
/3 = "Avatar_red.PNG"
/4 = "Avatar_blue.PNG"
</item>



<checkboxes target1>
/ options = ("")
/ position = (20%, 65%)
/ required = false
</checkboxes>

<checkboxes target2>
/ options = ("")
/ position = (40%, 65%)
/ required = false
</checkboxes>

<checkboxes target3>
/ options = ("")
/ position = (60%, 65%)
/ required = false
</checkboxes>

<checkboxes target4>
/ options = ("")
/ position = (80%, 65%)
/ required = false
</checkboxes>



<picture target1>
/ items = targetoptions
/ position = (20%, 55%)
/ size = (20%, 20%)
/ select = 1
</picture>

<picture target2>
/ items = targetoptions
/ position = (40%, 55%)
/ size = (20%, 20%)
/ select = 2
</picture>

<picture target3>
/ items = targetoptions
/ position = (60%, 55%)
/ size = (20%, 20%)
/ select = 3
</picture>

<picture target4>
/ items = targetoptions
/ position = (80%, 55%)
/ size = (20%, 20%)
/ select = 4
</picture>



<surveypage targetpage>
/ caption = "In diesem Experiment bist du Figur _ B_ .
Bitte wähle eine der folgenden Figuren. Sie wird dich im weiteren Verlauf repräsentieren."
/ questions = [1=target1; 2=target2; 3=target3; 4=target4]
/ stimulusframes = [1=target1, target2, target3, target4]
</surveypage>


(Here, the subjects are still able to choose more than one color - how can I restrict the number to one?)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search