Problem with VAS after each trial


Problem with VAS after each trial

Author
Message
Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Daanvann - Tuesday, September 25, 2018
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



#1: You need to unconditionally /branch to the VAS trial from each of your other <trial> elements, i.e.

<trial neutraal>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

and

#2: Your <block> should be set up like this:


<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>
                                                                


Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Dave - Tuesday, September 25, 2018
Daanvann - Tuesday, September 25, 2018
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



#1: You need to unconditionally /branch to the VAS trial from each of your other <trial> elements, i.e.

<trial neutraal>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

and

#2: Your <block> should be set up like this:


<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>
                                                                


Dear Dave,

Thank you very much for your quick reply. Unfortunately, I still face the problem with your adjustments. I feel like I am doing something wrong within the VAS, as I am trying to block the stimulus with a white shape, but I cannot figure out what exactly. I already tried to make separate VAS's for each of the trials, but that does not seem to do the trick either. I attached the program. Would very much appreciate it if you could take a quick look at it! (it's probably some rookie mistake)

All the best and again thank you for your help,
Daan 
Attachments
Experiment.txt (7 views, 6.00 KB)
Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Daanvann - Tuesday, September 25, 2018
Dave - Tuesday, September 25, 2018
Daanvann - Tuesday, September 25, 2018
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



#1: You need to unconditionally /branch to the VAS trial from each of your other <trial> elements, i.e.

<trial neutraal>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

and

#2: Your <block> should be set up like this:


<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>
                                                                


Dear Dave,

Thank you very much for your quick reply. Unfortunately, I still face the problem with your adjustments. I feel like I am doing something wrong within the VAS, as I am trying to block the stimulus with a white shape, but I cannot figure out what exactly. I already tried to make separate VAS's for each of the trials, but that does not seem to do the trick either. I attached the program. Would very much appreciate it if you could take a quick look at it! (it's probably some rookie mistake)

All the best and again thank you for your help,
Daan 

You're erasing the stimulus in your regular <trial>s not the VAS:

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

i.e. the stimulus is presented 250ms into the trial, then overwritten by the "blank" shape 700ms later, at 950ms into the trial. Per your /timeout, the VAS is invoked only once 20 seconds are over. I cannot tell what of what I described above is in line with your intentions, but that's how the code as given is supposed to behave.

At any rate, what -- at a minimum -- you'll want to do is make sure the stimuli of any previous VAS trial are overwritten at the start of your regular trials, i.e. you'll want to do something like

<trial neutraal>
/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

Beyond that, the VAS trial is definitely executed after each trial exactly as it should be.

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>


Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Dave - Tuesday, September 25, 2018
Daanvann - Tuesday, September 25, 2018
Dave - Tuesday, September 25, 2018
Daanvann - Tuesday, September 25, 2018
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



#1: You need to unconditionally /branch to the VAS trial from each of your other <trial> elements, i.e.

<trial neutraal>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

and

#2: Your <block> should be set up like this:


<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>
                                                                


Dear Dave,

Thank you very much for your quick reply. Unfortunately, I still face the problem with your adjustments. I feel like I am doing something wrong within the VAS, as I am trying to block the stimulus with a white shape, but I cannot figure out what exactly. I already tried to make separate VAS's for each of the trials, but that does not seem to do the trick either. I attached the program. Would very much appreciate it if you could take a quick look at it! (it's probably some rookie mistake)

All the best and again thank you for your help,
Daan 

You're erasing the stimulus in your regular <trial>s not the VAS:

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

i.e. the stimulus is presented 250ms into the trial, then overwritten by the "blank" shape 700ms later, at 950ms into the trial. Per your /timeout, the VAS is invoked only once 20 seconds are over. I cannot tell what of what I described above is in line with your intentions, but that's how the code as given is supposed to behave.

At any rate, what -- at a minimum -- you'll want to do is make sure the stimuli of any previous VAS trial are overwritten at the start of your regular trials, i.e. you'll want to do something like

<trial neutraal>
/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

Beyond that, the VAS trial is definitely executed after each trial exactly as it should be.

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>


Aah I understand now. That would've taken me some time to figure out. Thanks a lot for your help Dave! I still have some problem with the output now, as it shows both the VAS and the stimulus under Trialcode and I want it to show the stimulus (say: negative, positive1, positive2 etc.) under trialcode and the VAS response under correctedresponse. Any ideas on how to do this? However, I must say I have not looked into this yet myself so if you don't have time, I will try to find the answer myself! 

