Linking correct responses to text items


Author
Message
marti305
marti305
Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)Associate Member (192 reputation)
Group: Forum Members
Posts: 2, Visits: 12
Hello,

I am programming a facial recognition memory task where a group of faces will be presented in a learning block and a test block.  In the test block, participants will indicate if the face was previously presented by clicking "Old" or "New."  I am having a hard time with defining the valid and correct responses within the "test" trials.  I keep getting an error message saying that it is an invalid setting.  Can you please look at my script and provide some feedback as to what I'm doing wrong?

These are all the lines that I have written regarding the recognition question (if a face is old or new):

<item Recognitionquestions>
/1 = "Is this face Old or New?"
</item>  

<text recognitionquestions>
/items = item.recognitionquestions
/position = (50%, 5%)
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</text>

<trial testWIfaces>
/ontrialbegin = [values.category = "Wifaces"]
/ontrialbegin = [values.itemnumber = list.learningwifaces.nextvalue]
/ontrialbegin = [values.itemnumber = list.testwifaces.nextvalue]

/stimulusframes = [1 = wifaces, recognitionquestions]
/validresponse = (Old, New)
/correctresponse = [if values.itemnumber.wifaces(1-20) == "Old"
else values.itemnumber.wifaces(21-40) == "New"]
/ontrialend = [values.countcorr_wifaces]
</trial>


Thank you for your help.

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: 83K
There are numerous syntax issues.

#1:

<trial testWIfaces>
...
/ontrialbegin = [values.itemnumber = list.learningwifaces.nextvalue]
/ontrialbegin = [values.itemnumber = list.testwifaces.nextvalue]
...
</trial>

It does not make sense to first set values.itemnumber to a value sampled from list.learningwifaces and then immediately overwrite that with a value sampled from list.testwifaces. You'll want to eliminate the first of the two /ontrialbegin statements.

#2:

<trial testWIfaces>
...
/correctresponse = [if values.itemnumber.wifaces(1-20) == "Old"
else values.itemnumber.wifaces(21-40) == "New"]
..
</trial>

You may not use /correctresponse. If you need to determine the correct response dynamically, you *must* use /iscorrectresponse.

#3: Even if you were using /iscorrectresponse, the syntax is wrong.

<trial testWIfaces>
...
/iscorrectresponse = [if values.itemnumber.wifaces(1-20) == "Old"
else values.itemnumber.wifaces(21-40) == "New"]
..
</trial>

There is no such thing as values.itemnumber.wifaces. The only thing that exists is values.itemnumber.

<trial testWIfaces>
...
/correctresponse = [if values.itemnumber.wifaces(1-20) == "Old"
else values.itemnumber.wifaces(21-40) == "New"]
..
</trial>

No syntax like that exists. This is not how you check the numerical value of a global variable (a <values> entry).

The proper syntax is:


<trial testWIfaces>
/ontrialbegin = [values.category = "Wifaces"]
/ontrialbegin = [values.itemnumber = list.testwifaces.nextvalue]

/stimulusframes = [1 = wifaces, recognitionquestions, old, new]
/ validresponse = (Old, New)
/ iscorrectresponse = [ (values.itemnumber < 21 && trial.testwifaces.response == "Old") || (values.itemnumber > 20 && trial.testwifaces.response == "New") ]
...
</trial>


Here's a basic, self-contained example so you can check / verify for yourself:

<values>
/ itemnumber = 0
</values>

<block testblock>
/ trials = [1-40 = testwifaces]
</block>

<trial testWIfaces>
/ ontrialbegin = [values.itemnumber = list.testwifaces.nextvalue]
/ stimulusframes = [1 = wifaces, old, new]
/ inputdevice = mouse
/ validresponse = (Old, New)
/ iscorrectresponse = [ (values.itemnumber < 21 && trial.testwifaces.response == "Old") || (values.itemnumber > 20 && trial.testwifaces.response == "New") ]
</trial>

<list testwifaces>
/ items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
    21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
</list>

<text wifaces>
/ items = wifaceitems
/ select = values.itemnumber
</text>

<item wifaceitems>
/ 1 = "Old 01"
/ 2 = "Old 02"
/ 3 = "Old 03"
/ 4 = "Old 04"
/ 5 = "Old 05"
/ 6 = "Old 06"
/ 7 = "Old 07"
/ 8 = "Old 08"
/ 9 = "Old 09"
/ 10 = "Old 10"
/ 11 = "Old 11"
/ 12 = "Old 12"
/ 13 = "Old 13"
/ 14 = "Old 14"
/ 15 = "Old 15"
/ 16 = "Old 16"
/ 17 = "Old 17"
/ 18 = "Old 18"
/ 19 = "Old 19"
/ 20 = "Old 20"

/ 21 = "New 01"
/ 22 = "New 02"
/ 23 = "New 03"
/ 24 = "New 04"
/ 25 = "New 05"
/ 26 = "New 06"
/ 27 = "New 07"
/ 28 = "New 08"
/ 29 = "New 09"
/ 30 = "New 10"
/ 31 = "New 11"
/ 32 = "New 12"
/ 33 = "New 13"
/ 34 = "New 14"
/ 35 = "New 15"
/ 36 = "New 16"
/ 37 = "New 17"
/ 38 = "New 18"
/ 39 = "New 19"
/ 40 = "New 20"
</item>

<text old>
/ items = ("OLD IMAGE")
/ position = (40%,75%)
</text>

<text new>
/ items = ("NEW IMAGE")
/ position = (60%,75%)
</text>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search