zzril
|
|
Group: Forum Members
Posts: 11,
Visits: 1
|
I am creating a Stroop Task and would like to balance the presentation of stimuli such that there are equal number of congruent and incongruent trials. Additionally, I'd like to be able to display each of the four colors an equal number of times and randomly order the presentation so that combinations which have been presented previously will have a lower probability of being presented again. In lieu of this, is there any way to prevent identical stimuli from being presented consecutively? Any assistance would be greatly appreciated.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 102K
|
is there any way to prevent identical stimuli from being presented consecutivel See the documentation for the replacenorepeat and noreplacenorepeat selection modes.
I am creating a Stroop Task and would like to balance the presentation of stimuli such that there are equal number of congruent and incongruent trials. Additionally, I'd like to be able to display each of the four colors an equal number of times and randomly order the presentation so that combinations which have been presented previously will have a lower probability of being presented again. See e.g. the Food Stroop script available from the Task Library for a possible approach. In short, you'll want to set up elements encoding your stimulus / feature combinations and sample from those combinations.
Regards, ~Dave
|
|
|
zzril
|
|
Group: Forum Members
Posts: 11,
Visits: 1
|
So I was able to adapt the Food Stroop, but still am unable to get it to balance my congruent and incongruent trials. I know it has something to do with the noreplace statement, but I'm not savvy enough to use it correctly. I also wanted to present a series of XXXX instead of a color word as a neutral stimulus, but can't seem to get it to display. On my test run of 20 trials, I'm getting the following patterns: RED = 1 congruent color, 5 incongruent color YELLOW = 1 cc, 0 ic GREEN = 3 cc, 4 ic BLUE = 0 cc, 6 ic XXXX = nothing I know there must be something that is glaringly obvious, but I'm not seeing it. Here's the script: ******************************************************************************************************* ******************************************************************************************************* VOICE RECOGNITION FOUR COLOR STROOP TASK ******************************************************************************************************* *******************************************************************************************************
******************************************************* DEFAULTS *******************************************************
<defaults> / fontstyle = ("Verdana", 6.00%, true) / screencolor = (white) / txbgcolor = (white) / inputdevice = voicerecord / voicekeythreshold = 50 / posttrialpause = 500 </defaults>
******************************************************* ******************************************************* *Values ******************************************************* *******************************************************
*Notes: *'values.stimcolor' contains a numeric representation of the current word's display color: *1=blue, 2=green, 3=red, 4=yellow *'values.condition' contains a numeric representation of the current condition: *1=congruent, 2=incongruent
<values> / stimcolor = 0 / stimword = "" / condition = 0 </values>
******************************************************* TRIALS *******************************************************
***************** ***************** *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] </trial>
***************** *Color trials ***************** *Congruent
<trial CCtrial> / ontrialbegin = [values.stimcolor=counter.cdcc.selectedvalue] / ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)] / ontrialbegin = [values.stimword=getitem(item.colorwords, counter.cwcc.selectedvalue)] / stimulustimes = [0=fixation;200=stimword] </trial>
*Incongruent
<trial ICtrial> / ontrialbegin = [values.stimcolor=counter.cdic.selectedvalue] / ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)] / ontrialbegin = [values.stimword=getitem(item.colorwords, counter.cwic.selectedvalue)] / stimulustimes = [0=fixation;200=stimword] </trial>
******************************************************* BLOCKS ******************************************************* <block practiceblock> / trials = [1-5=practicetrial] </block>
<block instructions01> / bgstim = (whitebg) / trials = [1-3=instructiontrial] </block>
<block instructions02> / bgstim = (whitebg) / trials = [1=instructiontrial] </block>
<block instructions03> / bgstim = (whitebg) / trials = [1=instructiontrial] </block>
<block CC> / onblockbegin = [values.condition=1] / trials = [1-10=CCtrial] </block>
<block IC> / onblockbegin = [values.condition=2] / trials = [1-10=ICtrial] </block>
******************************************************* EXPERIMENT *******************************************************
<expt stroop> / blocks = [1=instructions01; 2=practiceblock; 3=instructions02; 4-5=noreplacenorepeat(CC,IC); 6=instructions03] </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>
******************************************************* ******************************************************* Counter Elements / Selection Logic ******************************************************* ******************************************************* *Practice Items ******************* ******************* <counter practicewords> / items = ("GREEN", "RED", "BLUE", "YELLOW", "XXXX") / select = current(practicecolors) </counter>
<counter practicecolors> / items = (3,4,1,2) / select = sequence </counter>
******************* ******************* *Counter Elements / Selection Logic for Test Block ******************* ******************* <counter stimcolor> / items = (blue, green, red, yellow) / select = values.stimcolor </counter>
******************************************************* ******************************************************* *Congruent Color (CC) ******************* ******************* *Display ******************* ******************* <counter cdcc> / items = (1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4) / select = noreplacenorepeat / selectionrate = trial </counter>
******************* ******************* *Word ******************* *******************
<counter cwcc> / 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) / select = current(cdcc) / selectionrate = trial </counter>
******************* ******************* *Incongruent Color (IC) ******************* ******************* *Display ******************* *******************
<counter cdic> / items = (2,3,4,1,3,4,1,2,4,1,2,3,1,2,3,4) / select = noreplacenorepeat / selectionrate = trial </counter>
******************* ******************* *Word ******************* *******************
<counter cwic> / 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) / select = current(cdic) / selectionrate = trial </counter>
******************* *******************
<item colorwords> /1 =" RED " /2 =" GREEN " /3 =" BLUE " /4 =" YELLOW " /5=" XXXX " </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 words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue - as quickly and as accurately as possible. If you make a mistake, keep going." / 2 = "~rYou will see a series of words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue - as quickly and as accurately as possible. If you make a mistake, keep going.~r For example, when this word appears,~r~r~r you would respond with ''red'' as quickly as possible." / 3 = "~rYou will see a series of words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue - as quickly and as accurately as possible. If you make a mistake, keep going.~r For example, when this word appears,~r~r~r you would respond with ''red'' as quickly as possible.~r If this word appears,~r~r~r you would respond with ''blue'' as quickly as possible. ~r Let's practice a few words before we begin." / 4 = "~r~r~r~r~r~rIf you have any questions, please ask the study coordinator.~r When you are ready to begin, press the SPACE BAR." / 5 = "~r~r~r~r~r~rPlease let the study coordinator know you have finished." </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 = " " </item>
<text example02> / items = example02 / select = sequence / resetinterval = 0 / position = (50%, 63%) / txcolor = (blue) / txbgcolor = (transparent) / erase = false </text>
<item example02> / 1 = " " / 2 = " " / 3 = "GREEN" / 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>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 102K
|
Looking only at the two dependent counters below, <counter cdcc> / items = (1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4) / select = noreplacenorepeat / selectionrate = trial </counter>
<counter cwcc> / 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) / select = current(cdcc) / selectionrate = trial </counter> it should be obvious that things won't work. They contain different numbers of items (16 in cdcc, 25 in cwcc). I recommend you give the threads I referred you to earlier another look. EDIT: My bad. I hadn't mentioned any other thread. Here goes, my apologies: E.g. http://www.millisecond.com/forums/Topic2270.aspx Regards, ~Dave
|
|
|
zzril
|
|
Group: Forum Members
Posts: 11,
Visits: 1
|
The counter is what is confusing me and I'm still unclear how to get it to display "XXXX" in each of the colors.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 102K
|
I recommend you
- Take out paper and pencil. Make a table.
- In the 1st column, write down the display color of the stimulus.
- In the 2nd column, write down the stimulus word.
- Repeat until you have all desired combinations listed in the desired amount.
- Encode those combinations in <counter> elements. You need one per column.
----------------------------------- Congruent Trials ----------------------------------- [#] [Display Color] [Stimulus Word] ----------------------------------- 1 BLUE BLUE 2 GREEN GREEN 3 RED RED 4 YELLOW YELLOW 5 BLUE BLUE 6 GREEN GREEN 7 RED RED ...
----------------------------------- Incongruent Trials ----------------------------------- [#] [Display Color] [Stimulus Word] ----------------------------------- 1 BLUE GREEN 2 BLUE RED 3 BLUE YELLOW 4 GREEN BLUE 5 GREEN RED 6 GREEN YELLOW ...
Etc. Regards, ~Dave
|
|
|
zzril
|
|
Group: Forum Members
Posts: 11,
Visits: 1
|
So I'm still having no luck getting the XXXX text to display. I've taken the syntax for the Food Stroop and just replaced the congruent color trial with an XXXX trial and it crashes every time. I didn't change the counter values at all, so don't really know what I'm doing wrong. ******************************************************************************************************* ******************************************************************************************************* VOICE RECOGNITION FOUR COLOR STROOP TASK ******************************************************************************************************* *******************************************************************************************************
******************************************************* ******************************************************* *DEFAULTS ******************************************************* *******************************************************
<defaults> / fontstyle = ("Verdana", 6.00%, true) / screencolor = (white) / txbgcolor = (white) / inputdevice = voicerecord / voicekeythreshold = 50 / posttrialpause = 500 </defaults>
******************************************************* ******************************************************* *Values ******************************************************* *******************************************************
*Notes: *'values.stimcolor' contains a numeric representation of the current word's display color: *1=blue, 2=green, 3=red, 4=yellow *'values.condition' contains a numeric representation of the current condition: *1=incongruent, 2=XXXX
<values> / stimcolor = 0 / stimword = "" / condition = 0 </values>
******************************************************* ******************************************************* *Custom Data Output ******************************************************* ******************************************************* <data> / columns = [date,time,subject,blocknum,blockcode,trialnum,trialcode,latency,response, values.stimword,values.stimcolor,values.condition] / separatefiles = true </data>
******************************************************* ******************************************************* *TRIALS ******************************************************* *******************************************************
***************** ***************** *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;250=stimword] </trial>
***************** *Color trials ***************** *Incongruent
<trial ICtrial> / ontrialbegin = [values.stimcolor=counter.cdic.selectedvalue] / ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)] / ontrialbegin = [values.stimword=getitem(item.colorwords, counter.cwic.selectedvalue)] / stimulustimes = [0=fixation;250=stimword] </trial>
*XXXX
<trial XXtrial> / ontrialbegin = [values.stimcolor=counter.cdic.selectedvalue] / ontrialbegin = [text.stimword.textcolor=getitem(counter.stimcolor, values.stimcolor)] / ontrialbegin = [values.stimword=getitem(item.colorwords, counter.cwxx.selectedvalue)] / stimulustimes = [0=fixation;250=stimword] </trial>
******************************************************* ******************************************************* *BLOCKS ******************************************************* ******************************************************* <block practiceblock> / trials = [1-5=practicetrial] </block>
<block instructions01> / bgstim = (whitebg) / trials = [1-3=instructiontrial] </block>
<block instructions02> / bgstim = (whitebg) / trials = [1=instructiontrial] </block>
<block instructions03> / bgstim = (whitebg) / trials = [1=instructiontrial] </block>
<block IC> / onblockbegin = [values.condition=1] / trials = [1-20=ICtrial] </block>
<block XX> / onblockbegin = [values.condition=2] / trials = [1-20=XXtrial] </block>
******************************************************* EXPERIMENT *******************************************************
<expt stroop> / blocks = [1=instructions01; 2=practiceblock; 3=instructions02; 4-5=noreplacenorepeat(IC, XX); 6=instructions03] </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>
******************************************************* ******************************************************* Counter Elements / Selection Logic ******************************************************* ******************************************************* *Practice Items ******************* *******************
<counter practicewords> / items = ("GREEN", "RED", "BLUE", "YELLOW", "XXXX") / select = current(practicecolors) </counter>
<counter practicecolors> / items = (3,4,5,1,2) / select = sequence </counter>
******************* ******************* *Counter Elements / Selection Logic for Test Block ******************* *******************
<counter stimcolor> / items = (blue, green, red, yellow) / select = values.stimcolor </counter>
******************************************************* *******************************************************
******************* ******************* *Incongruent Color (IC) ******************* ******************* *Display ******************* *******************
<counter cdic> / items = (2,3,4,5,1,3,4,5,1,2,4,5,1,2,3,5,1,2,3,4) / select = noreplacenorepeat / selectionrate = trial </counter>
******************* ******************* *Word ******************* *******************
<counter cwic> / items = (1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5) / select = current(cdic) / selectionrate = trial </counter>
******************* ******************* *XXXX (XX) ******************* ******************* *Display ******************* *******************
<counter cdxx> / items = (2,3,4,5,1,3,4,5,1,2,4,5,1,2,3,5,1,2,3,4) / select = noreplacenorepeat / selectionrate = trial </counter>
******************* ******************* *Word ******************* *******************
<counter cwxx> / 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) / select = current(cdxx) / selectionrate = trial </counter>
******************************************************* ******************************************************* *Items: Color Words ******************************************************* *******************************************************
<item colorwords> /1 =" RED " /2 =" GREEN " /3 =" BLUE " /4 =" YELLOW " /5=" XXXX " </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 words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue, or black - as quickly and as accurately as possible. If you make a mistake, keep going." / 2 = "~rYou will see a series of words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue, or black - as quickly and as accurately as possible. If you make a mistake, keep going.~r For example, when this word appears,~r~r~r you would respond with ''red'' as quickly as possible." / 3 = "~rYou will see a series of words displayed in different colors. Name aloud the color of the presented word - red, yellow, green, blue, or black - as quickly and as accurately as possible. If you make a mistake, keep going.~r For example, when this word appears,~r~r~r you would respond with ''red'' as quickly as possible.~r If this word appears,~r~r~r you would respond with ''blue'' as quickly as possible. ~r Let's practice a few words before we begin." / 4 = "~r~r~r~r~r~rIf you have any questions, please ask the study coordinator now.~r When you are ready to begin, press the SPACE BAR." / 5 = "~r~r~r~r~r~rPlease let the study coordinator know you have finished." </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 = " " </item>
<text example02> / items = example02 / select = sequence / resetinterval = 0 / position = (50%, 63%) / txcolor = (blue) / txbgcolor = (transparent) / erase = false </text>
<item example02> / 1 = " " / 2 = " " / 3 = "GREEN" / 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>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 102K
|
One issue is the same as noted previously: You counter dependencies are off: <counter cdxx> / items = (2,3,4,5,1,3,4,5,1,2,4,5,1,2,3,5,1,2,3,4) / select = noreplacenorepeat / selectionrate = trial </counter>
******************* ******************* *Word ******************* *******************
<counter cwxx> / 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) / select = current(cdxx) / selectionrate = trial </counter> The 1st counter holds 20 items, the 2nd counter holds 25. Obviously the last 5 listed cannot ever be selected. I recommed that -- before you go about changing / adapting an existing script - you work through the original script until you fully understand what it does, how it works and why. Best regards, ~Dave
|
|
|
zzril
|
|
Group: Forum Members
Posts: 11,
Visits: 1
|
Thanks, but this isn't helpful. The documentation is sparse at best and the tutorials don't apply to the script I'm trying to write. Searches for counter dependencies and variations of that string return forum posts which are only marginally relevant.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 102K
|
Consider this: <counter firstname> / items = ("John", "Paul", "George", "Ringo") / select = noreplacenorepeat </counter>
<counter lastname> / items = ("Lennon", "McCartney", "Harrison", "Starr", "Ono") / select = current(firstname) </counter>
<trial showbeatles> / stimulusframes = [1=thename] / validresponse = (57) </trial>
<text thename> / items = ("<%counter.firstname.selectedvalue%> <%counter.lastname.selectedvalue%>") </text>
<block wheresyoko> / trials = [1-8=showbeatles] </block> Ask yourself: Will you see the last name "Ono" when running the code? Why or why not? What will the following code produce as output: <counter firstname> / items = ("John", "Paul", "George", "Ringo") / select = noreplace </counter>
<counter lastname> / items = ("Lennon", "McCartney", "Harrison", "Starr", "Ono") / select = noreplace </counter>
<trial showbeatles> / stimulusframes = [1=thename] / validresponse = (57) </trial>
<text thename> / items = ("<%counter.firstname.selectedvalue%> <%counter.lastname.selectedvalue%>") </text>
<block wheresyoko> / trials = [1-8=showbeatles] </block> What would you have to do to display every possible combination of first and last name? Apply this to your own script.
|
|
|