Again, thank you so much for the help!

All the best,
Daan


 
Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Daanvann - Tuesday, September 25, 2018
Dave - Tuesday, September 25, 2018
Daanvann - Tuesday, September 25, 2018
Hello,

I have just started using Inquisit and ran into a problem regarding a VAS/slider I want to add in my program. I have been trying all day to fix this, but I can't seem to fix it on my own, so any help would be appreciated!

What I want to do is present 30 trials from a sample of 5 items in a random order (so presenting each item 6 times) and I want participants to respond on a slider/VAS after each trial. Below is an example of one of the trials.

<trial neutraal>
/ stimulustimes = [0=ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [if (trial.neutraal.elapsedtime >950) trial.VisualAnalogueScale]
/ timeout = 20000
</trial>

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(VisualAnalogueScale, neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

 If I run the experiment, the stimulus is presented, but after the presentation the VAS does not show up. Again, I am a total noob at this. Does anyone have any idea what I did wrong?

I greatly appreciate it.

Kind regards,
Daan



#1: You need to unconditionally /branch to the VAS trial from each of your other <trial> elements, i.e.

<trial neutraal>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial positief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief1>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

<trial negatief2>
...
/ branch = [trial.VisualAnalogueScale]
</trial>

and

#2: Your <block> should be set up like this:


<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>
                                                                


Dear Dave,

Thank you very much for your quick reply. Unfortunately, I still face the problem with your adjustments. I feel like I am doing something wrong within the VAS, as I am trying to block the stimulus with a white shape, but I cannot figure out what exactly. I already tried to make separate VAS's for each of the trials, but that does not seem to do the trick either. I attached the program. Would very much appreciate it if you could take a quick look at it! (it's probably some rookie mistake)

All the best and again thank you for your help,
Daan 

Dear Dave,

Just wanted to let you know that I fixed the last issue by myself! I am started to get the hang of this! Thanks again for your help! Smile

Kind regards,
Daan
Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Daanvann - Wednesday, September 26, 2018

Aah I understand now. That would've taken me some time to figure out. Thanks a lot for your help Dave! I still have some problem with the output now, as it shows both the VAS and the stimulus under Trialcode and I want it to show the stimulus (say: negative, positive1, positive2 etc.) under trialcode and the VAS response under correctedresponse. Any ideas on how to do this? However, I must say I have not looked into this yet myself so if you don't have time, I will try to find the answer myself! 

Again, thank you so much for the help!

All the best,
Daan


 

Use a <value> and log that to the data file as in:

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ ontrialend = [
values.trialtype = "neutraal"
]

/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ ontrialend = [
values.trialtype = "positief1"
]

/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ ontrialend = [
values.trialtype = "positief2"
]

/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ ontrialend = [
values.trialtype = "negatief1"
]

/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ ontrialend = [
values.trialtype = "negatief2"
]

/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

<values>
/ trialtype = ""
</values>

<data>
/ columns = (date time subject group blocknum blockcode trialnum values.trialtype stimulusitem stimulusitem stimulusitem response latency)
</data>




Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Dave - Wednesday, September 26, 2018
Daanvann - Wednesday, September 26, 2018

Aah I understand now. That would've taken me some time to figure out. Thanks a lot for your help Dave! I still have some problem with the output now, as it shows both the VAS and the stimulus under Trialcode and I want it to show the stimulus (say: negative, positive1, positive2 etc.) under trialcode and the VAS response under correctedresponse. Any ideas on how to do this? However, I must say I have not looked into this yet myself so if you don't have time, I will try to find the answer myself! 

Again, thank you so much for the help!

All the best,
Daan


 

Use a <value> and log that to the data file as in:

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ ontrialend = [
values.trialtype = "neutraal"
]

/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ ontrialend = [
values.trialtype = "positief1"
]

/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ ontrialend = [
values.trialtype = "positief2"
]

/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ ontrialend = [
values.trialtype = "negatief1"
]

/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ ontrialend = [
values.trialtype = "negatief2"
]

/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

<values>
/ trialtype = ""
</values>

<data>
/ columns = (date time subject group blocknum blockcode trialnum values.trialtype stimulusitem stimulusitem stimulusitem response latency)
</data>




Thank you again for your quick reply!
Somehow that doesn't seem to work though. However, I found that by adding the /recorddata = false at the VAS trial, it shows the correctedresponse next to the stimulus. 
Now I did some editing and checks and ran into a whole different kind of problem. The program now consists of 2 practise trials and 30 real trials.

I tried running the script a few times. The data file records 30 trials just as I like it to do. However, it seems to record the response of one of the practise trials (trial 4) and couples it to the first experimental trial (trial 6) in the data file. Also, it seems to not record the response on the last experimental trial. 

Any ideas?
Attachments
experiment2.txt (6 views, 9.00 KB)
Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Daanvann - Wednesday, September 26, 2018
Dave - Wednesday, September 26, 2018
Daanvann - Wednesday, September 26, 2018

Aah I understand now. That would've taken me some time to figure out. Thanks a lot for your help Dave! I still have some problem with the output now, as it shows both the VAS and the stimulus under Trialcode and I want it to show the stimulus (say: negative, positive1, positive2 etc.) under trialcode and the VAS response under correctedresponse. Any ideas on how to do this? However, I must say I have not looked into this yet myself so if you don't have time, I will try to find the answer myself! 

Again, thank you so much for the help!

All the best,
Daan


 

Use a <value> and log that to the data file as in:

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ ontrialend = [
values.trialtype = "neutraal"
]

/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ ontrialend = [
values.trialtype = "positief1"
]

/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ ontrialend = [
values.trialtype = "positief2"
]

/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ ontrialend = [
values.trialtype = "negatief1"
]

/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ ontrialend = [
values.trialtype = "negatief2"
]

/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

<values>
/ trialtype = ""
</values>

<data>
/ columns = (date time subject group blocknum blockcode trialnum values.trialtype stimulusitem stimulusitem stimulusitem response latency)
</data>




Thank you again for your quick reply!
Somehow that doesn't seem to work though. However, I found that by adding the /recorddata = false at the VAS trial, it shows the correctedresponse next to the stimulus. 
Now I did some editing and checks and ran into a whole different kind of problem. The program now consists of 2 practise trials and 30 real trials.

I tried running the script a few times. The data file records 30 trials just as I like it to do. However, it seems to record the response of one of the practise trials (trial 4) and couples it to the first experimental trial (trial 6) in the data file. Also, it seems to not record the response on the last experimental trial. 

Any ideas?

If you suppress data recording of the VAS trial, that's what you'll necessarily get. The VAS always comes *after* the trial it pertains to, if you don't record it you
(a) get the wrong mapping, i.e. your 1st experimental trial only knows the VAS response pertaining to the *previous* practice trial, and
(b) you of course cannot capture any data for the final trial if you don't record the VAS that reflects it.

You need to allow for recording of the VAS trial, no way around that.

Daanvann
Daanvann
Associate Member
Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)Associate Member (60 reputation)

