Help! registering the correct response


Author
Message
rtrchc
rtrchc
Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)
Group: Forum Members
Posts: 3, Visits: 8
I am running a very simple choice reaction time task and cannot figure out how to get inquisit to interpret the correct response.  I've tried / correctresponse = "j", failing that, my current guess is below which is also not working.  The data file shows every response as an error, regardless of whether it is or is not an error.  I can't figure it out.  I am a new user and not having the easiest time getting the hang of inquisit.  Any tips are VERY welcome.

Thank you!

My trial looks like this: 
<trial target>
/ ontrialbegin = [values.timeinterval = list.timeinterval.nextvalue]
/ pretrialpause = values.timeinterval
/ stimulustimes = [1=target]
/ iscorrectresponse = [list.correctresp.nextvalue]
/ validresponse = ("f", "j", no response)
/ beginresponsetime = 0
/ recorddata = true
/ timeout = 2500
</trial>

and list (simplified) looks like this: 
<list targettype>
/ items = (
1,1,1,1,1,
2,2,2,2,2)
/ selectionmode = random
</list>

list correctresp>
/ items = ("j","j","j","j","j",
"f","f","f","f","f")
/ selectionmode = list.targettype.currentindex
</list>

data looks like this:
<data>
/ file = "ChoiceRT_RawData.iqdat"
/ columns = [subject, trialnum, pretrialpause, latency, response, correct, error]
/ separatefiles = true
</data>

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: 12K, Visits: 98K
(1) Your use of the /iscorrectresponse attribute is incorrect. You need an expression that evaluates to either true or false, i.e. something along the lines of

<trial target>
...
/ iscorrectresponse = [trial.target.response == list.correctresp.nextvalue]
...
</trial>

(2) A trial's response property returns a given key's *numerical keyboard scancode* (cf. the "Keyboard Scan Codes" topic in the documentation and Tools -> Keyboard Scancodes...), not a key's "literal" value (e.g. the letter imprinted on it). Your <list> element ought to reflect that:

*36 = scancode for the "j"-key / 33 = scancode for the "f"-key*
<list correctresp>
/ items = (36,36,36,36,36,
33,33,33,33,33)
/ selectionmode = list.targettype.currentindex
</list>

Here's a barebones, minimal (but runnable & self-contained) example:
<block myblock>
/ trials = [1-4 = mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = ("a", "b")
/ iscorrectresponse = [trial.mytrial.response == list.cresp.nextvalue]
/ errormessage = true(errormsg, 500)
/ correctmessage = true(correctmsg, 500)
</trial>

<text mytext>
/ items = ("A1", "A2", "B1", "B2")
</text>

* 30 = scancode for "A"-key / 48 = scancode for "B"-key *
<list cresp>
/ items = (30, 30, 48, 48)
/ selectionmode = text.mytext.currentindex
</list>

<text errormsg>
/ items = ("ERROR")
/ position = (50%, 75%)
</text>

<text correctmsg>
/ items = ("CORRECT")
/ position = (50%, 75%)
</text>

Edited 9 Years Ago by Dave
rtrchc
rtrchc
Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)
Group: Forum Members
Posts: 3, Visits: 8
Dave,

Thank you for your response. I corrected the keycode scan codes and tried your suggestion with the error message and discovered that the program is considering every response as an error.  So the trouble is that somehow I have not programmed the correct stimuli with the correct response.  Perhaps the trouble is here?:

<picture target>
/ items = (1 = "VGO.bmp", 2 = "VNOGO.bmp")
/ size = (75mm,75mm)
/ position = (50%,50%)
/ erase = false
</picture>

the only place I have designated what the correct response is in the following:

<list targettype>
/ items = (
1,1,1,1,1,
2,2,2,2,2)
/ selectionmode = random
</list>

<list correctresp>
/ items = (36,36,36,36,36,
33,33,33,33,33)
/ selectionmode = list.targettype.currentindex
</list>

Will this script tell the program to select target 1 or 2 randomly and choose the corresponding correct response from the list?  I am pretty sure I am missing a critical item.  

Thank you!
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: 12K, Visits: 98K
You have not defined any relationship between your <picture> element and the respective <list>s.

Nothing in the code excerpts you posted suggests that <list targettype> would ever be sampled from. If you go back to the example in my previous reply, notice the dependency between the stimulus (<text>) element and the <list> holding the correct responses.

In your case, do

<picture target>
/ items = ("VGO.bmp", "VNOGO.bmp")
/ size = (75mm,75mm)
/ position = (50%,50%)
/ erase = false
/ select = list.targettype.nextvalue
</picture>
Edited 9 Years Ago by Dave
rtrchc
rtrchc
Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)Partner Member (646 reputation)
Group: Forum Members
Posts: 3, Visits: 8
That was what I was missing!  Thanks so much!!!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search