Stroop Task - Display all items once in each color?


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Suppose you have 4 items A  to D (numbered 1 to 4) and 3 colors. Evidently there are 4 x 3 = 12 item-color combinations. You can encode them e.g. as


<block myblock>
/ trials = [1-12 = mytrial]
</block>

<values>
/ myitem = 1
</values>


<trial mytrial>
/ ontrialbegin = [values.myitem=counter.itemnumber.selectedvalue;
    text.mytext.textcolor=counter.itemcolor.selectedvalue]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("A", "B", "C", "D")
/ select = values.myitem
</text>

<counter itemnumber>
/ items =
    (1,2,3,4,
    1,2,3,4,
    1,2,3,4)
/ select = noreplace
</counter>

<counter itemcolor>
/ items =
    (red, red, red, red,
    green, green, green, green,
    blue, blue, blue, blue)
/ select = current(itemnumber)
</counter>


Stuff like this has been discussed many times, a forum search should turn up a host of other examples in case you need any.


Star7
Star7
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 18, Visits: 13

Hi Dave,


Sorry I'm really not good at this. A search on INQUISIT documentation yields no information (http://www.millisecond.com/support/docs/v4/index.htm).


I'm guessing here but I think it might have to do with the following:


Display (1-5 for the 5 colors, on and on for as many items are there)
<counter cdother>
/ items = (1,2,3,4,5,1,2,3,4,5)
/ select = noreplacenorepeat
/ selectionrate = trial
</counter>

<counter cwother> (number of items)
/ items = (1,2,3,4,5,6,7,8,9,10)
/ select = noreplace
/ selectionrate = trial
</counter>


With these 2 sections Item 1 would have a color of 1, item 2 would have a color of 2, and so on. However, I'm not sure how I can display Item 1 in all 5 colors (randomly with other items of course rather than sequentially).


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Is it possible to modify the script so that all items will be displayed once in each color (i.e. 5 times)?


Yes. To do that you need to encode the item-color combinations in the script (e.g using <counter> elements) and then sample from those combinations.


Star7
Star7
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 18, Visits: 13

Hi, I'm running a stroop task script.


Currently, each item will only be displayed once in one color. Is it possible to modify the script so that all items will be displayed once in each color (i.e. 5 times)?


I was thinking of modifying this:


<expt EmotionalStroop>
/ blocks = [1=instructions01; 2=practiceblock; 3=instructions02; 4-7=noreplace(SIT, NIT, SST, NST)]
</expt>


to this:


<expt EmotionalStroop>
/ blocks = [1=instructions01; 2=practiceblock; 3=instructions02; 4-23=noreplace(SIT, NIT, SST, NST)]
</expt>


From 4 trials to 20 trials (each item x 5 colors)


Will it work? I tried running the script but I couldn't keep track if each item were displayed in all 5 of the colors.


Here's the full script (found from this forum):


*****************************************************************************************************************
*****************************************************************************************************************
    Emotional Stroop Task
*****************************************************************************************************************
*****************************************************************************************************************
    Last Modified:     19-11-2012 at 01:43 PM (GMT+8)
*****************************************************************************************************************
*****************************************************************************************************************
    Default Settings
*****************************************************************************************************************
*****************************************************************************************************************
<defaults>
/ fontstyle = ("Verdana", 6.00%, true)
/ screencolor = (grey)
/ txbgcolor = (grey)
/ inputdevice = keyboard
/ posttrialpause = 500
/ validresponse = (32, 33, 36, 37, 38)
</defaults>

*****************************************************************************************************************
*****************************************************************************************************************
    Color -> Key Mappings: display color = scan code (key)
*****************************************************************************************************************
*****************************************************************************************************************
    red = 32 (d)
    green = 33 (f)
    blue = 36 (j)
    black = 37 (k)
    yellow = 38 (l)

<expressions>
/ correctkey = if(values.stimcolor==1) 37 else expressions.correctkey02
/ correctkey02 = if(values.stimcolor==2) 36 else expressions.correctkey03
/ correctkey03 = if(values.stimcolor==3) 33 else expressions.correctkey04
/ correctkey04 = if(values.stimcolor==4) 32 else expressions.correctkey05
/ correctkey05 = if(values.stimcolor==5) 38 else 0
</expressions>

*****************************************************************************************************************
*****************************************************************************************************************
    Values
