Millisecond Forums

Question regarding picture IAT

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

By c.witteki - 10/31/2016

Hi everyone,
I want to construct a Picture IAT in which I present 10 neutral and 10 disorder-specific targets and 5 avoidance- as well as 5 approach-relevant attributes. I downloaded the script from the millisecond library and changed the attribute as well as the target labels correspondingly.
For the design of the <lock compatibletest1>, it would be important that each neutral and each disorder-specific stimulus is presented one time. Thus I changed the script as follows:
<block compatibletest1>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [1=instructions;
  3,5,7,9,11,13,15,17,19,21 = noreplace(targetAleft, targetBright);
  2,4,6,8,10,12,14,16,18,20 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a =  values.sum1a + block.compatibletest1.latency]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a +=  1]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a =  values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency)]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct]
</block>

However, when I check the output, the visual targets are sometimes presented twice and some targets are missing. How do I have to change the script such that each target stimulus is presented once during the compatible and incompatible trial?

Thanks for your help in advance,
Charlotte


Thanks for your replay. I just recognized that I posted the practice trial, not the test trial, which is:
<block compatibletest2>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetAleft, targetBright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.sum1b =  values.sum1b + block.compatibletest2.latency]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n1b += 1]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.ss1b =  values.ss1b + (block.compatibletest2.latency * block.compatibletest2.latency)]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n_correct += block.compatibletest2.correct]
</block>


The problem is: I have ten smoking-related targets (smoking1.jpg to smoking10.jpg) as well as ten neutral targets (neutral1.jpg to neutral10.jpg). For the test trial, I want each target to be presented once. However, after running several monkey trials and checking the output, the noreplace instruction does not work as several target stimuli are presented more than once while others are not presented at all. What can I do such that each target stimulus is presented exactly one?

Thanks so much for your help!
Charlotte




By Dave - 11/1/2016

If you have 20 targets overall (10 neutral, 10 disorder), you need to run 20 target trials to have each target sampled once. You only run 10 target trials,

  3,5,7,9,11,13,15,17,19,21 = noreplace(targetAleft, targetBright);

half of them (i.e. 5) targetA, the other half targetB.

If your disorder stimuli are targetA, and the 10 neutral stimuli are targetB, you'll want to run 10 targetA trials and 10 targetB trials.
By c.witteki - 11/1/2016

Thanks for your replay. I just recognized that I posted the practice trial, not the test trial, which is:
<block compatibletest2>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetAleft, targetBright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.sum1b =  values.sum1b + block.compatibletest2.latency]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n1b += 1]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.ss1b =  values.ss1b + (block.compatibletest2.latency * block.compatibletest2.latency)]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n_correct += block.compatibletest2.correct]
</block>


The problem is: I have ten smoking-related targets (smoking1.jpg to smoking10.jpg) as well as ten neutral targets (neutral1.jpg to neutral10.jpg). For the test trial, I want each target to be presented once. However, after running several monkey trials and checking the output, the noreplace instruction does not work as several target stimuli are presented more than once while others are not presented at all. What can I do such that each target stimulus is presented exactly one?

Thanks so much for your help!
Charlotte
By Dave - 11/1/2016

If you have 10 target items each, and run 10 target A trials and 10 targetB trials in the respective block, you will get each item exactly once:

<block example>
/ trials = [1-20 = noreplace(targetAleft,targetBright)]
</block>

<trial targetAleft>
/ stimulusframes = [1=targetA]
/ trialduration = 10
</trial>

<trial targetBright>
/ stimulusframes = [1=targetB]
/ trialduration = 10
</trial>

<text targetA>
/ items = targetA
</text>

<text targetB>
/ items = targetB
</text>

<item targetA>
/ 1 = "smoking1.jpg"
/ 2 = "smoking2.jpg"
/ 3 = "smoking3.jpg"
/ 4 = "smoking4.jpg"
/ 5 = "smoking5.jpg"
/ 6 = "smoking6.jpg"
/ 7 = "smoking7.jpg"
/ 8 = "smoking8.jpg"
/ 9 = "smoking9.jpg"
/ 10 = "smoking10.jpg"
</item>

<item targetB>
/ 1 = "neutral1.jpg"
/ 2 = "neutral2.jpg"
/ 3 = "neutral3.jpg"
/ 4 = "neutral4.jpg"
/ 5 = "neutral5.jpg"
/ 6 = "neutral6.jpg"
/ 7 = "neutral7.jpg"
/ 8 = "neutral8.jpg"
/ 9 = "neutral9.jpg"
/ 10 = "neutral10.jpg"
</item>

See for yourself by running the above -- it does the exact same thing as your <block compatibletest2>.

#1: Make sure you are looking at the data for the compatibletest2 block only, not at data including also other blocks. As detailed previously, the shorter "practice" block you posted initially, cannot possibly present all stimuli once. Some will not show up at all.
#2: If you are certain that target trials in <block compatibletest2> displays certain items more often than others, please
-  provide a data file showing this
- provide the syntax showing how you set up the respective <picture> and <item> elements.
By c.witteki - 11/1/2016

Hi again and thanks for the reply. Please find attached the syntax defining the item and picture elements as well as an output file showing that within the compatibletest blocks, the target items are presented more than once. For the attribute words, the noreplace command works and each word is presented twice; however, it doesn´t work with the pictures. I also attached the syntax file.


<item attributeAlabel>
/1 = "Annäherung"
</item>

