IAT with Reaction Times?


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: 105K
It seems to me that what you describe isn't an IAT at all, but some kind of generic rating task. I would thus recommend that you do *not* use an IAT script as the basis, but instead build the script from scratch. You should be able to do so after working through the tutorials included in the Inquisit documentation.

unicornx
unicornx
Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)Partner Member (684 reputation)
Group: Forum Members
Posts: 5, Visits: 82
Hello,

I am currently trying to create an IAT whereby participants rate their level of an emotion after looking at two images simultaneously. I have used an adapted version of the Single-Category Picture IAT script (pasted below). However, I was wondering if it is possible to record the reaction time for all of the stimuli ratings, and if so, how I could do so. Also, is it possible to make the IAT so that there is no correct answer (so that the responses are simply based on the participants' autonomic responses)? Also, how could I make the experiment so that it is only one trial instead of multiple trials? 

EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************

<parameters>
/showsummaryfeedback = true
/pretrialpause = 250
/ showreminder = false
/ reminderRT = 2000
/ reminderduration = 500
</parameters>

**************************************************************************************************************
**************************************************************************************************************
EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************
This sample IAT can be easily adapted to different target categories
and attributes. To change the categories, you need only change the
stimulus items and labels immediately below this line.

***********************************************************************
<item attributeAlabel>
/1 = "Left"
</item>

<item attributeA>
/1 ="left"
</item>


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

<item attributeB>
/1 = "Right"

</item>

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

<item targetA>
/ 1 = "Grouped Dead Man.png"
/2 = "Grouped Dead Boar.png"
/3 = "Grouped Dead Animal.png"
/4 = "Grouped Snake.png"
/5 = "Grouped Web Spider.png"
</item>

**************************************************************************************************************
**************************************************************************************************************
EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************

<item instructions>
/ 1 = "<%expressions.buttoninstruct1%>Pictures or words representing the categories at the top will appear one-by-one in the middle of the screen. When the item belongs to a category on the left, press the left <%expressions.buttoninstruct2%>; when the item belongs to a category on the right, press the right <%expressions.buttoninstruct3%>. Items belong to only one category. If you make an error, an X will appear - fix the error by hitting the other <%expressions.buttoninstruct4%>.

This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Going too slow or making too many errors will result in an uninterpretable score. Continue on with some practice trials."
/ 2 = "
Sort the same three categories again.

Words representing the categories at the top will appear one-by-one in the middle of the screen. When the item belongs to a category on the left, press the left <%expressions.buttoninstruct2%>; when the item belongs to a category on the right, press the right <%expressions.buttoninstruct3%>. Items belong to only one category. If you make an error, an X will appear - fix the error by hitting the other <%expressions.buttoninstruct4%>.

This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Going too slow or making too many errors will result in an uninterpretable score."

/ 3 = "
See above, the three categories now appear together in a new configuration. Remember, each item belongs to only one group.

The rules stay the same: Words representing the categories at the top will appear one-by-one in the middle of the screen. When the item belongs to a category on the left, press the left <%expressions.buttoninstruct2%>; when the item belongs to a category on the right, press the right <%expressions.buttoninstruct3%>. Items belong to only one category. If you make an error, an X will appear - fix the error by hitting the other <%expressions.buttoninstruct4%>.

This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Going too slow or making too many errors will result in an uninterpretable score. Continue on with some practice trials."

/ 4 = "
Sort the same three categories again.

Words representing the categories at the top will appear one-by-one in the middle of the screen. When the item belongs to a category on the left, press the left <%expressions.buttoninstruct2%>; when the item belongs to a category on the right, press the right <%expressions.buttoninstruct3%>. Items belong to only one category. If you make an error, an X will appear - fix the error by hitting the other <%expressions.buttoninstruct4%>.

This is a timed sorting task. GO AS FAST AS YOU CAN while making as few mistakes as possible. Going too slow or making too many errors will result in an uninterpretable score."
</item>


****************************************************************************************************
general instruction expressions: adjust the instruction text depending on device used to run script
****************************************************************************************************
<expressions>
/buttoninstruct1 = if (computer.touch) {"";} else {"Put your middle or index fingers on the E and I keys of your keyboard. ";}
/buttoninstruct2 = if (computer.touch) {"response button ('E') provided on the bottom left of your screen with your left middle or index finger";} else {"(E) key";}
/buttoninstruct3 = if (computer.touch) {"response button ('I') provided on the bottom right of your screen with your right middle or index finger";} else {"(I) key";}
/buttoninstruct4 = if (computer.touch) {"response button";} else {"key";}
</expressions>

***********************************************************************
Performance summary
***********************************************************************

<trial summary>
/ stimulustimes = [0=summary]
/ validresponse = (" ")
/ recorddata = false
/ ontrialbegin = [values.magnitude = "little to no"]
/ ontrialbegin = [if( abs(expressions.d) > 0.15 ) values.magnitude = "a slight"]
/ ontrialbegin = [if( abs(expressions.d) > 0.35 ) values.magnitude = "a moderate"]
/ ontrialbegin = [if( abs(expressions.d) >= 0.65 ) values.magnitude = "a strong"]
/ ontrialbegin = [if(expressions.d >= 0.0) expressions.attitude = "positive"]
/ ontrialbegin = [if(expressions.d < 0.0) expressions.attitude = "negative"]
</trial>

<text summary>
/ items = ("Your IAT score (D) was <% expressions.d %>, which suggests <% values.magnitude %> <% expressions.attitude %> implicit attitude towards <% item.targetALabel.1 %>.~n~n~nPress the spacebar to complete this session.")
/ size = (60%, 60%)
/ hjustify = left
</text>

**************************************************************************************************************
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************


**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 5.0.0.0 or higher

<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = black
/ txbgcolor = black
/ txcolor = white
/ minimumversion = "5.0.0.0"
/ canvasaspectratio = (4, 3)
</defaults>

**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, group, subject, blockcode, blocknum, trialcode, trialnum,
response, correct, latency, stimulusnumber, stimulusitem,
expressions.d, expressions.latdiff, expressions.percentcorrect)
/ separatefiles = true
</data>

