flâneur — a map of the web's best reading

Demo Experiment: Simple Reaction Time Task - jsPsych

jspsych.org · 7,909 words · saved by 1 readers

This tutorial will work through the creation of a simple response time task. The task is to press one key for a blue colored circle and another key for an orange colored circle. Despite this simple task, the tutorial covers many of the key features of jsPsych, including: Start by setting up a new HTML file with jsPsych, the html-keyboard-response plugin, and the jspsych.css file loaded. If you are unsure how to do this, follow the Hello World tutorial. You should have an HTML document that looks like this: This will be our starting point for building the rest of the experiment. First we have to initialize jsPsych. We can do this using the initJsPsych() function, and saving the result to a variable called jsPsych. All jsPsych experiments are defined by a timeline. The timeline is an array that contains the set of trials we want to run in the experiment. We can start by defining an empty timeline array. We'll add trials to this array as we create them. Let's greet the participant with a

Summary of Tutorial Content ¶ This tutorial will work through the creation of a simple response time task. The task is to press one key for a blue colored circle and another key for an orange colored circle. Despite this simple task, the tutorial covers many of the key features of jsPsych, including: Using a plugin to create a standard trial. Combining plugins together to create new kinds of trials. Using timeline variables to maximize code reuse. Preloading media. Randomizing presentation order. Manipulating, filtering, and aggregating data. Using dynamic content to change the experiment

Explore this link on the map →

related reading