Group: Forum Members
Posts: 8, Visits: 69
Dave - Wednesday, September 26, 2018
Daanvann - Wednesday, September 26, 2018
Dave - Wednesday, September 26, 2018
Daanvann - Wednesday, September 26, 2018

Aah I understand now. That would've taken me some time to figure out. Thanks a lot for your help Dave! I still have some problem with the output now, as it shows both the VAS and the stimulus under Trialcode and I want it to show the stimulus (say: negative, positive1, positive2 etc.) under trialcode and the VAS response under correctedresponse. Any ideas on how to do this? However, I must say I have not looked into this yet myself so if you don't have time, I will try to find the answer myself! 

Again, thank you so much for the help!

All the best,
Daan


 

Use a <value> and log that to the data file as in:

********************************************************************************************************************************************************************
DEMOGRAPHICS
********************************************************************************************************************************************************************
<text opentext>
/size = (500, 70)
/items = openitems
/position = (50, 50)
/halign = center
/select = sequence
</text>

<item openitems>
/1 = "Wat denk je dat de hypothese van deze studie was?"
</item>

<openended open>
/ stimulusframes = [1=opentext]
/ position= (50, 80)
/ charlimit = 100
/ numlines = 5
/ linelength = 20
/ showmousecursor = true
/ buttonlabel = "Klik hier om verder te gaan."
</openended>

INSTRUCTIONS

<item instructions>
/ 1 = "INSTRUCTIONS ETC ETC"
</item>

<item einde>
/ 1 = "De taak is nu afgelopen.

Je kunt je na de volgende vragen melden bij een van de proefleiders.

Druk op de spatiebalk om door te gaan."
</item>

<text instructions>
/ items = instructions
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

<text einde>
/ items = einde
/ select = sequence
/ size = (75%, 75%)
/ txcolor = black
/ hjustify = left
/ resetinterval = 0
</text>