****************
summary data
****************

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed,
expressions.m1, expressions.sd1, expressions.m2, expressions.sd2,
expressions.d, expressions.latdiff, expressions.percentcorrect)
/ separatefiles = true
</summarydata>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
            
/completed:0 = script was not completed; 1 = script was completed (all conditions run)
/correct:1 = correct response; 0 = incorrect response
/ sum1:tracks the sum of the latencies to correct responses (and latencies <= 10000ms) for the compatible block
/ sum2a:tracks the sum of the latencies to correct responses (and latencies <= 10000ms) for the incompatible block
/ n1:counts the number of correct trials in compatible block
/ n2:counts the number of correct trials in incompatible block
/ ss1:tracks the sum of the squared latencies to correct responses (and latencies <= 10000ms) in the compatible block
/ ss2tracks the sum of the squared latencies to correct responses (and latencies <= 10000ms) in the incompatible block
/ magnitude:stores the magnitude of the implicit preference: "little to no", "a slight", "a moderate", "a strong"
/ n_correct:counts all initial correct responses of all trials that count towards D score

/key_left:left response key scancode (default: 18 => E)
/key_left_label:label of left response key (here: E)
/key_right:right response key scancode (default: 23 => I)
/key_right_label:label of right response key (here: "I")

<values>
/completed = 0
/correct = 0
/ sum1 = 0
/ sum2 = 0
/ n1 = 0
/ n2 = 0
/ ss1 = 0
/ ss2 = 0
/ magnitude = "unknown"
/ n_correct = 0

/key_left = 18
/key_left_label = "E"
/key_right = 23
/key_right_label = "I"
</values>

**************************************************************************************************************
**************************************************************************************************************
EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************

/ m1:mean latencies of correct responses in compatible block
/ m2:mean latencies of correct responses in incompatible block
/ sd1:standard deviation of latencies of correct responses in compatible block
/ sd2:standard deviation of latencies of correct responses in incompatible block
/ sd:standarddeviation of latencies overall
/ d:overall D-score
/ latdiff:difference between mean latencies in incompatible and compatible block
/ attitude:positive vs. negative
/ percentcorrect:   calculates the overall percent correct score of initial responses of compatible and incompatible trials
with specified latencies

<expressions>
/ m1 = values.sum1 / values.n1
/ m2 = values.sum2 / values.n2
/ sd1 = sqrt((values.ss1 - (values.n1 * (expressions.m1 * expressions.m1))) / (values.n1 - 1))
/ sd2 = sqrt((values.ss2 - (values.n2 * (expressions.m2 * expressions.m2))) / (values.n2 - 1))
/ sd = sqrt((((values.n1 - 1) * (expressions.sd1 * expressions.sd1) + (values.n2 - 1) * (expressions.sd2 * expressions.sd2)) + ((values.n1 + values.n2) * ((expressions.m1 - expressions.m2) * (expressions.m1 - expressions.m2)) / 4) ) / (values.n1 + values.n2 - 1) )
/ d = (m2 - m1) / expressions.sd
/ latdiff = m2 - m1
/ attitude = "unknown"
/ percentcorrect = (values.n_correct/ (block.compatibletest.trialcount + block.incompatibletest.trialcount)) * 100
</expressions>

