﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Coding values to enable easier data analysis</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 08 Sep 2026 17:42:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Coding values to enable easier data analysis</title><link>https://forums.millisecond.com/Topic19954.aspx</link><description>Dear Inquisit Forum,&lt;br/&gt;&lt;br/&gt;I was wondering if I could have some help regarding the subject title in question. I have run several Inquisit-powered experiments, and often I spend a few hours after data collection restructuring the data into an easier format to analyse (specifically, trying to restructure long into wide data sets) to calculate average scores and standard deviations.&lt;br/&gt;&lt;br/&gt;Please see attached for my script. Essentially, there will be 20 data points per participant. In a 'long' data set, this will obviously mean 20 rows for each participant. As I understand it, this is simply how Inquisit displays your data (however, if there is a way around this, please correct me). However, another way to help with data analysis is for Inquisit to calculate averages and standard deviations as values.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Essentially, the participant will read a scenario (of which there are 20), either a 'good' version, or a 'bad' version of the scenario. The participant presses the spacebar, and this can produce either a 'good' or a 'bad' outcome to the scenario. Thus, there are four possible combinations between a scenario and an outcome - good(scenario)-good(outcome), good-bad, bad-good, and bad-bad. The participant will then estimate the time interval between pressing the spacebar, and the image appearing. Linking this back to my question, this would then lead to each participant have 4 average time interval estimations (and SDs) - one for each possible combination (e.g., good-good). I could do this in Excel, but I'm not especially apt at restructuring data to do this in less than a few hours.&lt;br/&gt;&lt;br/&gt;If anyone has the time to read my script and offer me any advice, I would be very grateful. I apologise in advance if any of my explanation isn't clear.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Josh</description><pubDate>Mon, 14 Nov 2016 07:31:52 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Coding values to enable easier data analysis</title><link>https://forums.millisecond.com/Topic20109.aspx</link><description>&lt;div data-id="20108" class="if-quote-wrapper" unselectable="on" data-guid="1479136860503"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20108" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="20108" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="20108" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Monday, November 14, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20108"&gt;&lt;div class="if-quote-message-margin"&gt;Hi Dave,&lt;br/&gt;&lt;br/&gt;After trialing some pilot participants, I have encountered a minor problem. Sorry to bring this script to your attention again. Essentially, I'm trying to equalise the presentation time of stimuli (the outcome, at either 100, 400, or 700ms) with the (now 24) scenarios and their combinations (good-good, good-bad, bad-good, and bad-bad), such that there is 6 of each combination (6 x 4 = 24, just for clarity). Ideally, this would be 2 of each presentation time per combination, however, I am struggling to create this without further pseudo-randomising my script even more. Currently, participants can receive a random (non-replaced) time for each combination, such that some combinations are occasionally presented only with one or two of the presentation times, through pure chance. Without posting the unnecessarily long script, here is a main section:&lt;br/&gt;&lt;br/&gt;&amp;lt;list targetdurationE&amp;gt;&lt;br/&gt;/items = (100, 400, 700)&lt;br/&gt;/poolsize = 24&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;*********&lt;br/&gt;Scenario 1&lt;br/&gt;*********&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01G_Scenario_Good&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = good_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "good"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01G]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01G_Scenario_Bad&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = good_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "good"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01B]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01B_Scenario_Good&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = bad_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "bad"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01G]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01B_Scenario_Bad&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = bad_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "bad"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01B]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trialS01G&amp;gt;&lt;br/&gt;/stimulustimes = [1 = whiterectangle]&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(picture.S01G, list.targetdurationE.nextvalue)]&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue+1000)]&lt;br/&gt;/ontrialend = [trial.trialS01G.setstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue)]&lt;br/&gt;/ontrialend = [values.onset = list.targetdurationE.currentvalue]&lt;br/&gt;/ontrialend = [trial.trialS01G.resetstimulusframes(100)]&lt;br/&gt;/ontrialend = [values.outcome = "good"]&lt;br/&gt;/timeout = (list.targetdurationE.currentvalue+2000)&lt;br/&gt;/branch = [surveypage.te]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trialS01B&amp;gt;&lt;br/&gt;/stimulustimes = [1 = whiterectangle]&lt;br/&gt;/ontrialbegin = [trial.trialS01B.insertstimulustime(picture.S01B, list.targetdurationE.nextvalue)]&lt;br/&gt;/ontrialbegin = [trial.trialS01B.insertstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue+1000)]&lt;br/&gt;/ontrialend = [trial.trialS01B.setstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue)]&lt;br/&gt;/ontrialend = [values.onset = list.targetdurationE.currentvalue]&lt;br/&gt;/ontrialend = [trial.trialS01B.resetstimulusframes(100)]&lt;br/&gt;/ontrialend = [values.outcome = "bad"]&lt;br/&gt;/timeout = (list.targetdurationE.currentvalue+2000)&lt;br/&gt;/branch = [surveypage.te0]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block Scenario_List_1&amp;gt;&lt;br/&gt;/trials = [1 = noreplace(S01G_scenario_Good); 2-4 = noreplace(S02G_scenario_Bad, S03B_scenario_Good, S04B_scenario_Bad); 5 = noreplace(S05G_scenario_Good); 6-7 = noreplace(S06G_scenario_Bad, S07B_scenario_Good); 8 = noreplace(S08B_scenario_Bad); 9-12 = noreplace(S09G_scenario_Good, S10G_scenario_Bad, S11B_scenario_Good, S12B_scenario_Bad); 13 = noreplace(S13G_scenario_Good); 14-16 = noreplace(S14G_scenario_Bad, S15B_scenario_Good, S16B_scenario_Bad); 17 = noreplace(S17G_scenario_Good); 18-24 = noreplace(S18G_scenario_Bad, S19B_scenario_Good, S20B_scenario_Bad, S21G_scenario_Good, S22G_scenario_Bad, S23B_scenario_Good, S24B_scenario_Bad)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;(some trials are in specific locations because they are followed by an attention task)&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/subjects = (1 of 4)&lt;br/&gt;/blocks = [1 = Scenario_List_1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I imagine this can be achieved through the list function, however, going through the various list attributes hasn't enlightened me as to a possible solution.&lt;br/&gt;&lt;br/&gt;Thank you for your time, once again.&lt;br/&gt;&lt;br/&gt;Josh&lt;a class="if-quote-goto quote-link" href="#" data-id="20108"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Given how you've set up the script generally, you'll need several lists: One for each combination. Then sample from the applicable list.&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trialS01G&amp;gt;&lt;br/&gt;/stimulustimes = [1 = whiterectangle]&lt;br/&gt;&lt;strong&gt;/ ontrialbegin = [if (values.scenario == "good") values.onset = list.targetdurationE_good_good.nextvalue]&lt;br/&gt;/ ontrialbegin = [if (values.scenario == "bad") values.onset = list.targetdurationE_bad_good.nextvalue]&lt;/strong&gt;&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(picture.S01G, &lt;strong&gt;values.onset&lt;/strong&gt;)]&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(shape.whiterectangle, &lt;strong&gt;values.onset&lt;/strong&gt;+1000)]&lt;br/&gt;/ontrialend = [trial.trialS01G.setstimulustime(shape.whiterectangle, &lt;strong&gt;values.onset&lt;/strong&gt;)]&lt;br/&gt;/ontrialend = [trial.trialS01G.resetstimulusframes(100)]&lt;br/&gt;/ontrialend = [values.outcome = "good"]&lt;br/&gt;/timeout = (&lt;strong&gt;values.onset&lt;/strong&gt;+2000)&lt;br/&gt;/branch = [surveypage.te]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list targetdurationE_&lt;strong&gt;good_good&lt;/strong&gt;&amp;gt;&lt;br/&gt;&lt;strong&gt;/items = (100, 400, 700)&lt;br/&gt;/poolsize = 6&lt;/strong&gt;&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list targetdurationE_&lt;strong&gt;bad_good&lt;/strong&gt;&amp;gt;&lt;br/&gt;&lt;strong&gt;/items = (100, 400, 700)&lt;br/&gt;/poolsize = 6&lt;/strong&gt;&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;and so forth.&lt;br/&gt;</description><pubDate>Mon, 14 Nov 2016 07:31:52 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title /><link>https://forums.millisecond.com/Topic20108.aspx</link><description>Hi Dave,&lt;br/&gt;&lt;br/&gt;After trialing some pilot participants, I have encountered a minor problem. Sorry to bring this script to your attention again. Essentially, I'm trying to equalise the presentation time of stimuli (the outcome, at either 100, 400, or 700ms) with the (now 24) scenarios and their combinations (good-good, good-bad, bad-good, and bad-bad), such that there is 6 of each combination (6 x 4 = 24, just for clarity). Ideally, this would be 2 of each presentation time per combination, however, I am struggling to create this without further pseudo-randomising my script even more. Currently, participants can receive a random (non-replaced) time for each combination, such that some combinations are occasionally presented only with one or two of the presentation times, through pure chance. Without posting the unnecessarily long script, here is a main section:&lt;br/&gt;&lt;br/&gt;&amp;lt;list targetdurationE&amp;gt;&lt;br/&gt;/items = (100, 400, 700)&lt;br/&gt;/poolsize = 24&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;*********&lt;br/&gt;Scenario 1&lt;br/&gt;*********&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01G_Scenario_Good&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = good_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "good"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01G]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01G_Scenario_Bad&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = good_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "good"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01B]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01B_Scenario_Good&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = bad_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "bad"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01G]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial S01B_Scenario_Bad&amp;gt;&lt;br/&gt;/stimulustimes = [2000 = bad_1; 7000 = space]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/beginresponsetime = 7000&lt;br/&gt;/ontrialend = [values.scenario = "bad"]&lt;br/&gt;/ontrialend = [values.scenario_number = "1"]&lt;br/&gt;/branch = [trial.trialS01B]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trialS01G&amp;gt;&lt;br/&gt;/stimulustimes = [1 = whiterectangle]&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(picture.S01G, list.targetdurationE.nextvalue)]&lt;br/&gt;/ontrialbegin = [trial.trialS01G.insertstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue+1000)]&lt;br/&gt;/ontrialend = [trial.trialS01G.setstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue)]&lt;br/&gt;/ontrialend = [values.onset = list.targetdurationE.currentvalue]&lt;br/&gt;/ontrialend = [trial.trialS01G.resetstimulusframes(100)]&lt;br/&gt;/ontrialend = [values.outcome = "good"]&lt;br/&gt;/timeout = (list.targetdurationE.currentvalue+2000)&lt;br/&gt;/branch = [surveypage.te]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trialS01B&amp;gt;&lt;br/&gt;/stimulustimes = [1 = whiterectangle]&lt;br/&gt;/ontrialbegin = [trial.trialS01B.insertstimulustime(picture.S01B, list.targetdurationE.nextvalue)]&lt;br/&gt;/ontrialbegin = [trial.trialS01B.insertstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue+1000)]&lt;br/&gt;/ontrialend = [trial.trialS01B.setstimulustime(shape.whiterectangle, list.targetdurationE.currentvalue)]&lt;br/&gt;/ontrialend = [values.onset = list.targetdurationE.currentvalue]&lt;br/&gt;/ontrialend = [trial.trialS01B.resetstimulusframes(100)]&lt;br/&gt;/ontrialend = [values.outcome = "bad"]&lt;br/&gt;/timeout = (list.targetdurationE.currentvalue+2000)&lt;br/&gt;/branch = [surveypage.te0]&lt;br/&gt;/recorddata = false&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block Scenario_List_1&amp;gt;&lt;br/&gt;/trials = [1 = noreplace(S01G_scenario_Good); 2-4 = noreplace(S02G_scenario_Bad, S03B_scenario_Good, S04B_scenario_Bad); 5 = noreplace(S05G_scenario_Good); 6-7 = noreplace(S06G_scenario_Bad, S07B_scenario_Good); 8 = noreplace(S08B_scenario_Bad); 9-12 = noreplace(S09G_scenario_Good, S10G_scenario_Bad, S11B_scenario_Good, S12B_scenario_Bad); 13 = noreplace(S13G_scenario_Good); 14-16 = noreplace(S14G_scenario_Bad, S15B_scenario_Good, S16B_scenario_Bad); 17 = noreplace(S17G_scenario_Good); 18-24 = noreplace(S18G_scenario_Bad, S19B_scenario_Good, S20B_scenario_Bad, S21G_scenario_Good, S22G_scenario_Bad, S23B_scenario_Good, S24B_scenario_Bad)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;(some trials are in specific locations because they are followed by an attention task)&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/subjects = (1 of 4)&lt;br/&gt;/blocks = [1 = Scenario_List_1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I imagine this can be achieved through the list function, however, going through the various list attributes hasn't enlightened me as to a possible solution.&lt;br/&gt;&lt;br/&gt;Thank you for your time, once again.&lt;br/&gt;&lt;br/&gt;Josh</description><pubDate>Mon, 14 Nov 2016 04:48:28 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Coding values to enable easier data analysis</title><link>https://forums.millisecond.com/Topic19998.aspx</link><description>Thanks for your help Dave, once again!&lt;br/&gt;&lt;br/&gt;Josh</description><pubDate>Mon, 31 Oct 2016 07:15:24 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Coding values to enable easier data analysis</title><link>https://forums.millisecond.com/Topic19959.aspx</link><description>&amp;gt;  Linking this back to my question, this would then lead to each participant have 4 average time interval estimations (and SDs) - one for each &lt;br/&gt;&amp;gt; possible combination (e.g., good-good).&lt;br/&gt;&lt;br/&gt;You need four &amp;lt;values&amp;gt; entries -- one for each condition / combination -- where you sum up the respective time estimations provided by the participant. You divide by the number of estimations in the respective condition to get the average (you can use the &amp;lt;expressions&amp;gt; element for that). Similarly, to calculate the respective SDs, you track the respective sum of squares in &amp;lt;values&amp;gt; entries (one per condition) and you can then have an &amp;lt;expression&amp;gt; calculate the running SD.&lt;br/&gt;&lt;br/&gt;See any of the IAT scripts in the library as examples, which do precisely that.&lt;br/&gt;</description><pubDate>Wed, 26 Oct 2016 08:31:47 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>