visual analogue scale?


Author
Message
Nina
Nina
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 14, Visits: 73
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 
Attachments
ABCE_Bachelorarbeit_21April.iqx (684 views, 20.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: 12K, Visits: 98K
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Nina
Nina
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 14, Visits: 73
Dave - Tuesday, April 25, 2017
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Ah, I see. Thank you! But if I get you right and only change the definition of values.responseX for each trial but don´t change anything in the <expressions>, how can I logg the different scales in the data element? 
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
Nina - Wednesday, April 26, 2017
Dave - Tuesday, April 25, 2017
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Ah, I see. Thank you! But if I get you right and only change the definition of values.responseX for each trial but don´t change anything in the <expressions>, how can I logg the different scales in the data element? 

You should have all the information you need in the data file if you log the expression. The blockcode and trialcode columns tell you the scale, the logged item numbers and items tell you the scale item, etc. You can aggregate that data as needed. If you want anything beyond that (e.g. variables that sum up the responses by scale), you need to build it into the script and log it.

Nina
Nina
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 14, Visits: 73
Dave - Wednesday, April 26, 2017
Nina - Wednesday, April 26, 2017
Dave - Tuesday, April 25, 2017
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Ah, I see. Thank you! But if I get you right and only change the definition of values.responseX for each trial but don´t change anything in the <expressions>, how can I logg the different scales in the data element? 

You should have all the information you need in the data file if you log the expression. The blockcode and trialcode columns tell you the scale, the logged item numbers and items tell you the scale item, etc. You can aggregate that data as needed. If you want anything beyond that (e.g. variables that sum up the responses by scale), you need to build it into the script and log it.

I am sorry, but I suppose I still don´t get it right. Inquisit is new for me and I have newer programmed before, so excuse me please, if I ask a lot of questions.
 So obviously when using the trial with the counter element (as in your script) I can define the values.responsex and then the data is logged seperatly via the <expression> term. 
In my script I also use a simple Visual Analogue Scale with no counter element. It is not clear to me right now, how I can define properly where those responses are logged. I thought I would need <expressions> for that too? If that is the case, do I have to add something to the trial itself or the <expressions> term?
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
Nina - Wednesday, April 26, 2017
Dave - Wednesday, April 26, 2017
Nina - Wednesday, April 26, 2017
Dave - Tuesday, April 25, 2017
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Ah, I see. Thank you! But if I get you right and only change the definition of values.responseX for each trial but don´t change anything in the <expressions>, how can I logg the different scales in the data element? 

You should have all the information you need in the data file if you log the expression. The blockcode and trialcode columns tell you the scale, the logged item numbers and items tell you the scale item, etc. You can aggregate that data as needed. If you want anything beyond that (e.g. variables that sum up the responses by scale), you need to build it into the script and log it.

I am sorry, but I suppose I still don´t get it right. Inquisit is new for me and I have newer programmed before, so excuse me please, if I ask a lot of questions.
 So obviously when using the trial with the counter element (as in your script) I can define the values.responsex and then the data is logged seperatly via the <expression> term. 
In my script I also use a simple Visual Analogue Scale with no counter element. It is not clear to me right now, how I can define properly where those responses are logged. I thought I would need <expressions> for that too? If that is the case, do I have to add something to the trial itself or the <expressions> term?

You have a raw data file. This provides the trial-by-trial record. If you look at the trialcode column (and those mentioned previously), you see what "scale" a given trial (i.e. line in the data file) belonged to. The value of the expression logged in that same line represents the response to that scale item. Does that clarify?

Nina
Nina
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 14, Visits: 73
Dave - Wednesday, April 26, 2017
Nina - Wednesday, April 26, 2017
Dave - Wednesday, April 26, 2017
Nina - Wednesday, April 26, 2017
Dave - Tuesday, April 25, 2017
Nina - Tuesday, April 25, 2017
Hi Dave, 

Thank you for your help so far! :)
I still got some issues with my script. So I used your Visual Analogue Scale as a basis but created multiple different Scales within the script. There are three different experimental groups and two Scales for each group. The first group has to answer the same questions again while seeing their old answer, so I used your VisualAnalogueScale_Repeat trial. For the other two groups i used independent VASs, because they are not supposed to see their old answer.  

Now I have some trouble with the dataframe. I suppose they yield from the fact that I haven´t definded <expressions> more than once and consequently there is no link to the trials and Inquisit has problems saving the results.  
I tried to fix that myself using your examples but was confused, because in your sample script for the Visual Analogue Scale you used  trial.VisualAnalogueScale.responsex

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

and then there was no further definition in the Visual Analogue Trial.  

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

When I asked you about the Repetition Scale you used values.responsex and that was defined again within the trial. 

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

<trial VisualAnalogueScale>

/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

Obviously both ways worked out fine in your scripts, I was just wondering about which to use for my script. I could also imagine that it´s different whether I use a simple VAS or the VAS_Repeat Trial? And do I guess right, that I would also have to include the newly defined expressions in the <data> colums? 

