PennController for IBEX › Forums › Support › Correct/Incorrect answers in .csv file
- This topic has 4 replies, 3 voices, and was last updated 2 years, 12 months ago by
Jeremy.
-
AuthorPosts
-
December 5, 2022 at 9:14 pm #9770
yasufmgParticipantHi, Jeremy! Hope all is well.
I’m coding an acceptability judgment experiment which consists in participants reading a context+sentence, rating it in a 0-100 scale, then answering a comprehension question about the sentence read before. Only one of the options is the correct one. I’d like to have the .csv file to show a column that logs only correct or incorrect answer automatically. I tried adding in the experiment file a column named EXPECTEDANSWER, but I was wondering if there’s a more straightforward way to do this, considering we would have to individually consult each answer to validate if it’s right or wrong.
You can access the experiment here.
Thank you!
December 5, 2022 at 11:37 pm #9771
JeremyKeymasterHi,
You could add this before your Scale element:
newVar("CORRECT").global().set(false)Then right after
wait()on the Scale element:.test.selected(row.EXPECTEDANSWER).success( getVar("CORRECT").set(true) )and finally after the last “record trial data”
logline:.log("CORRECT", getVar("CORRECT"))Jeremy
December 8, 2022 at 9:39 pm #9780
yasufmgParticipantHi, Jeremy!
It works perfectly! Thank you so much!
One more thing: my experiment has filler sentences that won’t have any intended answer – for instance, some of them have an unusual word order which would make them ungrammatical. Is there a way to log these filler sentences as “null” or “none” using this method?
Thanks!
December 11, 2022 at 3:07 pm #9786
ElRkParticipantHello,
I’m sorry because it’s not so relevant to the post’s topic but because you have used a scale, could you please give me more information on inserting the scale element?
I’m setting an experiment with pairs of sentence-picture and I need a 5point scale at the bottom of the photo.You can access the experiment here : https://farm.pcibex.net/r/RLwLNB/
December 12, 2022 at 3:40 pm #9794
JeremyKeymasterHi,
my experiment has filler sentences that won’t have any intended answer – for instance, some of them have an unusual word order which would make them ungrammatical. Is there a way to log these filler sentences as “null” or “none” using this method?
You could replace
.log("CORRECT", getVar("CORRECT"))with.log("CORRECT", row.TYPE=="filler" ? "NA" : getVar("CORRECT"))I’m addressing the question from the last post on the dedicated topic created here
Jeremy
-
AuthorPosts
- You must be logged in to reply to this topic.