**************************************************************************************************************
**************************************************************************************************************
INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<trial instructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ correctmessage = false
/ recorddata = false
</trial>

<text instructions>
/ items = instructions
/ hjustify = left
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ select = sequence
/ resetinterval = 20
</text>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************
<text spacebar>
/ items = ("Press the SPACE BAR to begin.")
/ position = (50%, 95%)
/ valign = bottom
</text>

<text attributeA>
/ items = attributeA
/ fontstyle = ("Arial", 5%)
/ txcolor = green
</text>

<text attributeB>
/ items = attributeB
/ fontstyle = ("Arial", 5%)
/ txcolor = green
</text>

<picture targetA>
/ items = targetA
/ size = (20%, 20%)
</picture>

<text error>
/ position = (50%, 75%)
/ items = ("X")
/ color = red
/ fontstyle = ("Arial", 10%, true)
</text>

<text correctmessage>
/ position = (50%, 75%)
/ items = ("O")
/ color = green
/ fontstyle = ("Arial", 10%, true)
</text>

<text attributeAleft>
/ items = attributeAlabel
/ valign = top
/ halign = left
/ position = (5%, 5%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
</text>

<text attributeBright>
/ items = attributeBlabel
/ valign = top
/ halign = right
/ position = (95%, 5%)
/ txcolor = green
/ fontstyle = ("Arial", 5%)
</text>

<text targetAleftmixed>
/ items = targetAlabel
/ valign = top
/ halign = left
/ position = (5%, 19%)
/ fontstyle = ("Arial", 5%)
</text>

<text targetArightmixed>
/ items = targetAlabel
/ valign = top
/ halign = right
/ position = (95%, 19%)
/ fontstyle = ("Arial", 5%)
</text>

<text targetAleft>
/ items = targetAlabel
/ valign = top
/ halign = left
/ position = (5%, 5%)
/ fontstyle = ("Arial", 5%)
</text>

<text targetAright>
/ items = targetAlabel
/ valign = top
/ halign = right
/ position = (95%, 5%)
/ fontstyle = ("Arial", 5%)
</text>

<text orleft>
/ items = ("or")
/ valign = top
/ halign = left
/ position = (5%, 12%)
/ fontstyle = ("Arial", 5%)
</text>

<text orright>
/ items = ("or")
/ valign = top
/ halign = right
/ position = (95%, 12%)
/ fontstyle = ("Arial", 5%)
</text>

<text reminder>
/items = ("Please, respond more quickly!")
/txcolor = yellow
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
</text>


**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

<trial attributeA>
/pretrialpause = parameters.pretrialpause
/stimulusframes = [1 = attributeA]
/validresponse = (18, 23)
/correctresponse = (18)
/responsemessage = (23,error,150)
/correctmessage = true(correctmessage,150)

/ontrialend = [if (trial.attributea.correct) values.correct = 1 else values.correct = 0]
/branch = [if (parameters.showreminder == true && trial.attributea.latency >= parameters.reminderRT) trial.reminder]
</trial>

<trial attributeB>
/pretrialpause = parameters.pretrialpause
/stimulusframes = [1 = attributeB]
/validresponse = (18, 23)
/correctresponse = (23)
/responsemessage = (18,error,150)
/correctmessage = true(correctmessage,150)

/ontrialend = [if (trial.attributeb.correct) values.correct = 1 else values.correct = 0]
/branch = [if (parameters.showreminder == true && trial.attributeB.latency >= parameters.reminderRT) trial.reminder]
</trial>

<trial targetAleft>
/pretrialpause = parameters.pretrialpause
/stimulusframes = [1 = targetA]
/validresponse = (18, 23)
/correctresponse = (18)
/responsemessage = (23,error,150)
/correctmessage = true(correctmessage,150)

/ontrialend = [if (trial.targetAleft.correct) values.correct = 1 else values.correct = 0]
/branch = [if (parameters.showreminder == true && trial.targetAleft.latency >= parameters.reminderRT) trial.reminder]
</trial>

<trial targetAright>
/pretrialpause = parameters.pretrialpause
/stimulusframes = [1 = targetA]
/validresponse = (18, 23)
/correctresponse = (23)
/responsemessage = (18,error,150)
/correctmessage = true(correctmessage,150)

/ontrialend = [if (trial.targetAright.correct) values.correct = 1 else values.correct = 0]
/branch = [if (parameters.showreminder == true && trial.targetAright.latency >= parameters.reminderRT) trial.reminder]
</trial>

<trial reminder>
/stimulusframes = [1 = reminder]
/timeout = parameters.reminderduration
/correctresponse = (noresponse)
/recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************

Note: presents the trials in a 7:7:10 ratio => 14 (good + target) on responsekey_left and 10 (bad) on responsekey_right
<block practice_compatibletest>
/ bgstim = (attributeAleft, orleft, targetAleftmixed, attributeBright)
/ trials = [1=instructions;
2-25 = noreplace(targetAleft, targetAleft, targetAleft, targetAleft, targetAleft, targetAleft, targetAleft,
attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA,
attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB)]
/ responsemode = correct
</block>

Note: presents the trials in a 7:7:10 ratio => 14 (good + target) on responsekey_left and 10 (bad) on responsekey_right
<block compatibletest>
/ bgstim = (attributeAleft, orleft, targetAleftmixed, attributeBright)
/ trials = [1-72 =noreplace(targetAleft, targetAleft, targetAleft, targetAleft, targetAleft, targetAleft, targetAleft,
attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA,
attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB)]
/ ontrialend = [if(block.compatibletest.latency <= 10000) values.sum1 = values.sum1 + block.compatibletest.latency]
/ ontrialend = [if(block.compatibletest.latency <= 10000) values.n1 = values.n1 + 1]
/ ontrialend = [if(block.compatibletest.latency <= 10000) values.ss1 = values.ss1 + (block.compatibletest.latency * block.compatibletest.latency)]
/ ontrialend = [if(block.compatibletest.latency <= 10000) values.n_correct += block.compatibletest.correct]
/ responsemode = correct
</block>

Note: presents the trials in a 7:7:10 ratio => 10 (good) on responsekey_left and 14 (bad + target) on responsekey_right
<block practice_incompatibletest>
/ bgstim = (attributeAleft, targetARightMixed, orright, attributeBright)
/ trials = [1=instructions; 2-25 = noreplace(targetAright, targetAright, targetAright, targetAright, targetAright, targetAright, targetAright,
attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA,
attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB)]
/ responsemode = correct
</block>

Note: presents the trials in a 7:7:10 ratio => 10 (good) on responsekey_left and 14 (bad + target) on responsekey_right
<block incompatibletest>
/ bgstim = (attributeAleft, targetARightMixed, orright, attributeBright)
/ trials = [1-72 = noreplace(targetAright, targetAright, targetAright, targetAright, targetAright, targetAright, targetAright,
attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA, attributeA,
attributeB, attributeB, attributeB, attributeB, attributeB, attributeB, attributeB)]
/ ontrialend = [if(block.incompatibletest.latency <= 10000) values.sum2 = values.sum2 + block.incompatibletest.latency]
/ ontrialend = [if(block.incompatibletest.latency <= 10000) values.n2 = values.n2 + 1]
/ ontrialend = [if(block.incompatibletest.latency <= 10000) values.ss2 = values.ss2 + (block.incompatibletest.latency * block.incompatibletest.latency)]
/ ontrialend = [if(block.incompatibletest.latency <= 10000) values.n_correct += block.incompatibletest.correct]
/ responsemode = correct
</block>

<block compatibletestinstructions>
/ bgstim = (attributeAleft, orleft, targetAleftmixed, attributeBright)
/ trials = [1=instructions]
/ recorddata = false
</block>

<block incompatibletestinstructions>
/ bgstim = (attributeAleft, attributeBright, orright, targetArightmixed)
/ trials = [1=instructions]
/ recorddata = false
</block>

<block summary>
/skip = [parameters.showsummaryfeedback == false]
/ trials = [1=summary]
/ recorddata = false
</block>

**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
Groupassignment is done by groupnumber

<expt>
/subjects = (1 of 2)
/groupassignment = groupnumber
/ blocks = [1=practice_compatibletest; 2=compatibletestinstructions; 3=compatibletest;
4=practice_incompatibletest; 5=incompatibletestinstructions; 6=incompatibletest; 7=summary]
/onexptend = [values.completed = 1]
</expt>

<expt>
/subjects = (2 of 2)
/groupassignment = groupnumber
/ blocks = [1=practice_incompatibletest; 2=incompatibletestinstructions; 3=incompatibletest;
4=practice_compatibletest; 5=compatibletestinstructions; 6=compatibletest; 7=summary]
/onexptend = [values.completed = 1]
</expt>


***********************************************************************
Test Monkey
***********************************************************************
<monkey>
/ latencydistribution = normal(500, 100)
/ percentcorrect = 90
</monkey>

Thanks.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search