Flanker task problem again


Author
Message
Tobiii
Tobiii
Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)Respected Member (421 reputation)
Group: Awaiting Activation
Posts: 5, Visits: 24
Hi everyone I am back with the same problem again. To recap, I have modified the Flanker task with Fish to allow for three stimuli and have expanded the original trial types from 6 to 9.  The problem I am still facing is that the response keys do not correspond to the stimuli. This time, however, the practice trials work but the real trials do not. The parts I modified are in bold and highlighted in yellow and my modification is in the zip file below. I suspect the problem lies in this part specifically (see below) but I am not certain. Someone advise please?

<trial flanker>
/ontrialbegin = [values.response == ""]
/ontrialbegin = [if (script.currentblock == "practice2") values.trialtype = list.trialtype_practice2.nextvalue else values.trialtype = list.trialtype.nextvalue]
/ontrialbegin = [if (values.trialtype == 1) {values.selectflanker = 1; values.selecttarget = 1; values.count_congruent += 1}]
/ontrialbegin = [if (values.trialtype == 2) {values.selectflanker = 2; values.selecttarget = 1; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype == 3) {values.selectflanker = 3; values.selecttarget = 1; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype == 4) {values.selectflanker = 2; values.selecttarget = 2; values.count_congruent += 1}]
/ontrialbegin = [if (values.trialtype == 5) {values.selectflanker = 1; values.selecttarget = 2; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype == 6) {values.selectflanker = 3; values.selecttarget = 2; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype == 7) {values.selectflanker = 3; values.selecttarget = 3; values.count_congruent += 1}]
/ontrialbegin = [if (values.trialtype == 8) {values.selectflanker = 2; values.selecttarget = 3; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype == 9) {values.selectflanker = 1; values.selecttarget = 3; values.count_incongruent += 1}]
/ontrialbegin = [if (values.trialtype < 4) {values.targetdirection = "targetright"}]
/ontrialbegin = [if (values.trialtype > 6) {values.targetdirection = "targetup"}]
/ontrialbegin = [if (values.trialtype == 4 || values.trialtype == 5 || values.trialtype == 6) {values.targetdirection = "targetleft"}]
/ontrialbegin = [if (values.trialtype == 1 || values.trialtype == 4|| values.trialtype == 7 ) {values.congruence = "congruent"}]
/ontrialbegin = [if (values.trialtype == 2 || values.trialtype == 3|| values.trialtype == 5 || values.trialtype == 6 || values.trialtype == 8|| values.trialtype == 9) {values.congruence = "incongruent"}]

/stimulusframes = [1 = flanker1, flanker2, target]
/monkeyresponse = (38, 51, 52)
/isvalidresponse = [trial.flanker_onlytarget.response == values.responsekey_targetright || trial.flanker_onlytarget.response == values.responsekey_targetup ||
trial.flanker_onlytarget.response == values.responsekey_targetleft]
/iscorrectresponse = [(values.targetdirection == "targetright" && trial.flanker_onlytarget.response == values.responsekey_targetright) ||
(values.targetdirection == "targetleft" && trial.flanker_onlytarget.response == values.responsekey_targetleft) ||
(values.targetdirection == "targetup" && trial.flanker_onlytarget.response == values.responsekey_targetup)]



Attachments
flanker.zip (203 views, 90.00 KB)
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: 104K
Your /isvalidresponse and /iscorrectresponse statements refer to the *wrong* <trial> element.

The <trial> is called flanker, but your logic refers to a completely different <trial> element: trial.flanker_onlytarget.

<trial flanker>
...
/isvalidresponse = [trial.flanker_onlytarget.response == values.responsekey_targetright || trial.flanker_onlytarget.response == values.responsekey_targetup ||
trial.flanker_onlytarget.response == values.responsekey_targetleft]
/iscorrectresponse = [(values.targetdirection == "targetright" && trial.flanker_onlytarget.response == values.responsekey_targetright) ||
(values.targetdirection == "targetleft" && trial.flanker_onlytarget.response == values.responsekey_targetleft) ||
(values.targetdirection == "targetup" && trial.flanker_onlytarget.response == values.responsekey_targetup)]
...
</trial>

Fix that logic to refer to the actual trial.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search