Lexical decision template
Last updated
Last updated
To install this experiment template, use the command pushkin install experiment
, then select lexical.
When correctiveFeedback is set to true
, the bounding box will change color based on the participant's response - green meaning correct, red meaning incorrect. If set to false
, the box remains black.
word_1: Word displayed in the top of the fixation box
word_2: Word displayed in the bottom of the fixation box
both_words: If true, 'Y' is the correct answer (both word_1 and word_2 are real words). If false, 'N' is the correct answer (one or both of word_1 and word_2 are not real words)
related: If true, the words are semantically related to each other (e.g. leaf and tree). If false, the words are unrelated (e.g. sock and tree).
If you have installed an experiment using the lexical decision experiment template and called it lex
, you should have a directory called lex
in your experiments folder. This directory should be structured like this:
In order to customize your simple lexical decision experiment, you will need to access two files, config.js
and stim.js
. These files can be found in web page/src/
, a directory that looks like this:
config.js
This file controls the aesthetics of your experiment, including font color, font size, and font family. If you wanted to set the font color to red
, set the font size to 22px
, and set the font family to a monospace font such as Courier New, you would modify config.js
as follows:
You'll notice that 'Courier New'
is not fontFamily
's only specification. This is because it's important to list backup fonts in case your preferred font can't be loaded. You can read more about this practice here and see other CSS font combination ideas here. You'll also notice that correctiveFeedback
is set to true
. You can change this to false
so that participants don't receive any feedback.
After making any desired changes, run pushkin prep
and pushkin start
to see the updates.
stim.js
This file controls the stimuli presented to participants. It specifies (1) the two words presented on the screen (word_1
and word_2
), (2) whether both words are true words (both_words
), and (3) whether the two words are related to each other (related
).
Say you have created the following table of stimuli for your experiment.
FLOWER
PETAL
true
true
BALL
NET
true
true
DOG
LEASH
true
true
COMB
BRUSH
true
true
BABY
BEAN
true
false
CAGE
FERN
true
false
DOG
FLOUR
true
false
GOAT
SAND
true
false
VASE
VATE
false
false
ARM
ARL
false
false
COAT
COET
false
false
HAIR
HAIP
false
false
HAME
HAMA
false
false
DAKE
GRAKE
false
false
CLEB
CLED
false
false
AFTY
AFLY
false
false
In order to use these stimuli in the lexical decision experiment, you must use a table-to-JSON converter such as this one to format it correctly for jsPsych.
Once it has been converted, paste the JSON into the stim.js
file, which should now look like this:
Run pushkin prep
and pushkin start
again, and your experiment should be ready to go!