Logging Question Chosen-Option

PennController for IBEX Forums Support Logging Question Chosen-Option

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10608

    First, the link: https://farm.pcibex.net/r/MnDRfV/

    Dear Jeremy, I am using Ibexfarm controller Question for a forced-joice task with two options (1 and 2) using the as parameter to set the answer choices presented to participants. I was able to do a template for the trial, in which the options (1 and 2) are read from a csv file. It all works very nicely. Now, when I look into the results, it gives me reading times, it lists the phrases that go into each option (1 and 2) and, also the expected answer, but I wish I could have the number of the chosen option, as in 1 and 2. So that I could calculate the overall accuracy for each participant.
    What I am missing? I wish I could have the number of the chosen phrase, if it was 1 or 2 in each trial.
    As always, thanks a lot in advance,

    Very best,


    Hi Juliana,

    Unfortunately the Question controller was written in a way that it reports the content of the selected answer, not its index. However, since you are logging the content of both questions, you can compare the content of the answer to those columns and determine the index of the chosen answer, which you can then compare to the expected index. For example, here is a line from a test-run of mine, with a header line with column names before it for clarity:

    752,REDACTED,PennController,11,0,item,NULL,Controller-Question,Question,NULL,Ou hoje ou amanhã fomos à praia.,1684831742806,Ou hoje ou amanhã iremos à praia.,Ou hoje ou amanhã fomos à praia.,TREINO,1,U,1,NULL,1967

    In R for example, and assuming results only contain rows for that Question controller, I would do something like this:

    results$AnswerIndex <- 1 + (results$Value == results$Frase2)
    results$Accurate <- results$AnswerIndex == results$Expected

    Note, however, that the Question controller already comes with a hasCorrect option, so you could do newController("Question", {q: "", as: [variable.Frase1, variable.Frase2], hasCorrect: parseInt(variable.Expected)-1}). Then you'd have a 1 reported for correct answers and a 0 for incorrect answers


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