PennController for IBEX › Forums › Support › Logging Question Chosen-Option
- This topic has 1 reply, 2 voices, and was last updated 1 year, 3 months ago by Jeremy.
-
AuthorPosts
-
May 22, 2023 at 6:11 pm #10608JulianaNovoParticipant
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,
JulianaMay 23, 2023 at 4:57 am #10609JeremyKeymasterHi 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:
ReceptionTime,MD5,Controller,Item,Element,Label,Group,PennElementType,PennElementName,Parameter,Value,EventTime,Frase1,Frase2,Condition,Item,Group,Expected,Correct,Time,Comments 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 donewController("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 answersJeremy
-
AuthorPosts
- You must be logged in to reply to this topic.