recognizing correct response for open-ended trial


Author
Message
Marina
Marina
Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)Partner Member (976 reputation)
Group: Forum Members
Posts: 6, Visits: 12
Hi,
I am putting together an experiment that is a variation of the digit span memory task.
Participants are presented with a 4-digit number, and have to enter the digits in a text box, but replace all 1s with 9s and 5s with 8s. (so if they see 2343, they would enter 2343, but if they see 2345 they would enter 2348)
I want to evaluate whether participants got the correct answer on each trial, but am running into some problems. 

Here is some of the syntax I use (I could send you the full syntax if you want)

<expressions>
/fullnumber = evaluate (text.digit1.currentitem*1000 + text.digit2.currentitem*100 + text.digit3.currentitem*10 +text.digit4.currentitem)
/d1 = values.d1
/d2 = values.d2
/d3 = values.d3
/d4 = values.d4
/fullcorrect = (values.d1*1000) + (values.d2*100) +(values.d3*10) +values.d4
/correctanswer = values.correctanswer
</expressions>

<openended practice_add3>
/ stimulustimes = [0 = signal; 1000 = eraser; 1100 = digit1 , digit2, digit3, digit4; 3100 = eraser, response]
/ mask = positiveinteger
/ inputdevice = keyboard
/ charlimit = 4
/ size = (15%, 2.5%)
/ validresponse = (anyresponse)
/timeout = 7000
/ontrialend = [if (text.digit1.currentitem !=5 && text.digit1.currentitem !=1) values.d1 = text.digit1.currentitem; if (text.digit1.currentitem ==5) values.d1 = 8; if (text.digit1.currentitem ==1) values.d1 = 9]
/ontrialend = [if (text.digit2.currentitem !=5 && text.digit2.currentitem !=1) values.d2 = text.digit2.currentitem; if (text.digit2.currentitem ==5) values.d2 = 8; if (text.digit2.currentitem ==1) values.d2 = 9]
/ontrialend = [if (text.digit3.currentitem !=5 && text.digit3.currentitem !=1) values.d3 = text.digit3.currentitem; if (text.digit3.currentitem ==5) values.d3 = 8; if (text.digit3.currentitem ==1) values.d3 = 9]
/ontrialend = [if (text.digit4.currentitem !=5 && text.digit4.currentitem !=1) values.d4 = text.digit4.currentitem; if (text.digit4.currentitem ==5) values.d4 = 8; if (text.digit4.currentitem ==1) values.d4 = 9]
/iscorrectresponse = [evaluate (openended.practice_add3.response - expressions.fullcorrect)==0]
/ontrialend = [values.correctanswer = expressions.fullcorrect]
/ontrialend = [if (openended.practice_add3.correct == true) values.numcorrectadd3practice = values.numcorrectadd3practice + 1]
/ buttonlabel = "Press CTRL+ENTER to continue"
/ errormessage = true(error,400)
/correctmessage = true(yescorrect, 400)
</openended>

digit1 through digit4 are randomly generated digits. I know the program is correctly recording the presented numbers, what should be the 'correct' response, and the response I input (because I ask for the relevant expressions to be saved in the output file), but it is not recognizing correct responses as being correct, so I think my problem is with the /iscorrectresponse line.

I also tried the following:
 /iscorrectresponse = [openended.practice_add3.response == expressions.fullcorrect]
and that does not work either.

Any other suggestions would be appreciated! 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search