I hope I could make my point. Would be great if you could give me a hint. Thank you in advance! :) 

For further clarification I´ll include my script. 

values.responsex is a global variable. It isn't necessary to calculate the corrected score in the original script because there is only one <trial> element whose response that calculation is based on -- <trial visualanaloguescale>.

In your script, however, you want to make use of the x coordinate stemming from multiple, *different* trial elements. Hence you store the appropriate x coordinate in the global variable as in

<trial VisualAnalogueScale>
/ ontrialend = [
    counter.Xstore.item = trial.VisualAnalogueScale.responsex;
    values.responseX = trial.VisualAnalogueScale.responsex;
]
/ stimulusframes = [1=eraser, question, leftborder, rightborder, line, leftanchor, rightanchor]
/ inputdevice = mouse
/ validresponse = (line)
/ branch = [trial.showresponse]
</trial>

and use the variable -- values.responsex -- in the expression. You can see this script attached to my previous response:

https://www.millisecond.com/forums/FindPost21395.aspx

<trial CSESScale>
/ ontrialend = [
    counter.CSESXstore.item = trial.CSESScale.responsex;
    values.responseX = trial.CSESScale.responsex;
]
...
</trial>

<trial PANASScale>
/ ontrialend = [
    counter.PANASXstore.item = trial.PANASScale.responsex;
    values.responseX = trial.PANASScale.responsex;
]
...
</trial>

and so forth.

And yes, if you define additional expressions and want them logged, you need to add them to the <data> element's /columns attribute.

Ah, I see. Thank you! But if I get you right and only change the definition of values.responseX for each trial but don´t change anything in the <expressions>, how can I logg the different scales in the data element? 

You should have all the information you need in the data file if you log the expression. The blockcode and trialcode columns tell you the scale, the logged item numbers and items tell you the scale item, etc. You can aggregate that data as needed. If you want anything beyond that (e.g. variables that sum up the responses by scale), you need to build it into the script and log it.

I am sorry, but I suppose I still don´t get it right. Inquisit is new for me and I have newer programmed before, so excuse me please, if I ask a lot of questions.
 So obviously when using the trial with the counter element (as in your script) I can define the values.responsex and then the data is logged seperatly via the <expression> term. 
In my script I also use a simple Visual Analogue Scale with no counter element. It is not clear to me right now, how I can define properly where those responses are logged. I thought I would need <expressions> for that too? If that is the case, do I have to add something to the trial itself or the <expressions> term?

You have a raw data file. This provides the trial-by-trial record. If you look at the trialcode column (and those mentioned previously), you see what "scale" a given trial (i.e. line in the data file) belonged to. The value of the expression logged in that same line represents the response to that scale item. Does that clarify?

Actually that was clear to me. 
Anyway it works out now, I suppose all problems were due to stupid thinking errors on my part. Thank you for your help!  
Nina
Nina
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 14, Visits: 73
Hey Dave,

I still got trouble with my data Output. Somehow Inqusit copies the text.scale.currentitem and all other responses in all lines of the Output and not just for the line in which it is needed.
I include the output and the data specification for clarification of the issue.
Would be great if you could be of assistance.

Thank you!

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum,latency, textbox.Alter.response, radiobuttons.Geschlecht.response, radiobuttons.Student.response, textbox.Taetigkeit.response, radiobuttons.Deutschkenntnisse.response, radiobuttons.Muttersprache.response, radiobuttons.Hoervermoegen.response, textbox.ahb.response, radiobuttons.Sehvermoegen.response, radiobuttons.Medikamente.response, textbox.am.response, text.swls.currentitem, text.cses.currentitem, text.panas.currentitem,expressions.correctedscore]
</data>

Attachments
ABCE_1.iqdat (607 views, 32.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: 12K, Visits: 98K
Nina - Wednesday, May 31, 2017
Hey Dave,

I still got trouble with my data Output. Somehow Inqusit copies the text.scale.currentitem and all other responses in all lines of the Output and not just for the line in which it is needed.
I include the output and the data specification for clarification of the issue.
Would be great if you could be of assistance.

Thank you!

<data>
/ columns = [subject, date, time, blockcode, trialcode, trialnum,latency, textbox.Alter.response, radiobuttons.Geschlecht.response, radiobuttons.Student.response, textbox.Taetigkeit.response, radiobuttons.Deutschkenntnisse.response, radiobuttons.Muttersprache.response, radiobuttons.Hoervermoegen.response, textbox.ahb.response, radiobuttons.Sehvermoegen.response, radiobuttons.Medikamente.response, textbox.am.response, text.swls.currentitem, text.cses.currentitem, text.panas.currentitem,expressions.correctedscore]
</data>

The data output is as it is supposed to be. text.cses.currentitem reflects the current item selected in <text cses>. This does not change just because the trial a given row reflects is not from the cses scale.

Edited 7 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search