GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kurokida/jsQUEST: A Bayesian adaptive psychometric method for measuring thresholds in online experiments.

BranchesTags
Open more actions menu

Latest commit

 

History

60 Commits
60 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
docs
docs
 
 
jsPsychDemo
jsPsychDemo
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CITATION.cff
CITATION.cff
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
rollup.config.js
rollup.config.js
 
 
very_simple_demo.html
very_simple_demo.html
 
 

Repository files navigation

jsQUEST: A Bayesian adaptive psychometric method for measuring thresholds in online experiments.

The QUEST method (Watson & Pelli, 1983) is a Bayesian adaptive psychometric method. jsQuest is a JavaScript library to use the QUEST method in online experiments.

The files published here are translated from MATLAB files written by Professor Denis Pelli to JavaScript files. Almost all of the MATLAB code is commented out in each JavaScript file. The usage of each function is the same as that of MATLAB functions. So, you can refer to the help of Psychtoolbox.

If you are more interested in QUEST+ (Watson, 2017) than QUEST, then you can use jsQuestPlus instead.

How to cite

We prefer to cite the paper, but either citation is acceptable.

Paper citation

Kuroki, D., & Pronk, T. (2022). jsQuestPlus: A JavaScript implementation of the QUEST+ method for estimating psychometric function parameters in online experiments. Behavior Research Methods. https://doi.org/10.3758/s13428-022-01948-8

Software citation (for version 1.1.1)

Kuroki, D., & Pronk, T. (2021). jsQUEST: A Bayesian adaptive psychometric method for measuring thresholds in online experiments. (Version 1.1.1) [Computer software]. https://github.com/kurokida/jsQUEST

How to use

Please refer to this page.

Demonstration

Please run jsPsychDemo/jsQUEST_jsPsychDemo.html. You will see that the peak of the posterior probability density function (PDF) gets closer to the truth value as you run more trials. This demo program is combined with jsPsych.

dist/demo.html does not use the jsPsych library. The results of all simulations can be observed in a JavaScript console window. If you are not a jsPsych user, this demo may be more useful for you.

Important changes from Psychtoolbox

  • QuestBetaAnalysis does not support outputting to a file.
  • QuestMode returns an object with the 'mode' and 'pdf' properties.
  • QuestRecompute takes the third and fourth arguments. The third argument means the width of the chart, and the forth argument means the height of the chart.
  • QuestSimulate takes the fifth and sixth arguments. The fifth argument means the width of the chart, and the sixth argument means the height of the chart.

Libraries

  • Using the numeric, it is possible to perform matrix/array calculations at high speed.
  • The interp1 function is used for 1-D data interpolation. GitHub page.
  • Chart.js is used for drawing graphs. GitHub page
  • I introduce StaircaseJS although it is not used in jsQUEST.

Memo

At first, I tried to use the numeric.spline function instead of the interp1 function. However, I was not able to get the proper xThreshold under the following conditions:

const tGuess = -1
const tGuessSd = 2
const pThreshold=0.82;
const beta=4.76;
const delta=0.01;
const gamma=0.5;
const grain= 0.02
const dim = 250
let q = QuestCreate(tGuess, tGuessSd, pThreshold, beta, delta, gamma, grain, grain*dim, 1);

In the above condition, xThreshold was -40.88. (The correct value was 0.0036). In other conditions, the numeric.spline function returned the correct value. The cause is unknown.

The following section describes how to use jsQUEST as an ES6 module.

@tpronk developed a prototype of jsQUEST as an ES6 module. He adapted the code to act like an ES6 module, so it can easily be imported into other ES6 modules as follows:

import {jsquest} from "./jsQUEST.module.js";

Information for developers/contributors

Installation

Install node, then clone the repo to your hard drive. Next, you can install jsQUEST and its dependencies by running:

npm install

Building jsQUEST

To package jsQUEST and it's dependencies, and export those as UMD bundle, run the command below. Your bundle will be available in the dist/ directory:

npx rollup -c

Demos and Tests

Demo

This script reproduces jsQuest's demo, but without the graph.

node test/jsQUEST_demo.js

Demo

This script reproduces a test of jsQuest against PsychoPy.

node test/jsQUEST_test.js

Notes

jsQUEST depends on the numeric library, which @tpronk forked and turned into an ES6 module as well. The fork of numeric can be found here.

About

A Bayesian adaptive psychometric method for measuring thresholds in online experiments.

Topics

jspsychonline-experimentspsychophysicspsychopypsychtoolbox

Resources

Readme
MIT license
Activity

Stars

17 stars

Watchers

2 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.