Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x[quote]+x[quote]+x[quote]Hi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :(
text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text>
<item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item>
<text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text>
<item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item>
************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear.
When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
Items belong to only one category. If you make an error, a red X will appear.
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word.
When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
Items belong to only one category. If you make an error, a red X will appear.
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." </item>
<instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct>
<page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page>
**************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions>
******************************* General Helper Instructions ******************************
<text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text>
*********************************************************** these instructions will be run if the script is run on a touchscreen ***********************************************************
<text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text>
<text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen.
For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text>
************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! **************************************************************************************************************
************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher
<defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults>
************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** **************************************************************************************************************
Note: data file explanations under User Manual Information at the top
*********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data>
*********************** summary data file ***********************
<summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata>
************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run)
/responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode
/primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime
<values> /completed = 0
/responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = ""
/primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values>
************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test)
/propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials
/propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials
/propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets
<expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean
/propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean
/propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean
/propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions>
************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** **************************************************************************************************************
Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text>
<trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial>
This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial>
<trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial>
Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block>
************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** **************************************************************************************************************
<text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text>
<text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text>
<shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape>
<picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture>
<text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text>
************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list>
Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection.
!!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list>
************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime *************************************************
<list accuracy> </list>
<list latencies> </list>
<list accuracy_Base> </list>
<list latencies_Base> </list>
<list accuracy_U_Base> </list>
<list latencies_U_Base> </list>
<list accuracy_P_Base> </list>
<list latencies_P_Base> </list>
<list accuracy_test> </list>
<list latencies_test> </list>
<list accuracy_UU_test> </list>
<list latencies_UU_test> </list>
<list accuracy_UP_test> </list>
<list latencies_UP_test> </list>
<list accuracy_PU_test> </list>
<list latencies_PU_test> </list>
<list accuracy_PP_test> </list>
<list latencies_PP_test> </list>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
<trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem;
list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1);
if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval
<trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem;
list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1);
if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** **************************************************************************************************************
Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block>
Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block>
************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** **************************************************************************************************************
<expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt>
************************************************************************************************************** End of File **************************************************************************************************************
> I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way?
Yes, it works exactly the same way.
The code you posted does not make sense.
#1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection.
<item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace </item>
<item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex </item>
#3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier.
In a nutshell, what you want to do is something like this:
<usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets
SCRIPT INFO
Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC
Copyright © 01-11-2017 Millisecond Software
BACKGROUND INFO
*Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm.
*Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words.
DATA FILE INFORMATION: The default data stored in the data files are:
(1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant)
build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms)
(2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant)
script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets
EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects
1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target
Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms)
STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli
INSTRUCTIONS generic instructions; can be edited under section Editable Instructions
EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.
The parameters you can change are:
/baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%)
/primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms)
/responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I)
</usermanual>
************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** **************************************************************************************************************
<parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5%
/primeduration = 200 /PT_ISI = 100 /ITI = 2500
/responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters>
************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** **************************************************************************************************************
<item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item>
<item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item>
<item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item>
<item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item>
************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear.
When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
Items belong to only one category. If you make an error, a red X will appear.
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word.
When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
Items belong to only one category. If you make an error, a red X will appear.
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." </item>
<instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct>
<page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page>
**************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions>
******************************* General Helper Instructions ******************************
<text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text>
*********************************************************** these instructions will be run if the script is run on a touchscreen ***********************************************************
<text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text>
<text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen.
For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text>
************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! **************************************************************************************************************
************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher
<defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults>
************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** **************************************************************************************************************
Note: data file explanations under User Manual Information at the top
*********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data>
*********************** summary data file ***********************
<summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata>
************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run)
/responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode
/primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0
/responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = ""
/primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values>
************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test)
/propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials
/propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials
/propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets
<expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean
/propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean
/propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean
/propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions>
************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** **************************************************************************************************************
Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text>
<trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial>
This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial>
<trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial>
Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block>
************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** **************************************************************************************************************
<text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text>
<text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text>
<shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape>
<picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture>
<picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture>
<text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text>
************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>
Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>
Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection.
!!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>
Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection.
!!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>
************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime *************************************************
<list accuracy> </list>
<list latencies> </list>
<list accuracy_Base> </list>
<list latencies_Base> </list>
<list accuracy_U_Base> </list>
<list latencies_U_Base> </list>
<list accuracy_P_Base> </list>
<list latencies_P_Base> </list>
<list accuracy_test> </list>
<list latencies_test> </list>
<list accuracy_UU_test> </list>
<list latencies_UU_test> </list>
<list accuracy_UP_test> </list>
<list latencies_UP_test> </list>
<list accuracy_PU_test> </list>
<list latencies_PU_test> </list>
<list accuracy_PP_test> </list>
<list latencies_PP_test> </list>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
<trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1);
if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant)
/ ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1);
if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval
<trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1);
if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant)
/ ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1);
if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem;
list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1);
if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1);
if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** **************************************************************************************************************
Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block>
Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block>
<list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>
************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** **************************************************************************************************************
<expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt>
************************************************************************************************************** End of File **************************************************************************************************************
Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test
I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things.
Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this:
Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list>
Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list>
The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute.
<block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, P_baseline)] </block>
Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above.
I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error
What error? Can't say anything about that if I don't know what the error is.
> Well it is running now but still having the same issue as before
How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is.
Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all
ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block>
Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block>
<list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>
> wouldnt I only have 10 and 11 trials [...]
Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though,
<block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block>
you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is
<block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block>
Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File.
To be clear, the relevant code for the baseline block and associated trials should read:
// 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block>
// 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list>
// 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list>
// U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1);
if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
// P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant)
/ ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1);
if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file.
Finally working, thank you SO much :)
Hi Dave,
Thank you for your previous assistance. I am trying to rerun the same experiment - however I am changing the target item lists. I expected that editing the existing script would not give me any issues but for some reason I am having a problem. I need each prime to appear against each target item, and currently that is not happening. I don't need the baseline trial to test every target, so I've left it at 21 trials as before. I currently have 31 attributes (21 pleasant, 10 unpleasant). I've pasted my script below and was hoping you would be able to spot the issue? Thanks you
<usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets
SCRIPT INFO
Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC
Copyright © 01-11-2017 Millisecond Software
BACKGROUND INFO
*Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm.
*Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words.
DATA FILE INFORMATION: The default data stored in the data files are:
(1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant)
build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms)
(2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant)
script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets
EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects
1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target
Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms)
STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli
INSTRUCTIONS generic instructions; can be edited under section Editable Instructions
EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.
The parameters you can change are:
/baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%)
/primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms)
/responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I)
</usermanual>
************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** **************************************************************************************************************
<parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5%
/primeduration = 200 /PT_ISI = 100 /ITI = 2500
/responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters>
************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** **************************************************************************************************************
<item UnpleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item>
<item PleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item>
<item UnpleasantTargets> /1 = "EXPENSIVE" /2 = "COMPLICATED" /3 = "BORING" /4 = "UNORIGINAL" /5 = "FOLLOWER" /6 = "OUT-OF-DATE" /7 = "SELFISH" /8 = "UNRELIABLE" /9 = "FAKE" /10 = "HOSTILE" </item>
<item PleasantTargets> /1 = "AVAILABLE" /2 = "FINANCIAL WELLNESS" /3 = "TRUSTWORTHY" /4 = "PROUDLY SOUTH AFRICAN" /5 = "SOCIAL IMPROVEMENT" /6 = "HONEST" /7 = "INVESTMENT EXPERTS" /8 = "LIFETIME PARTNER" /9 = "RELEVANT OFFERS" /10 = "CONVENIENT" /11 = "EASY TO UNDERSTAND" /12 = "PROUD CLIENTS" /13 = "INFORMS ME" /14 = "ENCOURAGES FINANCIAL RESPONSIBILITY" /15 = "VALUE FOR MONEY" /16 = "COOL" /17 = "GOOD ADVERTISING" /18 = "UNDERSTANDS ME" /19 = "INNOVATIVE" /20 = "QUALITY SERVICE" /21 = "EMPOWERING" </item>
************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 ="Your task is to sort the word that appears in the middle of the screen into the correct category. The categories will appear on the top left and rihgt sides of your screen. Words will appear one-by-one in the middle of the screen. A row of '***' will flash before each word and alert you that the word is about to appear.
When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
Items belong to only one category. If you make an error, a red X will appear.
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." /2 = "You will now complete the same task, but this time a picture instead of the '***' will flash before the word you are asked to categorize. Ignore the flashing picture as best as you can and focus on sorting the word into the correct category.
When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>').
This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible.
Press <SPACEBAR> to start." </item>
<instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct>
<page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page>
**************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions>
******************************* General Helper Instructions ******************************
<text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text>
*********************************************************** these instructions will be run if the script is run on a touchscreen ***********************************************************
<text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text>
<text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen.
For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text>
************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! **************************************************************************************************************
************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher
<defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults>
************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** **************************************************************************************************************
Note: data file explanations under User Manual Information at the top
*********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data>
*********************** summary data file ***********************
<summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata>
************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run)
/responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode
/primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0
/responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = ""
/primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values>
************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test)
/propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials
/propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials
/propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets
<expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean
/propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean
/propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean
/propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions>
************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** **************************************************************************************************************
Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text>
<trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial>
This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial>
<trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial>
Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block>
************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** **************************************************************************************************************
<text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text>
<text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text>
<shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape>
<picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture>
<picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture>
<text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text>
<text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text>
************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>
Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21) / replace = false / resetinterval = 1 </list>
Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection.
!!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>
Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection.
!!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>
// 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list>
// 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) / replace = false / resetinterval = 1 </list>
************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime *************************************************
<list accuracy> </list>
<list latencies> </list>
<list accuracy_Base> </list>
<list latencies_Base> </list>
<list accuracy_U_Base> </list>
<list latencies_U_Base> </list>
<list accuracy_P_Base> </list>
<list latencies_P_Base> </list>
<list accuracy_test> </list>
<list latencies_test> </list>
<list accuracy_UU_test> </list>
<list latencies_UU_test> </list>
<list accuracy_UP_test> </list>
<list latencies_UP_test> </list>
<list accuracy_PU_test> </list>
<list latencies_PU_test> </list>
<list accuracy_PP_test> </list>
<list latencies_PP_test> </list>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
// U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1);
if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
// P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant)
/ ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1);
if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** **************************************************************************************************************
Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval
<trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1);
if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant)
/ ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1);
if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant)
/ ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem;
list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1);
if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
<trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem;
list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1);
if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial>
************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** **************************************************************************************************************
// 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block>
Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-157 = list.triallist] </block>
<list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 155 </list>
************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** **************************************************************************************************************
<expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt>
************************************************************************************************************** End of File **************************************************************************************************************
[/quote]> I am having a problem. I need each prime to appear against each target item, and currently that is not happening Then you need to pair your primes and targets as needed and then sample from those pairs. This is generally covered in the "How to present stimulus pairs" topic in the documentation and the exact same approach applies to pairing <list>s holding the respective prime and target item numbers. [/quote]Thanks. I believe this is what I've done so not sure what the issue is [/quote] Yes and no. You have them paired properly for the PP and UU case. <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, ...) / selectionmode = list.PleasantTargetitemnumbers.currentindex/ resetinterval = 1 </list> Selection for <list PleasantPrimeitemnumbers> depends on selection in list.PleasantTargetitemnumbers.currentindexI.e., this <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue;... </trial> makes sense. For the PU and UP case, however, there is no pairing. <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue;... </trial> There is no relationship between <list PleasantPrimeitemnumbers> and <list UnpleasantTargeittemnumbers> <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, ...) / selectionmode = list.PleasantTargetitemnumbers.currentindex/ resetinterval = 1 </list> <list UnpleasantTargeittemnumbers> determines selection in <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex/ resetinterval = 1 </list> I.e., you would need separate lists of prime-target pairings for each trial-type. It is unclear to me whether you eventually only want to run the PP and UU trials, or all four combinations (PP, UU, PU, UP). If the former -- only PP and UU -- then I don't understand the specification of the trial-selection list <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 155 </list> You have 5 x 10 = 50 prime-target combinations in the UU case. You have 5 x 21 = 105 prime-target combinations in the PP case. with those /itemprobabilities / itemprobabilities = (0.4762, 0.5238) you'll get 0.4762 x 155 ~= 74 UU trials, not 50, and 0.5238 x 155 ~= 81 PP trials, not 105. Does this make sense?
|
|
|
Sylwia22
|
|
Group: Forum Members
Posts: 1,
Visits: 7
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x[quote]+x[quote]Hi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File. To be clear, the relevant code for the baseline block and associated trials should read: // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file. Finally working, thank you SO much :) Hi Dave, Thank you for your previous assistance. I am trying to rerun the same experiment - however I am changing the target item lists. I expected that editing the existing script would not give me any issues but for some reason I am having a problem. I need each prime to appear against each target item, and currently that is not happening. I don't need the baseline trial to test every target, so I've left it at 21 trials as before. I currently have 31 attributes (21 pleasant, 10 unpleasant). I've pasted my script below and was hoping you would be able to spot the issue? Thanks you <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item PleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item UnpleasantTargets> /1 = "EXPENSIVE" /2 = "COMPLICATED" /3 = "BORING" /4 = "UNORIGINAL" /5 = "FOLLOWER" /6 = "OUT-OF-DATE" /7 = "SELFISH" /8 = "UNRELIABLE" /9 = "FAKE" /10 = "HOSTILE" </item> <item PleasantTargets> /1 = "AVAILABLE" /2 = "FINANCIAL WELLNESS" /3 = "TRUSTWORTHY" /4 = "PROUDLY SOUTH AFRICAN" /5 = "SOCIAL IMPROVEMENT" /6 = "HONEST" /7 = "INVESTMENT EXPERTS" /8 = "LIFETIME PARTNER" /9 = "RELEVANT OFFERS" /10 = "CONVENIENT" /11 = "EASY TO UNDERSTAND" /12 = "PROUD CLIENTS" /13 = "INFORMS ME" /14 = "ENCOURAGES FINANCIAL RESPONSIBILITY" /15 = "VALUE FOR MONEY" /16 = "COOL" /17 = "GOOD ADVERTISING" /18 = "UNDERSTANDS ME" /19 = "INNOVATIVE" /20 = "QUALITY SERVICE" /21 = "EMPOWERING" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 ="Your task is to sort the word that appears in the middle of the screen into the correct category. The categories will appear on the top left and rihgt sides of your screen. Words will appear one-by-one in the middle of the screen. A row of '***' will flash before each word and alert you that the word is about to appear. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will now complete the same task, but this time a picture instead of the '***' will flash before the word you are asked to categorize. Ignore the flashing picture as best as you can and focus on sorting the word into the correct category. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21) / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-157 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 155 </list> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** [/quote]> I am having a problem. I need each prime to appear against each target item, and currently that is not happening Then you need to pair your primes and targets as needed and then sample from those pairs. This is generally covered in the "How to present stimulus pairs" topic in the documentation and the exact same approach applies to pairing <list>s holding the respective prime and target item numbers. [/quote] Thanks. I believe this is what I've done so not sure what the issue is
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x[quote]Hi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File. To be clear, the relevant code for the baseline block and associated trials should read: // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file. Finally working, thank you SO much :) Hi Dave, Thank you for your previous assistance. I am trying to rerun the same experiment - however I am changing the target item lists. I expected that editing the existing script would not give me any issues but for some reason I am having a problem. I need each prime to appear against each target item, and currently that is not happening. I don't need the baseline trial to test every target, so I've left it at 21 trials as before. I currently have 31 attributes (21 pleasant, 10 unpleasant). I've pasted my script below and was hoping you would be able to spot the issue? Thanks you <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item PleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item UnpleasantTargets> /1 = "EXPENSIVE" /2 = "COMPLICATED" /3 = "BORING" /4 = "UNORIGINAL" /5 = "FOLLOWER" /6 = "OUT-OF-DATE" /7 = "SELFISH" /8 = "UNRELIABLE" /9 = "FAKE" /10 = "HOSTILE" </item> <item PleasantTargets> /1 = "AVAILABLE" /2 = "FINANCIAL WELLNESS" /3 = "TRUSTWORTHY" /4 = "PROUDLY SOUTH AFRICAN" /5 = "SOCIAL IMPROVEMENT" /6 = "HONEST" /7 = "INVESTMENT EXPERTS" /8 = "LIFETIME PARTNER" /9 = "RELEVANT OFFERS" /10 = "CONVENIENT" /11 = "EASY TO UNDERSTAND" /12 = "PROUD CLIENTS" /13 = "INFORMS ME" /14 = "ENCOURAGES FINANCIAL RESPONSIBILITY" /15 = "VALUE FOR MONEY" /16 = "COOL" /17 = "GOOD ADVERTISING" /18 = "UNDERSTANDS ME" /19 = "INNOVATIVE" /20 = "QUALITY SERVICE" /21 = "EMPOWERING" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 ="Your task is to sort the word that appears in the middle of the screen into the correct category. The categories will appear on the top left and rihgt sides of your screen. Words will appear one-by-one in the middle of the screen. A row of '***' will flash before each word and alert you that the word is about to appear. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will now complete the same task, but this time a picture instead of the '***' will flash before the word you are asked to categorize. Ignore the flashing picture as best as you can and focus on sorting the word into the correct category. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21) / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-157 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 155 </list> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** [/quote] > I am having a problem. I need each prime to appear against each target item, and currently that is not happening Then you need to pair your primes and targets as needed and then sample from those pairs. This is generally covered in the "How to present stimulus pairs" topic in the documentation and the exact same approach applies to pairing <list>s holding the respective prime and target item numbers.
|
|
|
sylwy22
|
|
Group: Forum Members
Posts: 16,
Visits: 108
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File. To be clear, the relevant code for the baseline block and associated trials should read: // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file. Finally working, thank you SO much :) Hi Dave, Thank you for your previous assistance. I am trying to rerun the same experiment - however I am changing the target item lists. I expected that editing the existing script would not give me any issues but for some reason I am having a problem. I need each prime to appear against each target item, and currently that is not happening. I don't need the baseline trial to test every target, so I've left it at 21 trials as before. I currently have 31 attributes (21 pleasant, 10 unpleasant). I've pasted my script below and was hoping you would be able to spot the issue? Thanks you <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item PleasantPrimes> /1 = "Discovery.I.png" /2 = "Sanlam.I.png" /3 = "Liberty.I.png" /4 = "Old Mutual.I.png" /5 = "Momentum.I.png" </item> <item UnpleasantTargets> /1 = "EXPENSIVE" /2 = "COMPLICATED" /3 = "BORING" /4 = "UNORIGINAL" /5 = "FOLLOWER" /6 = "OUT-OF-DATE" /7 = "SELFISH" /8 = "UNRELIABLE" /9 = "FAKE" /10 = "HOSTILE" </item> <item PleasantTargets> /1 = "AVAILABLE" /2 = "FINANCIAL WELLNESS" /3 = "TRUSTWORTHY" /4 = "PROUDLY SOUTH AFRICAN" /5 = "SOCIAL IMPROVEMENT" /6 = "HONEST" /7 = "INVESTMENT EXPERTS" /8 = "LIFETIME PARTNER" /9 = "RELEVANT OFFERS" /10 = "CONVENIENT" /11 = "EASY TO UNDERSTAND" /12 = "PROUD CLIENTS" /13 = "INFORMS ME" /14 = "ENCOURAGES FINANCIAL RESPONSIBILITY" /15 = "VALUE FOR MONEY" /16 = "COOL" /17 = "GOOD ADVERTISING" /18 = "UNDERSTANDS ME" /19 = "INNOVATIVE" /20 = "QUALITY SERVICE" /21 = "EMPOWERING" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 ="Your task is to sort the word that appears in the middle of the screen into the correct category. The categories will appear on the top left and rihgt sides of your screen. Words will appear one-by-one in the middle of the screen. A row of '***' will flash before each word and alert you that the word is about to appear. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will now complete the same task, but this time a picture instead of the '***' will flash before the word you are asked to categorize. Ignore the flashing picture as best as you can and focus on sorting the word into the correct category. When the word belongs to the category on the left, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21) / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-157 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 155 </list> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File **************************************************************************************************************
|
|
|
sylwy22
|
|
Group: Forum Members
Posts: 16,
Visits: 108
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File. To be clear, the relevant code for the baseline block and associated trials should read: // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file. Finally working, thank you SO much :)
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File. To be clear, the relevant code for the baseline block and associated trials should read: // 10 U_baseline trials, 11 P_baseline trials <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> // 10 U items (1-10) <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> // 11 P items <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> // U_baseline trial samples item number from list.UTargetitemnumbers <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> // P_baseline trial samples item number from list.PTargetitemnumbers <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> And if you run this, you should end up with 11 P_baseline trials -- each P target item 1 to 11 shown once -- and 10 U_baseline trials -- each U target item 1 to 10 shown once. See attached data file.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done? Can you put the script as it is including all other files it requires (images, etc.) into a ZIP archive and attach it to this thread? To attach the file click +Insert -> Add File.
|
|
|
sylwy22
|
|
Group: Forum Members
Posts: 16,
Visits: 108
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> Thank you. I've edited this now but unfortunately this still doesn't work- some attributes appear twice and some not at all. Is there any other way that this can be done?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list> > wouldnt I only have 10 and 11 trials [...] Yes, my bad. I got that mixed up. 10 and 11, not 20 and 21. Regardless, though, <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block> you have 20 each specified here, not 20 and 21, or the correct 10 and 11. So, the correct spec is <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline)] </block>
|
|
|
sylwy22
|
|
Group: Forum Members
Posts: 16,
Visits: 108
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+xHi everyone, This is the first script I have ever worked on and while I have my experiment running, when I check the data it is not running as I would like it to. I have a single group of primes with 5 images. I then have 11x words in pleasant category targets and 10x words in unpleasant category targets. I need 105 trials, where each of the 21 targets is primed with each of the 5 images. At the moment the primed images are chosen at random. For example, target 1 will be primed by image a,b,c,a,a (so some of the prime images are repeated more then once, and others are not used at all). What I need is target 1 for example,to be primed by images a,b,c,d,e and target 2 to be primed by images a,b,c,d,e. There can be no repeating of the same prime on the same target. I have been struggling with this and really need to get it sorted, does anybody have a solution to this? Thanks in advance! You need to pair the prime and target stimuli as detailed in https://www.millisecond.com/support/docs/v5/html/howto/howtopairs.htmi.e. you need to specify your 5 x 21 = 105 prime-target pairs and then sample randomly from those 105 pairs. Thanks for your response! I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? I am really struggling- while I've read the documents I'm very new to this. I've been trying to edit the current affective priming procedure script. I've pasted my script below I can't get this right, am not sure if I am on the right track at all or completely off the mark :( text PleasantPrimes> / items = PleasantPrimes / select = noreplace </text> <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png") / select = noreplace </item> <text UnpleasantTargets> / items = UnpleasantTargets / select = noreplace </text> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / select = text.UnpleasantTargets.currentindex </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed:0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant:responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label:the label that goes with the assigned category A scancode /responsekeyPleasant:responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label:the label that goes with the assigned category B scancode /primecategory:Unpleasant vs Pleasant /targetcategory:Unpleasant vs Pleasant /primeitemnumber:stores the itemnumber of the currently presented prime /targetitemnumber:stores the itemnumber of the currently presented target /target:stores the presented target /prime:stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect:overall proportion correct (across baseline and test) /meanRT:overall mean correct latency in ms (across baseline and test) /propcorrect_base:proportion correct baseline trials /meanRT_base:mean latency (ms) of correct baseline trials /propcorrect_test:proportion correct test trials /meanRT_test:mean latency (ms) of correct test trials /propcorrect_U_base:proportion correct Unpleasant baseline trials /meanRT_U_base:mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base:proportion correct Pleasant baseline trials /meanRT_P_base:mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test:proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test:proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test:mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test:proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test:proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test:mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNAPROACHABLE", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNFAMILIAR", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "UNPROFESSIONAL", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "COMPLICATED PROCESSES", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "IRRELEVANT PRODUCTS", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "EXPENSIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "NOT INOVATIVE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR SERVICE", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "POOR ADVERTISING", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "TRUSTWORTHY", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "UNDERSTANDS MY NEEDS", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "APPROACHABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "RELIABLE", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "CLEAR PROCESSES", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "INNOVATIVE", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "TECHNOLOGICALLY ADVANCED", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "VALUE FOR MONEY", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "RELEVANT OFFERINGS", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD ADVERTISING", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE", "GOOD SERVICE") / replace = false / resetinterval = 1 </list> Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105) / replace = false / resetinterval = 1 </list> ************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-22 = noreplace(U_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-102 = noreplace(PU_test)] </block> ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = baseline; 3 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** > I am struggling to get the pairs to work if one of the pairs is images. Does it work the same way? Yes, it works exactly the same way. The code you posted does not make sense. #1: Why is there a <text PleasantPrimes> element if your primes are pictures? #2: You don't pair <item> elements, and <item> elements are not responsible for selection, and they do not have /select attributes. <item> elements merely list items. The stimulus elements (<text>, <picture>, etc.) using those items are responsible for selection. <item PleasantPrimes> / items = ("Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", "Momentum.I.png", "Discovery.I.png", "Sanlam.I.png", "Liberty.I.png", "Old Mutual.I.png", ... / select = noreplace</item> <item UnpleasantTargets> / items = ("UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNTRUSTWORTHY", "UNAPROACHABLE", "UNAPROACHABLE", ... / select = text.UnpleasantTargets.currentindex</item> #3: If you are modifying the existing affective priming script, first look at how that script selects items. The various <list> elements in the script are responsible for that, and those contain the relevant item numbers. You'll want to pair those item numbers along the same way as detailed in the documentation topic referenced earlier. In a nutshell, what you want to do is something like this: <usermanual> AFFECTIVE PRIMING - TEMPLATE with prime pictures and word targets SCRIPT INFO Script Author: Katja Borchert, Ph.D. ( katjab@millisecond.com) for Millisecond Software, LLC Date: 06-09-2015 last updated: 01-11-2017 by K.Borchert ( katjab@millisecond.com) for Millisecond Software LLC Copyright © 01-11-2017 Millisecond Software BACKGROUND INFO *Purpose* This script implements a simple Affective Priming procedure with supraliminal picture primes and word targets. Not based on any particular published paradigm. *Task* Participants are asked to categorize affective target words into pleasant and unpleasant categories. For baseline measures, a baseline supraliminal prime '***' precedes the target words. For test measures, supraliminal picture primes precede the target words. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'AffectivePriming_pictures_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groUP_testnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /prime: stores the presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target stimulusitem: the presented stimuli in order of trial presentation response: the participant's response correct: the correctness of the response (1 = correct; 0 = incorrect) latency: the response latency (in ms) (2) Summary data file: 'AffectivePriming_pictures_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets EXPERIMENTAL SET-UP_test 2 affective primes (pleasant vs unpleasant: here flowers vs. insect pics) x 2 affective targets (pleasant vs unpleasant), tested within subjects 1. baseline ("practice"): 48 trials (all 48 targets) are tested with a baseline prime (***); targets are selected at random 2. test: 48 trials (all 48 targets); targets are selected at random - all 48 words occur once as prime and once as target Trialsequence: Prime (200ms, editable) -> prime-target ISI (100ms, editable) -> Targets (until response; latency measured from onset of target)->ITI (2500ms) STIMULI Words are taken from: Draine, S.C, & Greenwald, A.G. (1998). Replicable Unconscious Semantic Priming. Journal of Experimental Psychology: General, 127, 286-303. pictures collected from the internet as well as the Inquisit AMP.iqx- they are used as placeholders Insects - > unpleasant primes Flowers -> pleasant primes edit under section Editable Stimuli INSTRUCTIONS generic instructions; can be edited under section Editable Instructions EDITABLE CODE: check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: /baselineprime: the symbols used for the baseline "prime" /baselineprimeheight: the height of the baseline prime in % of canvas height (default: 5%) /primesize: the size of the prime pictures in % of canvas height (default: 30%) /targetheight: the size of the targets in % of canvas height (default: 5%) /primeduration: the duration of the primes in ms (default: 200ms) /PT_ISI: the duration of the prime-target interstimulus interval (default: 100ms) /ITI: the intertrial interval (default: 2500ms) /responsekeyleft: the scancode of the left response key (Note: by default, this is assigned to the Unpleasant category) /responsekeyleft_label: the label of the left response key (default: E) /responsekeyright: the scancode of the right response key (Note: by default, this is assigned to the Pleasant category) /responsekeyright_label: the label of the right response key (default: I) </usermanual> ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** <parameters> /baselineprime="***" /baselineprimeheight = 5% /primesize = 30% /targetheight = 5% /primeduration = 200 /PT_ISI = 100 /ITI = 2500 /responsekeyleft = 18 /responsekeyleft_label = "E" /responsekeyright = 23 /responsekeyright_label = "I" </parameters> ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** <item UnpleasantPrimes> /1 = "insect1.jpg" /2 = "insect2.jpg" /3 = "insect3.jpg" /4 = "insect4.jpg" /5 = "insect5.jpg" </item> <item PleasantPrimes> /1 = "flower1.jpg" /2 = "flower2.jpg" /3 = "flower3.jpg" /4 = "flower4.jpg" /5 = "flower5.jpg" </item> <item UnpleasantTargets> /1 = "UPT1" /2 = "UPT2" /3 = "UPT3" /4 = "UPT4" /5 = "UPT5" /6 = "UPT6" /7 = "UPT7" /8 = "UPT8" /9 = "UPT9" /10 = "UPT10" </item> <item PleasantTargets> /1 = "PT1" /2 = "PT2" /3 = "PT3" /4 = "PT4" /5 = "PT5" /6 = "PT6" /7 = "PT7" /8 = "PT8" /9 = "PT9" /10 = "PT10" /11 = "PT11" </item> ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** <item instructions> /1 =" Words representing the categories at the top will appear one-by-one in the middle of the screen. A row of '***' will precede each word and alert you that the word is about to appear. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." /2 = "You will be identifying the meaning of words just like before. But, this time a picture instead of the '***' will precede the word you are asked to categorize. Pay attention to pictures and words, but only respond to the meaning of the word. When the word belongs to the category on the left, press the left response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyleft_label%>'). When the word belongs to the category on the right, press the right response <%expressions.buttoninstruct1%> ('<%parameters.responsekeyright_label%>'). Items belong to only one category. If you make an error, a red X will appear. This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Press <SPACEBAR> to start." </item> <instruct> / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / txcolor = (black) </instruct> <page End> You have reached the end of the task. ^^THANK YOU FOR YOUR PARTICIPATION!!! </page> **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** <expressions> /buttoninstruct1 = if (computer.touch) {"button";} else {"key";} /buttoninstruct2 = if (computer.touch) {"Place your index fingers over the left and right response buttons";} else {"Place your index fingers on the <%parameters.responsekeyleft_label%> and <%parameters.responsekeyright_label%> keys";} </expressions> ******************************* General Helper Instructions ****************************** <text getReady> /items = ("Get Ready: ~n<%expressions.buttoninstruct2%>") / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) / size = (80%, 40%) </text> *********************************************************** these instructions will be run if the script is run on a touchscreen *********************************************************** <text touchscreenInstruct1> / items = ("General Note on Touchscreen Usage for this Task:") / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) / position = (50%, 20%) / size = (80%, 20%) / vjustify = center </text> <text touchscreenInstruct2> / items = ("All necessary response buttons/keys will be provided at the bottom of your screen. For example, here you see the <SPACEBAR>. Tap it to continue to read instructions.") / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / position = (50%, 50%) / size = (70%, 30%) / vjustify = center </text> ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher <defaults > /canvasaspectratio = (4,3) /minimumversion = "5.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = black / txcolor = (white) / screencolor = black </defaults> ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data file *********************** <data> / separatefiles = true / columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum, values.primecategory, values.targetcategory, values.primeitemnumber, values.prime, values.targetitemnumber, values.target, stimulusitem, response, correct, latency) </data> *********************** summary data file *********************** <summarydata> /columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, expressions.propcorrect, expressions.meanRT, expressions.propcorrect_base, expressions.meanRT_base, expressions.propcorrect_U_base, expressions.meanRT_U_base, expressions.propcorrect_P_base, expressions.meanRT_P_base, expressions.propcorrect_test, expressions.meanRT_test, expressions.propcorrect_UU_test, expressions.meanRT_UU_test, expressions.propcorrect_UP_test, expressions.meanRT_UP_test, expressions.propcorrect_PU_test, expressions.meanRT_PU_test, expressions.propcorrect_PP_test, expressions.meanRT_PP_test) / separatefiles = true </summarydata> ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically UP_testdated ************************************************************************************************************** ************************************************************************************************************** /completed: 0 = script was not completed; 1 = script was completed (all conditions run) /responsekeyUnpleasant: responsekey scancode assigned to target 'Unpleasant' (here: negative) words /responsekeyUnpleasant_label: the label that goes with the assigned category A scancode /responsekeyPleasant: responsekey scancode assigned to target 'Pleasant' (here: positive) words /responsekeyPleasant_label: the label that goes with the assigned category B scancode /primecategory: Unpleasant vs Pleasant /targetcategory: Unpleasant vs Pleasant /primeitemnumber: stores the itemnumber of the currently presented prime /targetitemnumber: stores the itemnumber of the currently presented target /target: stores the presented target /prime: stores the presented prime <values> /completed = 0 /responsekeyUnpleasant = 0 /responsekeyUnpleasant_label = "" /responsekeyPleasant = 0 /responsekeyPleasant_label = "" /primecategory = 0 /targetcategory = 0 /primeitemnumber = 0 /targetitemnumber = 0 /target = "" /prime = "" </values> ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /propcorrect: overall proportion correct (across baseline and test) /meanRT: overall mean correct latency in ms (across baseline and test) /propcorrect_base: proportion correct baseline trials /meanRT_base: mean latency (ms) of correct baseline trials /propcorrect_test: proportion correct test trials /meanRT_test: mean latency (ms) of correct test trials /propcorrect_U_base: proportion correct Unpleasant baseline trials /meanRT_U_base: mean latency (ms) of correct Unpleasant baseline trials /propcorrect_P_base: proportion correct Pleasant baseline trials /meanRT_P_base: mean latency (ms) of correct Pleasant baseline trials /propcorrect_UU_test: proportion correct test trials that pair Unpleasant primes with Unpleasant targets /meanRT_UU_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Unpleasant targets /propcorrect_UP_test: proportion correct test trials that pair Unpleasant primes with Pleasant targets /meanRT_UP_test: mean latency (in ms) of correct test trials that pair Unpleasant primes with Pleasant targets /propcorrect_PU_test: proportion correct test trials that pair Pleasant primes with Unpleasant targets /meanRT_PU_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Unpleasant targets /propcorrect_PP_test: proportion correct test trials that pair Pleasant primes with Pleasant targets /meanRT_PP_test: mean latency (in ms) of correct test trials that pair Pleasant primes with Pleasant targets <expressions > /propcorrect = list.accuracy.mean /meanRT = list.latencies.mean /propcorrect_base = list.accuracy_Base.mean /meanRT_base = list.latencies_Base.mean /propcorrect_test = list.accuracy_test.mean /meanRT_test = list.latencies_test.mean /propcorrect_U_base = list.accuracy_U_Base.mean /meanRT_U_base = list.latencies_U_Base.mean /propcorrect_P_base = list.accuracy_P_Base.mean /meanRT_P_base = list.latencies_P_Base.mean /propcorrect_UU_test = list.accuracy_UU_test.mean /meanRT_UU_test = list.latencies_UU_test.mean /propcorrect_UP_test = list.accuracy_UP_test.mean /meanRT_UP_test = list.latencies_UP_test.mean /propcorrect_PU_test = list.accuracy_PU_test.mean /meanRT_PU_test = list.latencies_PU_test.mean /propcorrect_PP_test = list.accuracy_PP_test.mean /meanRT_PP_test = list.latencies_PP_test.mean </expressions> ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** Note: samples instruction items in sequence - doesn't reset for 10 blocks. <text instructions> / items = instructions / select = sequence / vjustify = center / hjustify = left / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / position = (50%, 50%) / size = (100%, 70%) / resetinterval = 10 </text> <trial instructions> / stimulusframes = [1 = instructions] / validresponse = (57) / recorddata = false </trial> This trial is used when participants are asked to place their fingers on specific response buttons. On the touchscreen, this trial presents the (inactive) response buttons to the participants. <trial getReady> / stimulusframes = [1 = getReady] / trialduration = 5000 / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / beginresponsetime = 5000 / errormessage = false / recorddata = false </trial> <trial touchscreenInstruct> / skip = [ !computer.touch || computer.haskeyboard ] / stimulusframes = [1 = touchscreenInstruct1, touchscreenInstruct2] / validresponse = (57) / recorddata = false </trial> Note: this block is only run if the script is run on a Touchscreen <block touchscreenInfo> / trials = [1 = touchscreenInstruct] </block> ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** <text positive> / items = ("Pleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (90%, 10%) / erase = false / txcolor = gray </text> <text negative> / items = ("Unpleasant") / fontstyle = ("Arial", 4%, false, false, false, false, 5, 1) / position = (10%, 10%) / erase = false / txcolor = gray </text> <shape eraser> / shape = rectangle / position = (50%, 50%) / color = black / size = (70%, 70%) </shape> <picture UnpleasantPrime> /items = UnpleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <picture PleasantPrime> /items = PleasantPrimes / select = values.primeitemnumber / position = (50%, 50%) / size = (parameters.primesize, parameters.primesize) </picture> <text UnpleasantTarget> /items = UnpleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text PleasantTarget> /items = PleasantTargets / select = values.targetitemnumber / fontstyle = ("Arial", parameters.targetheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text baselineprime> /items = ("<%parameters.baselineprime%>") / fontstyle = ("Arial", parameters.baselineprimeheight, false, false, false, false, 5, 1) / position = (50%, 50%) </text> <text errorfeedback> / items = ("X") / fontstyle = ("Arial", 8%, true, false, false, false, 5, 1) / position = (50%, 70%) / txcolor = red </text> ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UnpleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10) / replace = false / resetinterval = 1 </list>Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PleasantTargetitemnumbers> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11) / replace = false / resetinterval = 1 </list>Note: list.UnpleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list UnpleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.UnpleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>Note: list.PleasantPrimeitemnumbers selects randomly without replacement 1 of the 24 prime itemnumbers without selecting the same itemnumber as selected for the target In rare cases, the no-repeat constraint can be violated. This happens if only the same itemnumber as the target is still up for selection. !!!If different items are used for targets and primes, the not-constraint can be deleted <list PleasantPrimeitemnumbers> / items = (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5) / selectionmode = list.PleasantTargetitemnumbers.currentindex / resetinterval = 1 </list>************************************************* Data Lists: used for descriptive statistics store correct latencies/accuracy data fill up during runtime ************************************************* <list accuracy> </list> <list latencies> </list> <list accuracy_Base> </list> <list latencies_Base> </list> <list accuracy_U_Base> </list> <list latencies_U_Base> </list> <list accuracy_P_Base> </list> <list latencies_P_Base> </list> <list accuracy_test> </list> <list latencies_test> </list> <list accuracy_UU_test> </list> <list latencies_UU_test> </list> <list accuracy_UP_test> </list> <list latencies_UP_test> </list> <list accuracy_PU_test> </list> <list latencies_PU_test> </list> <list accuracy_PP_test> </list> <list latencies_PP_test> </list> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** <trial U_baseline> / ontrialbegin = [ values.targetcategory="Unpleasant"; values.primecategory="baseline"; values.targetitemnumber=list.UnpleasantTargetitemnumbers.nextvalue; trial.U_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.U_baseline.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.U_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.U_baseline.correct, 1); list.accuracy_Base.insertitem(trial.U_baseline.correct, 1); list.accuracy_U_Base.insertitem(trial.U_baseline.correct, 1); if (trial.U_baseline.correct) { list.latencies.insertitem(trial.U_baseline.latency, 1); list.latencies_Base.insertitem(trial.U_baseline.latency, 1); list.latencies_U_Base.insertitem(trial.U_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial P_baseline> / ontrialbegin = [ values.targetcategory="Pleasant"; values.primecategory="baseline"; values.targetitemnumber=list.PleasantTargetitemnumbers.nextvalue; trial.P_baseline.insertstimulustime(shape.eraser, parameters.primeduration); trial.P_baseline.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = baselineprime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.P_baseline.resetstimulusframes(); values.prime = parameters.baselineprime; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.P_baseline.correct, 1); list.accuracy_Base.insertitem(trial.P_baseline.correct, 1); list.accuracy_P_Base.insertitem(trial.P_baseline.correct, 1); if (trial.P_baseline.correct) { list.latencies.insertitem(trial.P_baseline.latency, 1); list.latencies_Base.insertitem(trial.P_baseline.latency, 1); list.latencies_P_Base.insertitem(trial.P_baseline.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.UU_test - updates counts - selects the current unpleasant prime and unpleasant target from their respective lists - presents the unpleasant prime p - replaces the prime picture with a blank stimulus after parameters.primeduration - replaces the blank stimulus with the unpleasant target after another vales.pt_isi - starts recording latency at onset of target - waits for response and evaluates response - updates summary values - adds error feedback as well as the intertrial interval <trial UU_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.UU_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.UU_test.correct, 1); list.accuracy_test.insertitem(trial.UU_test.correct, 1); list.accuracy_UU_test.insertitem(trial.UU_test.correct, 1); if (trial.UU_test.correct) { list.latencies.insertitem(trial.UU_test.latency, 1); list.latencies_test.insertitem(trial.UU_test.latency, 1); list.latencies_UU_test.insertitem(trial.UU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial UP_test> / ontrialbegin = [ values.primecategory="Unpleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.UnpleasantPrimeitemnumbers.nextvalue; trial.UP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.UP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = UnpleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.UP_test.resetstimulusframes(); values.prime = picture.UnpleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.UP_test.correct, 1); list.accuracy_test.insertitem(trial.UP_test.correct, 1); list.accuracy_UP_test.insertitem(trial.UP_test.correct, 1); if (trial.UP_test.correct) { list.latencies.insertitem(trial.UP_test.latency, 1); list.latencies_test.insertitem(trial.UP_test.latency, 1); list.latencies_UP_test.insertitem(trial.UP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PU_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Unpleasant"; values.targetitemnumber = list.UnpleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PU_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PU_test.insertstimulustime(text.UnpleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyUnpleasant) / ontrialend = [ trial.PU_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.UnpleasantTarget.currentitem; list.accuracy.insertitem(trial.PU_test.correct, 1); list.accuracy_test.insertitem(trial.PU_test.correct, 1); list.accuracy_PU_test.insertitem(trial.PU_test.correct, 1); if (trial.PU_test.correct) { list.latencies.insertitem(trial.PU_test.latency, 1); list.latencies_test.insertitem(trial.PU_test.latency, 1); list.latencies_PU_test.insertitem(trial.PU_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> <trial PP_test> / ontrialbegin = [ values.primecategory="Pleasant"; values.targetcategory="Pleasant"; values.targetitemnumber = list.PleasantTargetitemnumbers.nextvalue; values.primeitemnumber = list.PleasantPrimeitemnumbers.nextvalue; trial.PP_test.insertstimulustime(shape.eraser, (parameters.primeduration)); trial.PP_test.insertstimulustime(text.PleasantTarget, (parameters.primeduration + parameters.PT_ISI)); ] / stimulustimes = [0 = PleasantPrime] / beginresponsetime = parameters.primeduration + parameters.PT_ISI / responseinterrupt = immediate / validresponse = (parameters.responsekeyleft, parameters.responsekeyright) / correctresponse = (values.responsekeyPleasant) / ontrialend = [ trial.PP_test.resetstimulusframes(); values.prime = picture.PleasantPrime.currentitem; values.target = text.PleasantTarget.currentitem; list.accuracy.insertitem(trial.PP_test.correct, 1); list.accuracy_test.insertitem(trial.PP_test.correct, 1); list.accuracy_PP_test.insertitem(trial.PP_test.correct, 1); if (trial.PP_test.correct) { list.latencies.insertitem(trial.PP_test.latency, 1); list.latencies_test.insertitem(trial.PP_test.latency, 1); list.latencies_PP_test.insertitem(trial.PP_test.latency, 1); } ] / posttrialpause = parameters.ITI / errormessage = true(errorfeedback, 500) </trial> ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-4 = noreplace(U_baseline, P_baseline)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** <expt > / postinstructions = (END) / onexptbegin = [ values.responsekeyUnpleasant = parameters.responsekeyleft; values.responsekeyUnpleasant_label = parameters.responsekeyleft_label; values.responsekeyPleasant = parameters.responsekeyright; values.responsekeyPleasant_label = parameters.responsekeyright_label; ] / blocks = [ 1 = touchscreenInfo; 2 = test; ] / onexptend = [ values.completed = 1; ] </expt> ************************************************************************************************************** End of File ************************************************************************************************************** Wow thank you you have been a real help! It is much clearer now that I see it within the script. I'm just trying to get the baseline trials to feature in the experiment as they currently dont show up in the test I removed the baseline block from the <expt> in the code I posted because it was immaterial to the question and because it wasn't clear to me from your description what exactly you'd want the baseline block to do (i.e. run how many trials of what kind, etc.). If you have problems adding it back in, I'll be happy to assist if you clarify those things. Thank you I have added it in, thank you for all your assistance :) While I have added the baseline block it's not displaying exactly as I would like it. I need every attribute (21) to display once, at random. At the moment it is 'almost working'. Most attributes (19 or 20) display once, but then one attribute will display twice and another not at all. Below is my script for this: Note: list.UnpleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Unpleasant target itemnumbers <list UTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) / replace = false / resetinterval = 1 </list> Note: list.PleasantTargetitemnumbers selects randomly without replacement 1 of the 24 Pleasant target itemnumbers <list PTargetitemnumbers> / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) / replace = false / resetinterval = 1 </list> The lists aren't the problem. You must instruct the <block> to run 20 "U" baseline trials and 21 "P" baseline trials via its /trials attribute. <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace( U_baseline, P_baseline)] </block> Enter them into the noreplace pool in the desired quantities -- 20 x U_baseline, 21 x P_baseline, instead of trying to sample them in equal proportions -- 1 to 1 -- as in the above. I have tried this but it does not seem to be working as I keep getting an error Well it is running now but still having the same issue as before > I have tried this but it does not seem to be working as I keep getting an error What error? Can't say anything about that if I don't know what the error is. > Well it is running now but still having the same issue as before How -- exactly -- did you set up the <block>. I can't point out problems in your code without knowing what the code is. Of course sorry about that. I've pasted it below. Although, wouldnt I only have 10 and 11 trials for each baseline instead of 20 and 21? Either way it is still showing some baseline trials more than once and others not at all ote: block.baseline presents 48 trials for all 48 targets with a baseline prime (***) - order of positive and negative primes is selected randomly <block baseline> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-23 = noreplace(U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, U_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline, P_baseline,)] </block> Note: block.test presents 48 trials for all 48 possible targets - order of positive and negative primes is selected randomly <block test> / bgstim = (positive, negative) / trials = [1 = instructions; 2 = getReady; 3-107 = list.triallist] </block> <list triallist> / items = (trial.UU_test, trial.PP_test) / itemprobabilities = (0.4762, 0.5238) / poolsize = 105 </list>
|
|
|