PHOTOS

<item neutraal>
/1 = "nexus2_1_tw_0.00.bmp"
</item>

<item positief1>
/1 = "nexus2_1_tw_1.00.bmp"
</item>

<item positief2>
/1 = "nexus2_1_tw_2.00.bmp"
</item>

<item negatief1>
/1 = "nexus2_1_tw_-1.00.bmp"
</item>

<item negatief2>
/1 = "nexus2_1_tw_-2.00.bmp"
</item>

<picture neutraal>
/ items = neutraal
</picture>

<picture positief1>
/ items = positief1
</picture>

<picture positief2>
/items = positief2
</text>

<picture negatief1>
/items = negatief1
</picture>

<picture negatief2>
/items = negatief2
</picture>

<shape blank>
/ shape = rectangle
/ color = white
/ position = (50, 50)
/ size = (1100, 1100)
</shape>

********************************************************************************************************************************************************************
VISUAL ANALOGUE SCALE
********************************************************************************************************************************************************************

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

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum, latency, 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>

*** Trial Definitions ***

<trial VisualAnalogueScale>
/ stimulusframes = [1=leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

<trial showresponse>
/ stimulusframes = [1=X, responsevalue]
/ inputdevice = mouse
/ validresponse = (noresponse)
/ timeout = 200
/ recorddata = false
</trial>

*** 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 responsevalue>
/ items = ("<% expressions.roundedvalue %> %")
/ position = (50, 75)
</text>

*** Scale Items ***

<shape line>
/ 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 = ("Onbetrouwbaar")
/ position = (25, 50)
/ size = (200, 100)
/ erase = false
</text>

<text rightanchor>
/ items = ("Betrouwbaar")
/ position = (72, 50)
/ size = (200, 100)
/ erase = false
</text>


********************************************************************************************************************************************************************
TRIALS
********************************************************************************************************************************************************************

<trial neutraal>
/ ontrialend = [
values.trialtype = "neutraal"
]

/ stimulustimes = [0=blank, ready; 250=neutraal; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief1>
/ ontrialend = [
values.trialtype = "positief1"
]

/ stimulustimes = [0=blank, ready; 250=positief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial positief2>
/ ontrialend = [
values.trialtype = "positief2"
]

/ stimulustimes = [0=blank, ready; 250=positief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief1>
/ ontrialend = [
values.trialtype = "negatief1"
]

/ stimulustimes = [0=blank, ready; 250=negatief1; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial negatief2>
/ ontrialend = [
values.trialtype = "negatief2"
]

/ stimulustimes = [0=blank, ready; 250=negatief2; 950=blank]
/ beginresponsetime = 250
/ inputdevice = mouse
/ branch = [trial.VisualAnalogueScale]
/ timeout = 2000
</trial>

<trial instructions>
/ stimulustimes = [0=instructions]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial einde>
/ stimulustimes = [0=einde]
/ validresponse = (" ")
/ recorddata = false
</trial>

<text ready>
/ items = ("+")
</text>


********************************************************************************************************************************************************************
BLOCKS
********************************************************************************************************************************************************************

<block facetask>
/ trials = [1=instructions; 2-31=noreplace(neutraal, positief1, positief2, negatief1, negatief2); 32=einde]
</block>

<values>
/ trialtype = ""
</values>

<data>
/ columns = (date time subject group blocknum blockcode trialnum values.trialtype stimulusitem stimulusitem stimulusitem response latency)
</data>




Thank you again for your quick reply!
Somehow that doesn't seem to work though. However, I found that by adding the /recorddata = false at the VAS trial, it shows the correctedresponse next to the stimulus. 
Now I did some editing and checks and ran into a whole different kind of problem. The program now consists of 2 practise trials and 30 real trials.

I tried running the script a few times. The data file records 30 trials just as I like it to do. However, it seems to record the response of one of the practise trials (trial 4) and couples it to the first experimental trial (trial 6) in the data file. Also, it seems to not record the response on the last experimental trial. 

Any ideas?

If you suppress data recording of the VAS trial, that's what you'll necessarily get. The VAS always comes *after* the trial it pertains to, if you don't record it you
(a) get the wrong mapping, i.e. your 1st experimental trial only knows the VAS response pertaining to the *previous* practice trial, and
(b) you of course cannot capture any data for the final trial if you don't record the VAS that reflects it.

You need to allow for recording of the VAS trial, no way around that.

Works like a charm now! Thanks for all your help Dave! You're amazing!
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search