Millisecond Forums

/branching depending on participant input in dempgraphic survey

https://forums.millisecond.com/Topic12764.aspx

By juliane_d - 3/20/2014

I am using a /branch attribute in order to have one of two likert blocks presented depending on the input in a demographic survey (male, female)
Unfortunately, it always jumps to the male version, regardless the participant input. If I implement the same commands on /onblockbegin attributes, it funnily only jumps to the female version. Can anyone see what I am missing to get this to work?

thanks,
Juliane


*************************************************************************************************************************

<survey demo>
/ pages = [1=demo]
/ responsefontstyle = ("Verdana", -13, false, false, false)
/ itemfontstyle = ("Verdana", -16, true, false, false)
/ itemspacing = 4%
/ showpagenumbers = false
/ finishlabel = "weiter per Mausclick"
/ nextlabel = ">>> Weiter per Mausklick >>>"
/ finishlabel = ">>> Weiter per Mausklick >>>"
/ showbackbutton = false
/ branch = [if (radiobuttons.sex.response = "male") block.male]
/ branch = [if (radiobuttons.sex.response = "female") block.female]
/ branch = [if (radiobuttons.sex.response = "xxx") noblock]
</survey>

<surveypage demo>
/ caption = "Bitte beantworte ein paar Fragen über Dich zum Abschluss der Studie:"
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ questions = [1=sex]
</surveypage>

<radiobuttons sex>
/ caption = "Was ist Dein Geschlecht?"
/ options = ("male", "female", "xxx")
/ required = true
</radiobuttons>

<item male>
/1 = "maleitem1"
/2 = "maleitem2"
</item>

<item female>
/1 = "femaleitem1"
/2 = "femaleitem2"
</item>

<text male>
/ items = male
/ position = (50,65)
</text>

<text female>
/ items = female
/ position = (50,65)
</text>

<likert male>
/ pretrialpause = 500
/ stimulusframes = [1 = male]
/ numpoints = 5
/ anchors = [1 = "stimmt gar nicht"; 3= "xxx"; 5 = "stimmt voll und ganz"]
/ buttonvalues = [1 = "-2", 2 = "-1", 3= "0", 4 = "+1", 5 = "+2"]
/ mouse = true
/ anchorwidth = 185
/ position = (50, 75)
</likert>

<likert female>
/ pretrialpause = 500
/ stimulusframes = [1 = female]
/ numpoints = 5
/ anchors = [1 = "stimmt gar nicht"; 3= "xxx"; 5 = "stimmt voll und ganz"]
/ buttonvalues = [1 = "-2", 2 = "-1", 3= "0", 4 = "+1", 5 = "+2"]
/ mouse = true
/ anchorwidth = 185
/ position = (50, 75)
</likert>

<block male>
/ trials = [1-10=noreplace(male)]
/ branch = [block.male]
</block>

<block female>
/ trials = [1-10=noreplace(female)]
/ branch = [block.female]
</block>

<expt identification>
/ blocks = [1=demo]
</expt>


By Dave - 3/20/2014

You simply do

<expt identification>
/ blocks = [1=demo; 2=female; 3=male]
</expt>

with

<survey demo>
/ pages = [1=demo]
/ responsefontstyle = ("Verdana", -13, false, false, false)
/ itemfontstyle = ("Verdana", -16, true, false, false)
/ itemspacing = 4%
/ showpagenumbers = false
/ finishlabel = "weiter per Mausclick"
/ nextlabel = ">>> Weiter per Mausklick >>>"
/ finishlabel = ">>> Weiter per Mausklick >>>"
/ showbackbutton = false
</survey>

and

<block male>
/ skip = [radiobuttons.sex.response == "female"]
/ trials = [1-10=noreplace(male)]
/ branch = [block.male]
</block>

<block female>
/ skip = [radiobuttons.sex.response == "male"]
/ trials = [1-10=noreplace(female)]
/ branch = [block.female]
</block>