Correcting initial response on VAS scale that is implemented via custom VAS script


Author
Message
paullemmens
paullemmens
Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Dear all,


I am building an experiment working from the example script that implements the custom VAS that is available via the download library. The issue that I am running into is that the script at present only allows one response. That is, a participant can indicate his/her response on the line of the VAS only once and then the script automatically continues to the next item.


Although a paper-based VAS works in this way as well, it still is possible to correct the initial response. A computerized solution using a <slider> also enables this, but for various other reasons I would like to refrain from using a slider.


I have progressed to knowing that the problem/challenge is within <trial VAS> and <trial showresponse> (see below), but I haven't been able to find a solution (or even a kludge) to make sure that a participant can correct the initial response. The full script (so far) is attached.



Thanks for any pointer that my help me on my way!


Best, Paul


Attachments
GVA.txt (265 views, 3.00 KB)
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: 108K

<trial showresponse>
/ stimulusframes = [1=checkmark, responsevalue, nextbutton, line]
/ inputdevice = mouse
/ recorddata = true
/ validresponse = (line, nextbutton)
/ ontrialend = [if(trial.showresponse.response=="line") values.x = trial.showresponse.responsex]
/ branch = [if(trial.showresponse.response=="line") trial.showresponse]
</trial>


paullemmens
paullemmens
Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Ah, thanks Dave, the trick is to redraw the line once the initial response is shown and in that trial also record the data. That would have taken quite some time before I would have figured it out. Thanks for your fast response!


paullemmens
paullemmens
Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Hi Dave,


Now that I have the flow going as I like, I realize for the first time that I somehow managed to NOT clear the question when a next item is displayed via <trial VAS>. The original code does do this, but I cannot see the difference (beyond those changes you suggested in <trial VAS> and showresponses).


Can I ask for help once more?



Best regards, Paul


paullemmens
paullemmens
Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)Respected Member (358 reputation)
Group: Forum Members
Posts: 4, Visits: 1

Hi!


Sorry for bothering you! Minutes after my previous post I realized that I needed to reverse my approach. Instead of redrawing the VAS scale, I should have been erasing the text with an additional shape called by an additional trial. My code has now become (the relevant bits):




<trial VAS>


/ stimulusframes = [1=questions, leftborder, rightborder, line, leftanchor, rightanchor]


/ inputdevice = mouse


/ validresponse = (line)


/ recorddata = true


/ branch = [trial.showresponse]


/ ontrialend = [values.x = trial.VAS.responsex]


</trial>



<trial clearVAS>


/ stimulusframes = [1=clearVAS]


/ trialduration = 40


</trial>



<shape clearVAS>


/ shape = rectangle


/ color = (255, 255, 255)


/ position = (50%, values.vas.ypos - 4%)


/ size = (50%, 17)


/ halign = center


</shape>




<trial showresponse>


/ stimulusframes = [1=checkmark, responsevalue, nextbutton, line]


/ inputdevice = mouse


/ recorddata = true


/ validresponse = (line, nextbutton)


/ ontrialbegin = [if(trial.showresponse.response == "line") values.x = trial.showresponse.responsex]


/ branch = [if(trial.showresponse.response == "line") trial.showresponse]


/ branch = [if(trial.showresponse.response == "nextbutton") trial.clearvas]


</trial>



I'd appreciate any feedback that might help to optimize this solution.



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: 108K

In general, see the documentation for the /erase attribute as well as the "How to erase stimuli" topic in the documtation. Specifically, there is no need for a dedicated <trial> to erase elements. You can have this much easier as in


<trial VAS>
/ stimulusframes = [1=clearVAS, questions, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ recorddata = true
/ branch = [trial.showresponse]
/ ontrialend = [values.x = trial.VAS.responsex]
</trial>

<shape clearVAS>
/ shape = rectangle
/ color = (255, 255, 255)
/ position = (50%, values.vas.ypos - 4%)
/ size = (50%, 17)
/ halign = center
/ erase = false
</shape>
 
<trial showresponse>
/ stimulusframes = [1=checkmark, responsevalue, nextbutton, line]
/ inputdevice = mouse
/ recorddata = true
/ validresponse = (line, nextbutton)
/ ontrialbegin = [if(trial.showresponse.response == "line") values.x = trial.showresponse.responsex]
/ branch = [if(trial.showresponse.response == "line") trial.showresponse]
</trial>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search