Millisecond Forums

Adding Standard Deviation to Summary Data File

https://forums.millisecond.com/Topic20946.aspx

By EHP Lab - 3/3/2017

I am using the parametric go/no-go script from the Inquisit script library but I want to calculate the coefficient of variation for each level which requires having the standard deviation of response times for that level. To make it easy to compute, I would like to get the standard deviation as a variable in the summary data file for each participant. Is that possible? If so, what is the simplest way to achieve it? I spent a couple of hours researching the possible ways to do it, but I haven't written an inquisit script for a decade so I'm more than a little rusty, totally unfamiliar with version 5, and am hoping to do this as quickly and easily as possible!!



Thank you so much,
Amie
By Dave - 3/3/2017

EHP Lab - Friday, March 3, 2017
I am using the parametric go/no-go script from the Inquisit script library but I want to calculate the coefficient of variation for each level which requires having the standard deviation of response times for that level. To make it easy to compute, I would like to get the standard deviation as a variable in the summary data file for each participant. Is that possible? If so, what is the simplest way to achieve it? I spent a couple of hours researching the possible ways to do it, but I haven't written an inquisit script for a decade so I'm more than a little rusty, totally unfamiliar with version 5, and am hoping to do this as quickly and easily as possible!!



Thank you so much,
Amie

The easiest way is to add the observations (latencies) in trials of a given level to a <list> -- you could for example, set up a <list> per relevant level. You can then log the respective lists' standardeviation property to the data file(s).
By EHP Lab - 3/3/2017

Dave - Friday, March 3, 2017
EHP Lab - Friday, March 3, 2017
I am using the parametric go/no-go script from the Inquisit script library but I want to calculate the coefficient of variation for each level which requires having the standard deviation of response times for that level. To make it easy to compute, I would like to get the standard deviation as a variable in the summary data file for each participant. Is that possible? If so, what is the simplest way to achieve it? I spent a couple of hours researching the possible ways to do it, but I haven't written an inquisit script for a decade so I'm more than a little rusty, totally unfamiliar with version 5, and am hoping to do this as quickly and easily as possible!!



Thank you so much,
Amie

The easiest way is to add the observations (latencies) in trials of a given level to a <list> -- you could for example, set up a <list> per relevant level. You can then log the respective lists' standardeviation property to the data file(s).

Thank you for your quick reply. I have never used the <list> element before, do you know of any sample script which does what you are suggesting that I could pull from?

Thanks!
Amie
By Dave - 3/3/2017

EHP Lab - Friday, March 3, 2017
Dave - Friday, March 3, 2017
EHP Lab - Friday, March 3, 2017
I am using the parametric go/no-go script from the Inquisit script library but I want to calculate the coefficient of variation for each level which requires having the standard deviation of response times for that level. To make it easy to compute, I would like to get the standard deviation as a variable in the summary data file for each participant. Is that possible? If so, what is the simplest way to achieve it? I spent a couple of hours researching the possible ways to do it, but I haven't written an inquisit script for a decade so I'm more than a little rusty, totally unfamiliar with version 5, and am hoping to do this as quickly and easily as possible!!



Thank you so much,
Amie

The easiest way is to add the observations (latencies) in trials of a given level to a <list> -- you could for example, set up a <list> per relevant level. You can then log the respective lists' standardeviation property to the data file(s).

Thank you for your quick reply. I have never used the <list> element before, do you know of any sample script which does what you are suggesting that I could pull from?

Thanks!
Amie

Here's a simple example to convey the idea and illustrate the proper syntax:

<expt>
/ blocks = [1=level1; 2=level2]
</expt>

<block level1>
/ trials = [1-10 = mytrial]
</block>

<block level2>
/ trials = [1-10 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [
    if (script.currentblock == "level1") list.level1_latencies.appenditem(trial.mytrial.latency);
]
/ ontrialend = [
    if (script.currentblock == "level2") list.level2_latencies.appenditem(trial.mytrial.latency);
]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("this is <%script.currentblock%>")
</text>

<list level1_latencies>
</list>

<list level2_latencies>
</list>

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid, list.level1_latencies.standarddeviation, list.level2_latencies.standarddeviation)
</summarydata>


By EHP Lab - 3/3/2017

Dave - Friday, March 3, 2017
EHP Lab - Friday, March 3, 2017
Dave - Friday, March 3, 2017
EHP Lab - Friday, March 3, 2017
I am using the parametric go/no-go script from the Inquisit script library but I want to calculate the coefficient of variation for each level which requires having the standard deviation of response times for that level. To make it easy to compute, I would like to get the standard deviation as a variable in the summary data file for each participant. Is that possible? If so, what is the simplest way to achieve it? I spent a couple of hours researching the possible ways to do it, but I haven't written an inquisit script for a decade so I'm more than a little rusty, totally unfamiliar with version 5, and am hoping to do this as quickly and easily as possible!!



Thank you so much,
Amie

The easiest way is to add the observations (latencies) in trials of a given level to a <list> -- you could for example, set up a <list> per relevant level. You can then log the respective lists' standardeviation property to the data file(s).

Thank you for your quick reply. I have never used the <list> element before, do you know of any sample script which does what you are suggesting that I could pull from?

Thanks!
Amie

Here's a simple example to convey the idea and illustrate the proper syntax:

<expt>
/ blocks = [1=level1; 2=level2]
</expt>

<block level1>
/ trials = [1-10 = mytrial]
</block>

<block level2>
/ trials = [1-10 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [
    if (script.currentblock == "level1") list.level1_latencies.appenditem(trial.mytrial.latency);
]
/ ontrialend = [
    if (script.currentblock == "level2") list.level2_latencies.appenditem(trial.mytrial.latency);
]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("this is <%script.currentblock%>")
</text>

<list level1_latencies>
</list>

<list level2_latencies>
</list>

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid, list.level1_latencies.standarddeviation, list.level2_latencies.standarddeviation)
</summarydata>



That's perfect. I ran it and it works. Thanks!