Duration Discrimination Task

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: January 11, 2013

Last Modified: January 20, 2023 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements a Duration Discrimination procedure similarly to the one described in:

Wittmann, M., Leland, D.S., Jan Churan, J. & Paulus, M.P.(2007). Impaired time perception and motor timing in stimulant-dependent subjects. Drug and Alcohol Dependence, 90, 183–192.

• Adaptive Maximum-Likelihood Based Algorithm YAAP:

Treutwein, B. (1997). YAAP: yet another adaptive procedure. Spatial Vision 11, 129–134.

• Accelerated Stochastic Approximation Procedure (ASA)

Faes, L., Ricci, L., Vescovi, M., Turatto, M., Pavani, F., & Antolini, R. (2007). Small-sample characterization of stochastic approximation staircases in forced-choice adaptive threshold estimation. Perception & Psychophysics, 69 (2), 254-262.

Note: based on the recommendation of Dr. Treutwein, this script does not implement the YAAP procedure but rather uses the Accelerated Stochastic Approximation Procedure (Faes et al, 2007)

Millisecond thanks Dr. Treutwein for his generous assistance!

Duration

8 minutes

Description

Participants listen to two tones (one a standard tone, the other the comparison tone) one after the other and have to decide which is longer. In half the trials the standard is played first. Two different standard tone lengths are used: 100ms (short) vs. 1000ms (long). Within 50 trials (default; change under BLOCKS -> block.DurationDiscrimination) the script attempts to estimate the participants' threshold durations via an Accelerated Stochastic Approximation procedure (see below for an explanation).

Procedure

Threshold Estimation

The Duration Discrimination procedure described (Wittman et al, 2007) used the adaptive maximum-likelihood based
algorithm YAAP (Treutwein, 1997) to vary the length of the next stimulus in order to find the
participant's threshold duration (threshold duration was defined as the duration at which a participant makes
correct choice with probability p = 0.75).
Based on Dr. Treutwein's own recommendation, this script uses the Accelerated Stochastic Approximation Procedure (ASA)
(e.g. Faes et al, 2007)instead.

Accelerated Stochastic Approximation (ASA) Procedure:
Stochastic Approximation Procedures (SA) belong to the category of non-parametric adaptive procedures to establish
sensory thresholds. Their goal is to determine the threshold intensity at which point participants make the correct choice
with probability p.

SAs are staircase procedures with variable steps that adjust the next stimulus intensity
(either up=increase or down=decrease stimulus intensity)
depending on whether response was correct or incorrect over the course of a set number of trials (N).
The adjustment of the stimulus intensity is inverse to the number of trials run, so adjustments
get smaller the more trials have been run.

stepsizecorrection_decrease = C * (1-p)/n (after correct response, n = number of trials run so far, C= initial step size correction)
stepsizecorrect_increase = (C*p) / n (after incorrect response, n = number of trials run so far, C= initial step size correction)

ASAs differ from the more basic SAs simply by not adjusting the step size after each response but only if a shift
in the response (from correct to incorrect or vice versa) occurs. In ASA procedures the stimulus intensities tested home in on the threshold intensity more rapidly
compared to the standard SA procedures.

According to Faes et al (2007), ASA work relatively well for 2-alternative forced-choice paradigms as long as
1. the initial stimulus intensity is above the participant's threshold
2. the procedure is started with a relatively large initial step size correction (C)

Furthermore, there will be a trade-off for ASA procedures between determining accurate thresholds (the more
trials are run the more accurate the threshold) and the length of the assessment (the more trials
are run the longer the experiment). The threshold itself can be estimated using two alternative ways:
1. the threshold is the duration that would have been chosen next had the procedure not terminated (used in this
script)
2. the average of the last M trials

In this script: 50 trials per standard tone (=> 100 trials total)

Stimuli

see section Editable Stimuli

Instructions

instructions are not original and can be easily edited under section Editable Instructions

Summary Data

File Name: durationdiscrimination_summary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
probabilityP Target threshold probability (default: 0.75)
numberIterations Stores the number of trials used to determine threshold
standard1Duration Duration of standard 1 tone in ms (default: 100ms)
standard2Duration Duration of standard 2 tone in ms (default: 1000ms)
initialdurationComp1 Initial duration for comparison 1 tone in ms (default: 300ms)
initialdurationComp2 Initial duration for comparison 2 tone in ms (default: 3000ms)
initialCorrectionStandard1C Initial stepsize correction for standard 1 tone in ms (default: 100ms)
initialCorrectionStandard2C Initial stepsize correction for standard 2 tone in ms (default: 1000ms)
threshold1Duration The calculated threshold duration for standard tone1 in ms (determined as nextcomptone1_duration)
threshold2Duration The calculated threshold duration for standard tone2 in ms (determined as nextcomptone2_duration)

Raw Data

File Name: durationdiscrimination_raw*.iqdat

Data Fields

NameDescription
computer.platform Device platform: win | mac |ios | android
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockCode Name of the current block
blockNum Number of the current block
trialCode Name of the current trial
trialNum Number of the current trial
condition 1 = standard 1 trial sequence; 2 = standard 2 trial sequence
currTrialCountStandard1N Counts the trials in standard 1 trial sequence
currTrialCountStandard2N Counts the trials in standard 2 trial sequence
comptoneDuration Stores the currently valid (depending on standard) current duration of the comparison tone in data file
stepSize Stores the currently valid stepsize (depending on standard) in the data file
nextcomptoneDuration Stores the currently valid (depending on standard) next duration of the comparison tone in data file
lastResponse-
currResponse Store the values for the current and the previous response accurracy
for the currently tested tone condition
response The participant's response (scancode of response)
2 => participant pressed '1'
3 => participant pressed '2'
correct The correctness of the response (1 = correct; 0 = incorrect)
latency The response latency (in ms)

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
standard1Duration Duration of standard 1 tone in ms 100ms
standard2Duration Duration of standard 2 tone in ms 1000ms
initialDurationComp1 Initial duration for comparison 1 tone in ms 300ms
initialDurationComp2 Initial duration for comparison 2 tone in ms 3000ms
comp1Min Minimum duration of comparison 1 tone in ms 101ms
comp2Min Minimum duration of comparison 2 tone in ms 1005ms
initialCorrectionStandard1C Initial stepsize correction for standard 1 tone in ms 100ms
initialCorrectionStandard2C Initial stepsize correction for standard 2 tone in ms 1000ms
probabilityP Target threshold probability 0.75
interStimulusInterval Pause between the two tones in ms 500ms
interTrialInterval Pause between trial sequences in ms 1000ms