This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

Learning lab.js - 1

Words
406
Reading
2 min
Listen
Play
3y

Preamble

These are some notes from initial learning lab.js, a tool for creating online experiments. It can be quite challenging to learn lab.js, but not impossible. These notes are written is after learning from this YouTube video by Christian Higton.

First, it is important to start by laying out the entire skeleton of the sequence. This is an important first step.

Screenshot 2023-03-30 at 9.16.57 PM.png

The first in the entire steps is the intro, the last is the end screen.

Next, what is housed under Sequence is the sequence of each trial, i.e. what each trial entails. Here for the lexical decision task, there are: fixdot, trial, and scoring. Every trial will have each of these.

The loop controls the main processes, which determines how many trials.

Check out the details next for finer tips.

Intro

Screenshot 2023-03-30 at 9.25.51 PM.png

Just some intro text. The necessary part is the Responses where the action is set to keypress on any key so that the user can advance after reading.

Loop

Under the loop, the contents of the different trials are defined. Here each trial has two parameters: word and type.

Screenshot 2023-03-30 at 9.29.52 PM.png

Also important to note that a csv file can be uploaded to save the trouble of manually inserting contents.

Screenshot 2023-03-30 at 9.35.35 PM.png

Fixdot

Nothing much here, but here the time out of 500ms is set, so that the participant's attention can be focused on the dot briefly to get ready.

Screenshot 2023-03-30 at 9.43.38 PM.png

Trial

This is the place where the idea of placeholder is demonstrated.

Under the content, to show each word, the ${parameters.word} is used. With that, the words are drawn according what is defined in loop.

Screenshot 2023-03-30 at 9.55.35 PM.png

But there is even a more elaborate part.

Screenshot 2023-03-30 at 9.46.05 PM.png

Time out is set to 2000 ms, i.e. 2 seconds as this is the time allocated for the trial to be completed.

The Responses part is the important one. The q which is on the left is assigned as the button for fake, and the p is for real. That is, if a real word appears, p is pressed.

There is also a place to indicate Correct responses, which is basically whatever is indicated under type. The way to use it is to use ${parameters.type}. I beleive this has something to do with what is being logged in the final data, which is for reference.

Scoring

Lastly, there is a scoring screen which allows the variable correct count to be added through {this.data.correctcount=thisdata.correctcount||0 +1} .

Screenshot 2023-03-30 at 10.00.20 PM.png

This concludes this learning report.