var general_debrief = { type: "html-keyboard-response", maintain_aspect_ratio: true, render_on_canvas: true, stimulus: function() { var trials_srt = jsPsych.data.get().filter({task: 'response_srt'}); var srt_rt = Math.round(trials_srt.select('rt').mean()); var trials_drt = jsPsych.data.get().filter({task: 'response_drt'}); var correct_trials_drt = trials_drt.filter({correct: true}); var drt_accuracy = Math.round(correct_trials_drt.count() / trials_drt.count() * 100); var drt_rt = Math.round(correct_trials_drt.select('rt').mean()); var trials_mrt = jsPsych.data.get().filter({task: 'response_mrt'}); var correct_trials_mrt = trials_mrt.filter({correct: true}); var mrt_accuracy = Math.round(correct_trials_mrt.count() / trials_mrt.count() * 100); var mrt_rt = Math.round(correct_trials_mrt.select('rt').mean()); return `

This was the experiment for reaction time.

Here follows a summary of your results:

Single Reaction Time:

${srt_rt}ms

Dual Reaction Time:

${drt_rt}ms

${drt_accuracy}%

Multiple Reaction Time:

${mrt_rt}ms

${mrt_accuracy}%

Make sure that you have written down your reaction times and accurcy scores!

Press any key to finish the experiment`; } }; timeline.push(general_debrief);