VAS: Visual Analogue Scale


Author
Message
jo700
jo700
Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)Esteemed Member (2.2K reputation)
Group: Forum Members
Posts: 17, Visits: 84
Hey everybody,

recently I have tried to implement a VAS into my script. The basic-script I have adopted from a post in millisecond some weeks ago - though I can't find it anymore. That is why I pose my question here.
The problem is, that the post I am referring to, just used 1 VAS. My intention is to implement several VAS (some concerning uncertainty, some attraction etc.). When I do this, the first VAS works perfectly well. If a subject clicks on the VAS-line from 0-100%, a percentage-score appears. The second VAS does not work properly, because if a subject clicks on the VAS-line from 0-100%, the percentage-score of the previous VAS-response appears (instead of the correct percentage-score of the actual VAS-response).

I have the impression that the problem lies somewhere around the "expressions"-element, but I really don't know how to handle that problem. That is why I hope that someone of you has a solution to that problem - that would be really much help!

The following example of 2 VAS should point out my problem:

<block block1A>
/ trials = [1=uncertainty1_trial; 2=question3]
</block>

**************************************************************************************
uncertainty
**************************************************************************************

<trial uncertainty1_trial>
/ stimulusframes = [1=blank, uncertainty1, line1, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line1)
/ branch = [trial.showresponse_uncertainty]
</trial>

<trial showresponse_uncertainty>
/ stimulusframes = [1=Y, responsevalue1]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 1500
/ recorddata = false
</trial>

<text uncertainty>
/ items = ("To which extent do you agree with the following items:")
/ position = (50, 25)
/ select = sequence
/ erase = false
</text>

<text uncertainty1>
/ items = ("I have the impression that I could not really see the face.")
/ position = (50, 25)
/ select = sequence
/ erase = false
</text>

***********************************************************************************
question 3: degree of change
***********************************************************************************

<trial question3>
/ stimulusframes = [1=question3, line2, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line2)
/ branch = [trial.showresponse_question3]
</trial>

<trial showresponse_question3>
/ stimulusframes = [1=X, responsevalue2]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 1500
/ recorddata = false
</trial>

<text question3>
/ items = ("Do you think the region has changed?

Please answer that question by clicking on the black line.")
/ position = (50, 25)
/ select = sequence
/ erase = false
</text>

***********************************************************************************
VAS
***********************************************************************************

*** Scale Items ***

<shape line1>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (700, 6)
/ position = (50, 75)
/ erase = false
</shape>

<shape line2>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (700, 6)
/ position = (50, 75)
/ erase = false
</shape>

<shape leftborder>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (6, 30)
/ position = (16, 75)
/ erase = false
</shape>

<shape rightborder>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (6, 30)
/ position = (84, 75)
/ erase = false
</shape>

<text leftanchor>
/ items = ("I completely disagree")
/ position = (10, 75)
/ size = (50, 50)
/ erase = true(255, 255, 255)
</text>

<text rightanchor>
/ items = ("I completely agree")
/ position = (90, 75)
/ size = (50, 50)
/ erase = true(255, 255, 255)
</text>

*** Response Indicator ***

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

<text Y>
/ fontstyle = ("Arial", -35, true, false, false, false, 5, 0)
/ items = ("o")
/ txcolor = (255, 0, 0)
/ txbgcolor = (transparent)
/ hposition = (trial.uncertainty1_trial.responsex / display.width) * 100
/ vposition = shape.line1.vposition
</text>

*** Response Scoring Routines ***

<expressions A>
/ correctionvalue = (display.width - shape.line1.width) / 2
/ correctedscore = (trial.uncertainty1_trial.responsex - expressions.correctionvalue) / shape.line1.width * 100
/ roundedvalue1 = format("%.2f", expressions.correctedscore)
</expressions>

<expressions B>
/ correctionvalue = (display.width - shape.line2.width) / 2
/ correctedscore = (trial.question3.responsex - expressions.correctionvalue) / shape.line2.width * 100
/ roundedvalue2 = format("%.2f", expressions.correctedscore)
</expressions>

<text responsevalue1>
/ items = ("<% expressions.roundedvalue1 %> %")
/ position = (50, 85)
</text>

<text responsevalue2>
/ items = ("<% expressions.roundedvalue2 %> %")
/ position = (50, 85)
</text>

<shape blank>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
/ erase = false
</shape>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
jo700 - 8 Years Ago
Dave - 8 Years Ago
jo700 - 8 Years Ago
Dave - 8 Years Ago
                     + x [quote] [b] Dave - Monday, January 30, 2017 [/b]...
jo700 - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search