Visual analogue scales - confirming response


Author
Message
helzbelz1984
helzbelz1984
Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)Associate Member (206 reputation)
Group: Awaiting Activation
Posts: 1, Visits: 3
Hi,
I was just wondering whether there is a way to change the following script so that it doesn't move on to the next question until the participant has clicked a 'next' button (or something to confirm their response). Additionally, I would like to make it so the participant can change their mind and select a different part of the scale if they wish, rather than automatically just taking their first response.
Any help would be REALLY appreciated!
Thank you!!

<defaults>

/ fontstyle = ("Arial", -19, true, false, false, false, 5, 0)

</defaults>

<data>

/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, text.question.currentitem, expressions.correctedscore]

</data>

*** Response Scoring Routines ***

<expressions>

/ correctionvalue = (display.width - shape.line.width) / 2

/ correctedscore = (trial.VisualAnalogueScale.responsex - expressions.correctionvalue) / shape.line.width * 100

/ roundedvalue = format("%.2f", expressions.correctedscore)

</expressions>

*** Block Definition ***

<block VAS>

/ trials = [1-2=VisualAnalogueScale]

</block>

*** Trial Definitions ***

<trial VisualAnalogueScale>

/ stimulusframes = [1=question, line, leftanchor, rightanchor]

/ inputdevice = mouse

/ validresponse = (line)

/ branch = [trial.showresponse]

</trial>

<trial showresponse>

/ stimulusframes = [1=X]

/ inputdevice = mouse

/ validresponse = (noresponse)

/ timeout = 1500

/ recorddata = false

</trial>

*** Scale Items ***

<shape line>

/ shape = rectangle

/ color = (0, 0, 0)

/ size = (700, 6)

/ position = (50, 75)

/ erase = false

</shape>

<text question>

/ items = ("Please indicate how hungry you feel right now by clicking on the scale at the appropriate point. Please ensure that you use the full range of the scale", "Please indicate how full you feel right now by clicking on the scale at the appropriate point."))

/ position = (50, 25)

/ select = sequence

</text>

<text leftanchor>

/ items = ("Not at all")

/ position = (25, 75)

/ size = (50, 50)

/ erase = false

</text>

<text rightanchor>

/ items = ("Extremely")

/ position = (75, 75)

/ size = (50, 50)

/ erase = false

</text>

*** Response Indicator ***

<text X>

/ fontstyle = ("Arial", -35, true, false, false, false, 5, 0)

/ items = ("X")

/ txcolor = (255, 0, 0)

/ txbgcolor = (transparent)

/ hposition = (trial.VisualAnalogueScale.responsex / display.width) * 100

/ vposition = shape.line.vposition

</text>

*** End Of File ***


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
You would do something along the following lines:

<defaults>
/ fontstyle = ("Arial", -19, true, false, false, false, 5, 0)
</defaults>

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, text.question.currentitem, expressions.correctedscore]
</data>

<values>
/ question = 0
</values>

*** Response Scoring Routines ***
<expressions>
/ correctionvalue = (display.width - shape.line.width) / 2
/ correctedscore = (trial.VisualAnalogueScale.responsex - expressions.correctionvalue) / shape.line.width * 100
/ roundedvalue = format("%.2f", expressions.correctedscore)
</expressions>

*** Block Definition ***

<block VAS>
/ trials = [1-2=VisualAnalogueScale]
</block>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ ontrialbegin = [if (trial.showresponse.response != "change") values.question = counter.questionitems.selectedvalue]
/ stimulusframes = [1=question, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=question, line, leftanchor, rightanchor,X, change, submit]
/ inputdevice = mouse
/ validresponse = (change, submit)
/ branch = [if (trial.showresponse.response == "change") trial.visualanaloguescale]
</trial>

*** Scale Items ***
<shape line>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (700, 6)
/ position = (50, 75)
/ erase = false
</shape>