*****************************************************************************************************************
*****************************************************************************************************************
    Notes:
    'values.stimcolor' contains a numeric representation of the current word's display color:
    1=black, 2=blue, 3=green, 4=red, 5=yellow
    'values.condition' contains a numeric representation of the current condition:
    1=statistics items, 2=neutral items, 3=statistcs symbols, 4 = neutral symbols
*****************************************************************************************************************
*****************************************************************************************************************
<values>
/ stimcolor = 0
/ stimword = ""
/ condition = 0
</values>
*****************************************************************************************************************
*****************************************************************************************************************
    Custom Data Output
*****************************************************************************************************************
*****************************************************************************************************************
<data>
/ columns = [date,time,subject,blocknum,blockcode,trialnum,trialcode,latency,response,
    correct,values.stimword,values.stimcolor,values.condition]
/ separatefiles = true
</data>

*****************************************************************************************************************
*****************************************************************************************************************
    Trial Elements
*****************************************************************************************************************
*****************************************************************************************************************
    Instruction Trial
*****************************************************************************************************************
*****************************************************************************************************************
<trial instructiontrial>
/ stimulustimes = [0=instructions, navigation;500=example01,example02 ]
/ inputdevice = keyboard
/ validresponse = (57)
/ recorddata = false
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Practice Trial
*****************************************************************************************************************
*****************************************************************************************************************
<trial practicetrial>
/ ontrialbegin = [values.stimcolor=counter.practicecolors.selectedvalue]
/ ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor,values.stimcolor)]
/ ontrialbegin = [values.stimword=counter.practicewords.selectedvalue]
/ stimulustimes = [0=fixation;200=stimword]
/ iscorrectresponse = [trial.practicetrial.response==expressions.correctkey]
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Statistics Items Trial (SIT)
*****************************************************************************************************************
*****************************************************************************************************************
<trial SITtrial>
/ ontrialbegin = [values.stimcolor=counter.cdother.selectedvalue]
/ ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)]
/ ontrialbegin = [values.stimword=getitem(item.SIT, counter.cwother.selectedvalue)]
/ stimulustimes = [0=fixation;200=stimword]
/ iscorrectresponse = [trial.SITtrial.response==expressions.correctkey]
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Neutral Items Trial (NIT)
*****************************************************************************************************************
*****************************************************************************************************************
<trial NITtrial>
/ ontrialbegin = [values.stimcolor=counter.cdother.selectedvalue]
/ ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)]
/ ontrialbegin = [values.stimword=getitem(item.NIT, counter.cwother.selectedvalue)]
/ stimulustimes = [0=fixation;200=stimword]
/ iscorrectresponse = [trial.NITtrial.response==expressions.correctkey]
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Statistics Symbols Trial (SST)
*****************************************************************************************************************
*****************************************************************************************************************
<trial SSTtrial>
/ ontrialbegin = [values.stimcolor=counter.cdother.selectedvalue]
/ ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)]
/ ontrialbegin = [values.stimword=getitem(item.SST, counter.cwother.selectedvalue)]
/ stimulustimes = [0=fixation;200=stimword]
/ iscorrectresponse = [trial.SSTtrial.response==expressions.correctkey]
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Neutral Symbols Trial (NST)
*****************************************************************************************************************
*****************************************************************************************************************
<trial NSTtrial>
/ ontrialbegin = [values.stimcolor=counter.cdother.selectedvalue]
/ ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)]
/ ontrialbegin = [values.stimword=getitem(item.NST, counter.cwother.selectedvalue)]
/ stimulustimes = [0=fixation;200=stimword]
/ iscorrectresponse = [trial.NSTtrial.response==expressions.correctkey]
</trial>

*****************************************************************************************************************
*****************************************************************************************************************
    Block Elements
*****************************************************************************************************************
*****************************************************************************************************************
    Practice Block
*****************************************************************************************************************
*****************************************************************************************************************
<block practiceblock>
/ bgstim = (reminder)
/ trials = [1-10=practicetrial]
/ errormessage = (errormessage, 300)
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    Test Blocks
*****************************************************************************************************************
*****************************************************************************************************************
    SIT (SIT) Block
