Correct/Incorrect answers in .csv file

PennController for IBEX Forums Support Correct/Incorrect answers in .csv file

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9770
    yasufmg
    Participant

    Hi, 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!

    #9771
    Jeremy
    Keymaster

    Hi,

    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” log line: .log("CORRECT", getVar("CORRECT"))

    Jeremy

    #9780
    yasufmg
    Participant

    Hi, 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!

    #9786
    ElRk
    Participant

    Hello,

    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/

    #9794
    Jeremy
    Keymaster

    Hi,

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.