SC-IAT in JsPsych
This is an example of an single catagory Implicit association test (SC-IAT) in Js-Psych 5 based on other examples posted previously by Nathan Parkin in Google groups here: https://groups.google.com/g/jspsych/c/3-YrE1upPqM/m/qXE5OCLXAQAJ
The experiment posted here has several additions:
Instructions have been translated into English
The code checks for mobile devices, and only runs on computers.
The code includes a box for participants to provide a subject ID, and provides participants with a random ID if they do not provide an ID of their own
The code includes a randomiser to push participants to different versions of the IAT. This can be used for counterbalancing presentation orders, or as in the example experiment, randomising the presentation order of two SC-IATs.
How to Run
Change references in HTML files from "YOURSERVER" to your actual server name, then upload all the files to the public directory of the server (Note the server must allow for PHP and Javascript. E.g. Byethost.)
Create a folder in the public directory called "data"
Give the newly created "data" folder and the iatphp.php file full read, write, and executive permissions (777).
Restrict access to the "data" folder using a .htacess file. This is most easily done using C-Panel or equivilant software on your host server.
To run the experiment, open the link www.yourserver.com/Device.html Data will save into the folder called data.
Upon completion, a tab will open with google searching whatever you put as your subject ID. In the code google can be replaced with a link to Qualtrics or Limesurvey to carry over subject ID into a survey.
The example experiment will completes the following steps:
Check for mobile devices and screen out
Ask for a subject ID
Present information, e.g. ethics approvals, welcome etc.
Randomise participants to receive one of two SC-IATs
Redirect participants to the other SC-IAT once they have completed the first one, while retaining the original subject ID
Redirect participants to another website after ending, with the ability to retain the original subject ID.
If you would like to sample and SC-IAT in JsPsych, you can complete one here, or begin the IAT below.