<item attributeA>
/1 = "GREIFEN"
/2 = "ANFASSEN"
/3 = "NEHMEN"
/4 = "BERÜHREN"
/5 = "ANNÄHERN"
</item>

<item attributeBlabel>
/1 = "Vermeidung"
</item>

<item attributeB>
/1 = "VERMEIDEN"
/2 = "AUSWEICHEN"
/3 = "WEGSCHIEBEN"
/4 = "ENTFERNEN"
/5 = "VERSCHWINDEN"
</item>

<item targetAlabel>
/1 = "Rauchen"
</item>

<item targetA>
/1 = "Smoking1.jpg"
/2 = "Smoking2.jpg"
/3 = "Smoking3.jpg"
/4 = "Smoking4.jpg"
/5 = "Smoking5.jpg"
/6 = "Smoking6.jpg"
/7 = "Smoking7.jpg"
/8 = "Smoking8.jpg"
/9 = "Smoking9.jpg"
/10 = "Smoking10.jpg"
</item>

<item targetBlabel>
/1 = "Nichtrauchen"
</item>

<item targetB>
/1 = "Neutral1.jpg"
/2 = "Neutral2.jpg"
/3 = "Neutral3.jpg"
/4 = "Neutral4.jpg"
/5 = "Neutral5.jpg"
/6 = "Neutral6.jpg"
/7 = "Neutral7.jpg"
/8 = "Neutral8.jpg"
/9 = "Neutral9.jpg"
/10 = "Neutral10.jpg"
</item>

Thanks,
Charlotte
By Dave - 11/2/2016

Thanks for the data file. Hmm, this is very weird -- the data suggests that for whatever reason the selection pools of the two <picture> elements (<picture targetA>, <picture targetB>) is not reset between <block compatibletest1> and <block compatibletest2>; oddly enough they seem to be reset as expected between <block incompatibletest1> and <block incompatibletest2>. I.e., suppose target A items 1 to 5 are randomly sampled during <block compatibletest1>, then the remaining items 6-10 are sampled during the 1st five target A trials during <block compatibletest2>; then the selection pool resets (all 10 items have been sampled), and all 10 items become available again for sampling for the remaining five target A trials in <block compatibletest2>, leading to potential repeats and some items not being sampled at all during <block compatibletest2>.

The fail-safe option would be to explicitly force a reset of the respective selection pools /onblockbegin, i.e. if you do:

<block compatibletest1>
/ onblockbegin= [picture.targeta.resetselection(); picture.targetb.resetselection();]
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [1=instructions;
  3,5,7,9,11,13,15,17,19,21 = noreplace(targetAleft, targetBright);
  2,4,6,8,10,12,14,16,18,20 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a =  values.sum1a + block.compatibletest1.latency]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a +=  1]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a =  values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency)]
/ ontrialend = [if(block.compatibletest1.latency  <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct]
</block>

<block compatibletest2>
/ onblockbegin= [picture.targeta.resetselection(); picture.targetb.resetselection();]
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetAleft, targetBright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.sum1b =  values.sum1b + block.compatibletest2.latency]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n1b += 1]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.ss1b =  values.ss1b + (block.compatibletest2.latency * block.compatibletest2.latency)]
/ ontrialend = [if(block.compatibletest2.latency  <= 10000) values.n_correct += block.compatibletest2.correct]
</block>

<block incompatibletest1>
/ onblockbegin= [picture.targeta.resetselection(); picture.targetb.resetselection();]
/ bgstim = (targetBleft, orleft, attributeAleftmixed, targetAright, orright, attributeBrightmixed)
/ trials = [1=instructions;
  3,5,7,9,11,13,15,17,19,21 = noreplace(targetBleft, targetAright);
  2,4,6,8,10,12,14,16,18,20 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.incompatibletest1.latency  <= 10000 && block.incompatibletest1.currenttrialnumber != 1) values.sum2a =  values.sum2a + block.incompatibletest1.latency]
/ ontrialend = [if(block.incompatibletest1.latency  <= 10000 && block.incompatibletest1.currenttrialnumber != 1 ) values.n2a +=  1]
/ ontrialend = [if(block.incompatibletest1.latency  <= 10000 && block.incompatibletest1.currenttrialnumber != 1 ) values.ss2a =  values.ss2a + (block.incompatibletest1.latency * block.incompatibletest1.latency)]
/ ontrialend = [if(block.incompatibletest1.latency  <= 10000 && block.incompatibletest1.currenttrialnumber != 1 ) values.n_correct += block.incompatibletest1.correct]
</block>

<block incompatibletest2>
/ onblockbegin= [picture.targeta.resetselection(); picture.targetb.resetselection();]
/ bgstim = (targetBleft, orleft, attributeAleftmixed, targetAright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetBleft, targetAright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [if(block.incompatibletest2.latency  <= 10000) values.sum2b =  values.sum2b + block.incompatibletest2.latency]
/ ontrialend = [if(block.incompatibletest2.latency  <= 10000) values.n2b +=  1]
/ ontrialend = [if(block.incompatibletest2.latency  <= 10000) values.ss2b =  values.ss2b + (block.incompatibletest2.latency * block.incompatibletest2.latency)]
/ ontrialend = [if(block.incompatibletest2.latency  <= 10000) values.n_correct += block.incompatibletest2.correct]
</block>

there should be no way for this to happen under any circumstances. Hope this helps.
By c.witteki - 11/2/2016

Great, with the ontrial command it finally works :)! Thanks so much.