A guide to online experiments using Pavlovia
Giorgio Papitto papitto@cbs.mpg.de
Department of Neuropsychology, Max Planck Institute for
Human Cognitive and Brain Sciences, Leipzig, Germany
Max Planck Institute for Human Cognitive and Brain Sciences
Who am I?
Current position
Max Planck Institute for Human Cognitive and Brain Sciences
Web-Based Research
Advantages
Slide adapted from An Intro to Web-Based Experiments
Disadvantages
Max Planck Institute for Human Cognitive and Brain Sciences
Data quality: The web versus the lab
Some tips (Crump et al., 2013):
For more tips on how to improve a web-based study, see Kochari (2019)
Max Planck Institute for Human Cognitive and Brain Sciences
The steps for creating an online experiment
Once you have a clear structure of the experiment in your mind:
(1) Program the task
(2) Host the task to a server
(3) Recruit participants
Max Planck Institute for Human Cognitive and Brain Sciences
PsychoPy
PsychoPy is a free and open source python installation that will run on MacOS, Windows, and Linux.
Visit the PsychoPy page to install (https://www.psychopy.org/).
There are many ways to install, choose your favourite.
Max Planck Institute for Human Cognitive and Brain Sciences
PsychoPy
Max Planck Institute for Human Cognitive and Brain Sciences
Lexical decision task
+
way
+
woy
Fixation Cross
Text
press right key for words
press left key for pseudo-words
Time
Word
Psuedoword
Let’s look at the list of all trials
Max Planck Institute for Human Cognitive and Brain Sciences
The Builder
Max Planck Institute for Human Cognitive and Brain Sciences
Elements in Builder
Text components
Text
Insert Routine (Trial) with two text components (one for fixation cross; one for the lexical item)
This is a $variable!
Max Planck Institute for Human Cognitive and Brain Sciences
Elements in Builder
Participants response
Another variable!
Insert Keyboard (Responses components) in trial
Max Planck Institute for Human Cognitive and Brain Sciences
Defining trials and variables
To make an example, let's create 8 trials. All we need is an excel file structured as follows:
One thing missing: how do we link these values to the experiment?
WITH A LOOP
These are the variables we have been using
Max Planck Institute for Human Cognitive and Brain Sciences
Sending trials and variables to the Builder
Loops
Your experiment is now ready to run
Insert a loop that starts before Trial and ends after it
Max Planck Institute for Human Cognitive and Brain Sciences
Can we also code in PsychoPy?
Insert code component above fix_cross
Max Planck Institute for Human Cognitive and Brain Sciences
Can we also code in PsychoPy?
Import the Python package for randomizations
Define the variable every time the routine starts
Max Planck Institute for Human Cognitive and Brain Sciences
Can we also code in PsychoPy?
First delete this
Max Planck Institute for Human Cognitive and Brain Sciences
Can we also code in PsychoPy?
Click on fix_cross to open its properties
Insert the variable name (with $) to call it
Max Planck Institute for Human Cognitive and Brain Sciences
Testing your study
Press run
Participant pressed right for a word (correct trial)
Participant pressed left for a pseudo-word (correct trial)
Participant pressed left for a word (wrong trial)
Participant pressed right for a pseudo-word (wrong trial)
Max Planck Institute for Human Cognitive and Brain Sciences
Sharing the experiment
Max Planck Institute for Human Cognitive and Brain Sciences
The steps for creating an online experiment
(2) Host the task to a server
Max Planck Institute for Human Cognitive and Brain Sciences
Pavlovia
It contains also 23 demo experiments that you can try to run right now (digit span task, Stroop task, lexical decision task, and more).
Max Planck Institute for Human Cognitive and Brain Sciences
Pavlovia and PsychoJS
Max Planck Institute for Human Cognitive and Brain Sciences
JavaScript and GitLab
�
You don’t need to know JavaScript:
GOOD NEWS
Max Planck Institute for Human Cognitive and Brain Sciences
PsychoPy, PsychoJS and Pavlovia
Max Planck Institute for Human Cognitive and Brain Sciences
Pavlovia
Visit Pavlovia and create an account.
Max Planck Institute for Human Cognitive and Brain Sciences
Create your online study
Standard components
Custom/Code components
Max Planck Institute for Human Cognitive and Brain Sciences
Code Components
Automatic translation
Custom translation
Max Planck Institute for Human Cognitive and Brain Sciences
Additional features (and their links)
Max Planck Institute for Human Cognitive and Brain Sciences
Our online Lexical Decision task
Max Planck Institute for Human Cognitive and Brain Sciences
Our online Lexical Decision task
lexical_decision_online
Max Planck Institute for Human Cognitive and Brain Sciences
Our online Lexical Decision task
Max Planck Institute for Human Cognitive and Brain Sciences
Our online Lexical Decision task
lexical_decision_online
Max Planck Institute for Human Cognitive and Brain Sciences
The steps for creating an experiment
(3) Recruit participants
Max Planck Institute for Human Cognitive and Brain Sciences
Pavlovia
Pavlovia can connect to a range of other online systems as well, some of which are helpful in recruiting participants:
https://run.pavlovia.org/yourUsername/yourStudyName/index.html
Or you can just share the experiment link via mail:
In the URL you can already set some variables, e.g. participant number/group:
https://run.pavlovia.org/yourUsername/yourStudyName/index.html?participant=1&group=A
Max Planck Institute for Human Cognitive and Brain Sciences
The ultimate guide
If you want to learn something more about PsychoPy, there is a nice book that guides you through all the features of the software
Here you can find the complete manual
Here you can find some help on the forum
Max Planck Institute for Human Cognitive and Brain Sciences
Time to say goodbye
Max Planck Institute for Human Cognitive and Brain Sciences