survey with conditional questions


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: 105K
Andraster - Saturday, November 26, 2016
Hi guys,

my experiment looks like this: I have 50 questions. In the first phase, i'm presenting one question at a time, each followed by a survey page on which the subject states if he already knows the answer or not. If the subject answers "yes", the question should not be taken into the the later stages of the experiment. I have tried this:

item questions1>
/1...
</item>

<text questions1>
/ items = questions1
</text>

<trial ScreeningQuestions>
/ stimulustimes = [0 = questions1]
/ timeout = 500
/ ontrialend = [
text.questions2.appenditem(text.questions1.currentitem)
]
</trial>

<radiobuttons q1>
"3" means that the answer is not known
/ optionvalues = ("3","2","1")
</radiobuttons>

<surveypage p1>
/ questions = [1= q1]
/ ontrialend = [
if (radiobuttons.q1.response =! 3) text.Fragen2.removeitem(text.Fragen2.itemcount)
]
</surveypage>

However, the questions do not get removed from questions2, no matter what answer is given. It would be great if someone could help me out here.



The adding and then later removing of items seems tedious and unnecessary. You can completely ditch

<trial ScreeningQuestions>
/ stimulustimes = [0 = questions1]
/ timeout = 500
/ ontrialend = [
text.questions2.appenditem(text.questions1.currentitem)
]

</trial>

and instead only append the item if the response on the <surveypage> indicates it is not known.

<item questions1>
/ 1 = "Q1"
/ 2 = "Q2"
/ 3 = "Q3"
/ 4 = "Q4"
/ 5 = "Q5"
</item>

<text questions1>
/ items = questions1
</text>

<trial ScreeningQuestions>
/ stimulustimes = [0 = questions1]
/ timeout = 5000
</trial>

<radiobuttons q1>
/ caption = "Do you know the answer?"
/ options = ("Not known.", "Known.", "Unsure.")
/ optionvalues = ("3","2","1")
</radiobuttons>

<surveypage p1>
/ questions = [1= q1]
/ ontrialend = [if (radiobuttons.q1.response == "3") text.questions2.appenditem(text.questions1.currentitem);]
</surveypage>

<text questions2>
</text>

<page end>
^number of items in text.questions2: <%text.questions2.itemcount%>
^<%text.questions2.item(1)%>
^<%text.questions2.item(2)%>
^<%text.questions2.item(3)%>
^<%text.questions2.item(4)%>
^<%text.questions2.item(5)%>
</page>

<block myblock>
/ postinstructions = (end)
/ trials = [1-5 = sequence(screeningquestions, p1)]
</block>



Andraster
Andraster
Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)
Group: Forum Members
Posts: 3, Visits: 88
Hi guys,

my experiment looks like this: I have 50 questions. In the first phase, i'm presenting one question at a time, each followed by a survey page on which the subject states if he already knows the answer or not. If the subject answers "yes", the question should not be taken into the the later stages of the experiment. I have tried this:

item questions1>
/1...
</item>

<text questions1>
/ items = questions1
</text>

<trial ScreeningQuestions>
/ stimulustimes = [0 = questions1]
/ timeout = 500
/ ontrialend = [
text.questions2.appenditem(text.questions1.currentitem)
]
</trial>

<radiobuttons q1>
"3" means that the answer is not known
/ optionvalues = ("3","2","1")
</radiobuttons>

<surveypage p1>
/ questions = [1= q1]
/ ontrialend = [
if (radiobuttons.q1.response =! 3) text.Fragen2.removeitem(text.Fragen2.itemcount)
]
</surveypage>

However, the questions do not get removed from questions2, no matter what answer is given. It would be great if someone could help me out here.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search