<text question>
/ items = ("Please indicate how hungry you feel right now by clicking on the scale at the appropriate point. Please ensure that you use the full range of the scale", "Please indicate how full you feel right now by clicking on the scale at the appropriate point.")
/ position = (50, 25)
/ size = (80%,20%)
/ select = values.question
</text>

<counter questionitems>
/ items = (1,2)
/ select = sequence
</counter>

<text leftanchor>
/ items = ("Not at all")
/ position = (25, 75)
/ size = (50, 50)
/ erase = false
</text>

<text rightanchor>
/ items = ("Extremely")
/ position = (75, 75)
/ size = (50, 50)
/ erase = false
</text>

*** Response Indicator ***
<text X>
/ fontstyle = ("Arial", -35, true, false, false, false, 5, 0)
/ items = ("X")
/ txcolor = (255, 0, 0)
/ txbgcolor = (transparent)
/ hposition = (trial.VisualAnalogueScale.responsex / display.width) * 100
/ vposition = shape.line.vposition
</text>

<text change>
/ items = ("CHANGE")
/ position = (40%, 90%)
</text>

<text submit>
/ items = ("SUBMIT")
/ position = (60%, 90%)
</text>
*** End Of File ***

helenr
helenr
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Awaiting Activation
Posts: 11, Visits: 54
That's great, thanks a lot!
I was also wondering whether there is a way to stop it recording the data that was 'changed' (i.e. if participants change their minds, then I only want to know their final response, not their previous).
Thank you!!

Helen
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
Yes, there is:

<defaults>
/ fontstyle = ("Arial", -19, true, false, false, false, 5, 0)
</defaults>

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, text.question.currentitem, trial.visualanaloguescale.latency, expressions.correctedscore]
</data>

<values>
/ question = 0
</values>

*** Response Scoring Routines ***
<expressions>
/ correctionvalue = (display.width - shape.line.width) / 2
/ correctedscore = (trial.VisualAnalogueScale.responsex - expressions.correctionvalue) / shape.line.width * 100
/ roundedvalue = format("%.2f", expressions.correctedscore)
</expressions>

*** Block Definition ***

<block VAS>
/ trials = [1-2=VisualAnalogueScale]
</block>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ ontrialbegin = [if (trial.showresponse.response != "change") values.question = counter.questionitems.selectedvalue]
/ stimulusframes = [1=question, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
/ recorddata = false
</trial>

<trial showresponse>
/ stimulusframes = [1=question, line, leftanchor, rightanchor,X, change, submit]
/ inputdevice = mouse
/ validresponse = (change, submit)
/ branch = [if (trial.showresponse.response == "change") trial.visualanaloguescale else trial.recordresult]
/ recorddata = false
</trial>

<trial recordresult>
/ trialduration = 0
/ validresponse = (0)
</trial>


*** Scale Items ***
<shape line>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (700, 6)
/ position = (50, 75)
/ erase = false
</shape>

<text question>
/ items = ("Please indicate how hungry you feel right now by clicking on the scale at the appropriate point. Please ensure that you use the full range of the scale", "Please indicate how full you feel right now by clicking on the scale at the appropriate point.")
/ position = (50, 25)
/ size = (80%,20%)
/ select = values.question
</text>

<counter questionitems>
/ items = (1,2)
/ select = sequence
</counter>

<text leftanchor>
/ items = ("Not at all")
/ position = (25, 75)
/ size = (50, 50)
/ erase = false
</text>

<text rightanchor>
/ items = ("Extremely")
/ position = (75, 75)
/ size = (50, 50)
/ erase = false
</text>

*** Response Indicator ***
<text X>
/ fontstyle = ("Arial", -35, true, false, false, false, 5, 0)
/ items = ("X")
/ txcolor = (255, 0, 0)
/ txbgcolor = (transparent)
/ hposition = (trial.VisualAnalogueScale.responsex / display.width) * 100
/ vposition = shape.line.vposition
</text>

<text change>
/ items = ("CHANGE")
/ position = (40%, 90%)
</text>

<text submit>
/ items = ("SUBMIT")
/ position = (60%, 90%)
</text>
*** End Of File ***

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search