*****************************************************************************************************************
*****************************************************************************************************************
<block SIT>
/ bgstim = (reminder)
/ onblockbegin = [values.condition=1]
/ trials = [1-20=SITtrial]
/ errormessage = (errormessage, 300)
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    NIT (NIT) Block
*****************************************************************************************************************
*****************************************************************************************************************
<block NIT>
/ bgstim = (reminder)
/ onblockbegin = [values.condition=2]
/ trials = [1-20=NITtrial]
/ errormessage = (errormessage, 300)
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    SST (SST) Block
*****************************************************************************************************************
*****************************************************************************************************************
<block SST>
/ bgstim = (reminder)
/ onblockbegin = [values.condition=3]
/ trials = [1-20=SSTtrial]
/ errormessage = (errormessage, 300)
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    NST (NST) Block
*****************************************************************************************************************
*****************************************************************************************************************
<block NST>
/ bgstim = (reminder)
/ onblockbegin = [values.condition=4]
/ trials = [1-20=NSTtrial]
/ errormessage = (errormessage, 300)
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    Instruction Blocks
*****************************************************************************************************************
*****************************************************************************************************************
<block instructions01>
/ bgstim = (whitebg)
/ trials = [1-3=instructiontrial]
</block>

<block instructions02>
/ bgstim = (whitebg)
/ trials = [1=instructiontrial]
</block>

*****************************************************************************************************************
*****************************************************************************************************************
    Experiment Elements
*****************************************************************************************************************
*****************************************************************************************************************
<expt EmotionalStroop>
/ blocks = [1=instructions01; 2=practiceblock; 3=instructions02; 4-7=noreplace(SIT, NIT, SST, NST)]
</expt>

*****************************************************************************************************************
*****************************************************************************************************************
    Stimulus Elements
*****************************************************************************************************************
*****************************************************************************************************************
<text stimword>
/ items = ("<%values.stimword%>")
/ txcolor = (white)
</text>

<text fixation>
/ items = ("+")
/ txcolor = (black)
</text>

<shape whitebg>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (87.5%, 87.5%)
</shape>

<text x>
/ items = ("X")
/ position = (50%, 60%)
/ txcolor = red
/ fontstyle = ("Verdana", 7%, true)
</text>

    red = 32 (d)
    green = 33 (f)
    blue = 36 (j)
    black = 37 (k)
    yellow = 38 (l)

<text reminder>
/ items = ("RED = D     GREEN = F     BLUE = J     BLACK = K     YELLOW = L")
/ position = (50%, 90%)
/ txcolor = black
/ erase = false
/ fontstyle = ("Verdana", 3%, true)
</text>

*****************************************************************************************************************
*****************************************************************************************************************
    Practice Items
*****************************************************************************************************************
*****************************************************************************************************************
<counter practicewords>
/ items = ("GREEN", "RED", "DOG", " $ ", "CAT", "BANANA", "MILKSHAKE", " ) ", " ! ", " % ")
/ select = current(practicecolors)
</counter>

<counter practicecolors>
/ items = (3,5,4,1,2,3,5,4,1,2)
/ select = sequence
</counter>

*****************************************************************************************************************
*****************************************************************************************************************
    Counter Elements / Selection Logic for Test Block
*****************************************************************************************************************
*****************************************************************************************************************
<counter stimcolor>
/ items = (black, blue, green, red, yellow)
/ select = values.stimcolor
</counter>

*****************************************************************************************************************
*****************************************************************************************************************
    Counter Elements / Selection Logic
*****************************************************************************************************************
*****************************************************************************************************************
    SIT, NIT, SST, and NST
*****************************************************************************************************************
*****************************************************************************************************************
    Display
*****************************************************************************************************************
*****************************************************************************************************************
<counter cdother>
/ items = (1,2,3,4,5,1,2,3,4,5)
/ select = noreplacenorepeat
/ selectionrate = trial
</counter>

*****************************************************************************************************************
*****************************************************************************************************************
    Word
*****************************************************************************************************************
*****************************************************************************************************************
<counter cwother>
/ items = (1,2,3,4,5,6,7,8,9,10)
/ select = noreplace
/ selectionrate = trial
</counter>

*****************************************************************************************************************
*****************************************************************************************************************
    Items: SIT
*****************************************************************************************************************
*****************************************************************************************************************
<item SIT>
/ 1 = "STATISTICS"
/ 2 = "POPULATION"
/ 3 = "SAMPLE"
/ 4 = "ERROR"
/ 5 = "VARIABLE"
/ 6 = "DISTRIBUTION"
/ 7 = "SIGNIFICANCE"
/ 8 = "VARIATION"
/ 9 = "REPRESENTATIVE"
/ 10 = "MODE"
</item>

