# JSDoc: Class: QuestHandler

# Class: QuestHandler

## data.QuestHandler()

#### new QuestHandler()

Source:
  - data/QuestHandler.js, line 44

### Members

#### (static, readonly) Method :Symbol

QuestHandler method

##### Type:

- Symbol

##### Properties:

Name | Type | Description
--- | --- | ---
`QUANTILE` | Symbol | Quantile threshold estimate.
`MEAN` | Symbol | Mean threshold estimate.
`MODE` | Symbol | Mode threshold estimate.

Source:
  - data/QuestHandler.js, line 392

### Methods

#### (protected) _estimateQuestValue() → {void}

Estimate the next value of the QUEST variable, based on the current value and on the selected QUEST method.

Source:
  - data/QuestHandler.js, line 312

##### Returns:

Type
  void

#### (protected) _setupJsQuest() → {void}

Setup the JS Quest object.

Source:
  - data/QuestHandler.js, line 292

##### Returns:

Type
  void

#### addResponse() → {void}

Add a response and update the PDF.

Source:
  - data/QuestHandler.js, line 113

##### Returns:

Type
  void

#### confInterval()

Get an estimate of the 5%-95% confidence interval (CI).

Source:
  - data/QuestHandler.js, line 266

#### getQuestValue() → {number}

Get the current value of the variable / contrast / threshold.

Source:
  - data/QuestHandler.js, line 238

##### Returns:

the current QUEST value for the variable / contrast / threshold

Type
  number

#### mean() → {number}

Get the mean of the Quest posterior PDF.

Source:
  - data/QuestHandler.js, line 184

##### Returns:

the mean

Type
  number

#### mode() → {number}

Get the mode of the Quest posterior PDF.

Source:
  - data/QuestHandler.js, line 210

##### Returns:

the mode

Type
  number

#### quantile() → {number}

Get the standard deviation of the Quest posterior PDF.

Source:
  - data/QuestHandler.js, line 224

##### Returns:

the quantile

Type
  number

#### sd() → {number}

Get the standard deviation of the Quest posterior PDF.

Source:
  - data/QuestHandler.js, line 197

##### Returns:

the standard deviation

Type
  number

#### setMethod(method, log)

Setter for the method attribute.

##### Parameters:

Name | Type | Description
--- | --- | ---
`method` | mixed | the method value, PsychoPy-style values ("mean", "median", "quantile") are converted to their respective QuestHandler.Method values
`log` | boolean | whether or not to log the change of seed

Source:
  - data/QuestHandler.js, line 98

#### simulate()

Simulate a response.

Source:
  - data/QuestHandler.js, line 163