Displaying data #1883
-
Hi. I am trying to make my experiemtn display and record data in a clean way. this is the source code for one of my trials: Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @rbruno1! To score each response as correct or incorrect, you can add an const Tur_AV_trial_10 = {
// other parameters...
on_finish: function(data) {
data.correct = jsPsych.pluginAPI.compareKeys(data.response, data.correct_response);
}
} This code will add a You can take a look at the Manipulating Data section of the Simple Reaction Time tutorial for another example and explanation of scoring the response from each trial. And there's a section about Data Aggregation to get a performance summary across trials, if you're interested in that too. I hope that helps. Let us know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
Hi @rbruno1! To score each response as correct or incorrect, you can add an
on_finish
parameter to the trial that compares the correct response (which you've already stored in the trial data) with the participant's response (which is added to the trial data when the trial is finished). It would look like this:This code will add a
correct
property to the data for each trial. Its value will betrue
if the response matches the correct response, andfalse
if not.You can take a look at the Manipulating Data section of t…