*****************************************************************************************************************
*****************************************************************************************************************
    Items: NIT
*****************************************************************************************************************
*****************************************************************************************************************
<item NIT>
/ 1 = "FURNITURE"
/ 2 = "OPPORTUNITY"
/ 3 = "ASPECT"
/ 4 = "BRIEF"
/ 5 = "INITIAL"
/ 6 = "EXPLANATION"
/ 7 = "IMAGINATION"
/ 8 = "PROFESSION"
/ 9 = "CORPORATION"
/ 10 = "DECK"
</item>
*****************************************************************************************************************
*****************************************************************************************************************
    Items: SST
*****************************************************************************************************************
*****************************************************************************************************************
<item SST>
/ 1 = " µ "
/ 2 = " β "
/ 3 = " α "
/ 4 = " ∑ "
/ 5 = " X "
/ 6 = " n "
/ 7 = " Ŷ "
/ 8 = " s "
/ 9 = " s² "
/ 10 = " σ "
</item>

*****************************************************************************************************************
*****************************************************************************************************************
    Items: NST
*****************************************************************************************************************
*****************************************************************************************************************
<item NST>
/ 1 = " ` "
/ 2 = " ( "
/ 3 = " ! "
/ 4 = " @ "
/ 5 = " # "
/ 6 = " $ "
/ 7 = " % "
/ 8 = " ^"
/ 9 = " & "
/ 10 = " * "
</item>

*****************************************************************************************************************
*****************************************************************************************************************
    Instructions
*****************************************************************************************************************
*****************************************************************************************************************
<text instructions>
/ items = instructions
/ select = sequence
/ size = (85%, 85%)
/ txbgcolor = (transparent)
/ fontstyle = ("Verdana", 3.00%, true)
/ erase = false
/ resetinterval = 0
</text>

<item instructions>
/ 1 = "~rYou will see a series of items displayed in different colors.
Press the key corresponding to the color of the presented item
- red (D), yellow (F), green (J), blue (K), or black (L) -
as quickly and as accurately as possible. 
If you make a mistake, keep going."
/ 2 = "~rYou will see a series of items displayed in different colors.
Press the key corresponding to the color of the presented item
- red (D), yellow (F), green (J), blue (K), or black (L) -
as quickly and as accurately as possible. 
If you make a mistake, keep going.~r
For example, when this item appears,~r~r~r
you would respond with ''red'' as quickly as possible."
/ 3 = "~rYou will see a series of items displayed in different colors.
Press the key corresponding to the color of the presented item
- red (D), yellow (F), green (J), blue (K), or black (L) -
as quickly and as accurately as possible. 
If you make a mistake, keep going.~r
For example, when this item appears,~r~r~r
you would respond with ''red'' as quickly as possible.~r
If this item appears,~r~r~r
you would respond with ''blue'' as quickly as possible. ~r
Let's practice a few items before we begin."
</item>

<text example01>
/ items = example01
/ select = sequence
/ resetinterval = 0
/ txcolor = (red)
/ txbgcolor = (transparent)
/ position = (50%, 41%)
/ erase = false
</text>

<item example01>
/ 1 = " "
/ 2 = "YELLOW"
/ 3 = "YELLOW"
/ 4 = " "
/ 5 = " "
</item>

<text example02>
/ items = example02
/ select = sequence
/ resetinterval = 0
/ position = (50%, 63%)
/ txcolor = (blue)
/ txbgcolor = (transparent)
/ erase = false
</text>

<item example02>
/ 1 = " "
/ 2 = " "
/ 3 = "DOG"
/ 4 = " "
/ 5 = " "
</item>

<text navigation>
/ items = navigation
/ select = sequence
/ resetinterval = 0
/ fontstyle = ("Verdana", 3.00%, true)
/ txbgcolor = (white)
/ size = (87.5%, 5%)
/ position = (50%, 90%)
/ erase = false
</text>

<item navigation>
/ 1 = "Press the SPACEBAR to continue."
/ 2 = "Press the SPACEBAR to continue."
/ 3 = "Press the SPACE BAR when you are ready to begin."
/ 4 = " "
/ 5 = " "
</item>

<text errormessage>
/ items = ("Error")
/ txcolor = (255, 0, 0)
/ position = (50%, 65%)
</text>

*****************************************************************************************************************
*****************************************************************************************************************
    END OF FILE
*****************************************************************************************************************
*****************************************************************************************************************


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search