Return to the Delay Discounting (random adjustment) page
						
							Delay & Probability Discounting Procedure (Richards et al., 1999)
SCRIPT INFO

Script Author: 	Meticulously handcrafted from the finest code by David Nitz (nitz.david@gmail.com) for Millisecond Software, LLC.
last updated: 01-07-2016 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Copyright © 01-07-2016 Millisecond Software


BACKGROUND INFO

											*Purpose*

	This script implements the Delay and Probability Discounting procedure described in:

	Richards, J. B., Zhang, L., Mitchell, S. H., & De Wit, H. (1999). Delay or probability 
	discounting in a model of impulsive behavior: Effect of alcohol. Journal of the Experimental
	Analysis of Behavior, 71(2), 121-143.


											  *Task*
Participants choose between a standard amount of money ($10) with different time/probability delays 
or a variable amount with no delay until an indifference point for each delay is found or until
the maximum number of trials has been run for each delay (default: 30).


DATA FILE INFORMATION: 
The default data stored in the data files are:

(1) Raw data file: 'DPDT_Richards_raw*.iqdat' (a separate file for each participant)

build:									Inquisit build
computer.platform:						the platform the script was run on
date, time, subject, group:				date and time script was run with the current subject/groupnumber 
blockcode, blocknum:					the name and number of the current block
trialcode, trialnum: 					the name and number of the currently recorded trial
											(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) 
values.trialcount						Total number of trials run (including distractor trials).
trialcode								the name of the current trial
latency									the participant’s response latency for the current trial (in ms)
response								the selected response of the participant for the current trial (for most trials: A or B)
text.question.currentitem				the actual decision question presented to participant
values.questiontype						1 = temporal delay question; 2 = probabilistic delay question
text.subjectquestion.currentitem		the question that was randomly selected to determine participant’s reward
text.subjectanswer.currentitem			The participant’s response to the win question
values.var								'Variable' amount of money offered in the current trial. This value is computed according to the proper bottom and top limits (see below) by expressions 		't1_var' through 'p5_var'.
parameters.std								'Standard' amount of money to use throughout the task. Default is 10.

The following variable is only relevant for trials values.questiontype = 1	
parameters.t								Value of the current temporal delay used in a given trial. 
The following variable is only relevant for trials values.questiontype = 2	
parameters.p,								Value of the current probabilistic 'delay' used in a given trial. 

The following variables are only relevant for trials trialcode = “t1”	

values.t1_bmax					The respective maximum bottom limits for temporal delay t1. Used to determine the variable amount of money offered in a given t1 trial and to adjust the limits for subsequent t1 trials.
values.t1_bmin					The respective minimum bottom limits for 
temporal delay t1. 				Used to determine the variable amount of money offered in a given t1 trial and to adjust the limits for subsequent t1 trials.
values.t1_tmin					The respective minimum top limits for the temporal delay t1. Used to determine the variable amount of money offered in a given t1 trial and to adjust the limits for subsequent t1 trials.
values.t1_tmax					The respective maximum top limits for the temporal delay t1. Used to determine the variable amount of money offered in a given t1 trial and to adjust the limits for subsequent t1 trials.
expressions.t1_var				Compute a random 'variable' amount for temporal delays t1. The valid range is restricted by the respective maximum bottom and maximum top limits. Values returned lie between those limits in 0.5 increments.
values.t1_count					Number of trials for temporal delay t1.
values.t1_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t1.
values.t1_ip					Obtained indifference point estimate for temporal delay t1
parameters.t1						Predetermined value for temporal delay t1 questions in this script (t1 = 0) 

(same for all temporal delays t2-t5)

The following variables are only relevant for trials trialcode = “p1”	
values.p1_bmax					The respective maximum bottom limits for probabilistic ‘delay’ p1. Used to determine the variable amount of money offered in a given p1 trial and to adjust the limits for subsequent p1 trials.
values.p1_bmin					The respective minimum bottom limits for probabilistic ‘delay’ p1. Used to determine the variable amount of money offered in a given p1 trial and to adjust the limits for subsequent p1 trials.
values.p1_tmin					The respective minimum top limits for the probabilistic ‘delay’ p1. Used to determine the variable amount of money offered in a given p1 trial and to adjust the limits for subsequent p1 trials.
values.p1_tmax					The respective maximum top limits for the probabilistic ‘delay’ p1. Used to determine the variable amount of money offered in a given p1 trial and to adjust the limits for subsequent p1 trials.
expressions.p1_var				Compute a random 'variable' amount for probabilistic ‘delay’ p1. The valid range is restricted by the respective maximum bottom and maximum top limits. Values returned lie between those limits in 0.5 increments.
values.p1_count					Number of trials for probabilistic ‘delay’ p1.
values.p1_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic ‘delay’ p1.
values.p1_ip					Obtained indifference point estimate for probabilistic ‘delay’ p1
parameters.p1						Predetermined value for probabilistic ‘delay’ p1questions in this script (p1 = 100) 

(same for all probabilistic delays p2-p5)

Relevant for all trials	
expressions.nips				The total number of successfully determined indifference points. The procedure determines a total of 10 different indifference points (for five temporal delays, 't1' to 't5', and five probabilistic 'delays', 'p1' to 'p5'). The procedure is stopped as soon as 'expressions.nips' returns 10, i.e. when all indifference points at question have been obtained.
parameters.distractorstart			Number of trials to run *before* distractor trials should be added to the mix. Default is 70, i.e. after 70 experimental trials ('t1' to 'p5') have been run, every second trial will be a distractor trial ('d0').
values.d0_count					Total number of distractor trials run
expressions.d0_var				Computes a random 'variable' amount to be used in distractor trials ('d0'). The value returned always lies between 0 and the defined 'standard' amount ($10) in 0.5 increments


(2) Summary data file: 'DPDT_Richards_summary*.iqdat' (a separate file for each participant)

script.subjectid:				subject id number
script.groupid:					group id number
script.startdate:				date script was run
script.starttime:				time script was started
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
expressions.nips				The total number of successfully determined indifference points. The procedure determines a total of 10 different indifference points (for five temporal delays, 't1' to 't5', and five probabilistic 'delays', 'p1' to 'p5'). The procedure is stopped as soon as 'expressions.nips' returns 10, i.e. when all indifference points at question have been obtained.

values.t1_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t1.
values.t1_ip					Obtained indifference point estimate for temporal delay t1

values.t2_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t2.
values.t2_ip					Obtained indifference point estimate for temporal delay t2

values.t3_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t3.	
values.t3_ip					Obtained indifference point estimate for temporal delay t3

values.t4_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t4.	
values.t4_ip					Obtained indifference point estimate for temporal delay t4

values.t5_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for temporal delay t5.
values.t5_ip					Obtained indifference point estimate for temporal delay t5

values.p1_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic delay p1.	
values.p1_ip					Obtained indifference point estimate for probabilistic ‘delay’ p1

values.p2_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic delay p2.	
values.p2_ip					Obtained indifference point estimate for probabilistic ‘delay’ p2

values.p3_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic delay p3.		
values.p3_ip					Obtained indifference point estimate for probabilistic ‘delay’ p3

values.p4_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic delay p4.		
values.p4_ip					Obtained indifference point estimate for probabilistic ‘delay’ p4

values.p5_ip_found				Value reflecting whether an indifference point has been successfully determined ('1') or not ('0') for probabilistic delay p5.		
values.p5_ip					Obtained indifference point estimate for probabilistic ‘delay’ p5

text.subjectquestion.currentitem			the question that was randomly selected to determine participant’s reward
text.subjectanswer.currentitem			The participant’s response to the win question



EXPERIMENTAL SET-UP
* 5 temporal delays and 5 probability "delays"; tested within in a mixed design
	temporal delays are 0, 2, 30, 180 and 365 days
	probability delays are: 100, 90, 75, 50 and 25 percent
	=> change delays under section EDITABLE PARAMETERS
* 1 standard amount (10), variable amounts between 0 <=variable amount <= 10
* once an indifference point is found for a particular delay, that delay is not run any further
* potentially 30 trials can be run for each delay -> can be edited under block.DPDT
* after a predetermined amount of trials (see EDITABLE PARAMETERS), a distractor trial is run after each test trial
* script stops if an indifference point has been found for all delays or the maximum number of trials 
has been run for each delay (default: 30).


	Description of the adjustment procedure:
	
	If a subject picks the 'variable' amount on a given trial, the respective top and the bottom 
	limits are decreased according to the following three rules: 
	(a) If the 'variable' amount is less than the minimum top limit, the minimum top limit is set to
	equal the 'variable' amount. The maximum top limit is set equal to the previous minimum top 
	limit. 
	(b) If the 'variable' amount is greater than the minimum top limit, the maximum top limit is 
	set to equal the 'variable' amount. The minimum top limit is left unchanged.
	(c) If the 'variable' amount is less than the minimum bottom limit, the minimum bottom limit 
	is set to equal the 'variable' amount. The maximum bottom limit is set equal to $0.

	If a subject picks the 'standard' amount ($10) on a given trial, the respective top and bottom
	limits are increased according to the following three rules:
	(a) If the 'variable' amount is greater than the minimum bottom limit, the minimum bottom 
	limit is set to equal the 'variable' amount. The maximum bottom limit is set equal to the 
	previous minimum bottom limit.
	(b) If the 'variable' amount is less than the minimum bottom limit, the maximum bottom limit 
	is set to equal the 'variable' amount. The minimum bottom limit is left unchanged.
	(c) If the 'variable' amount is greater than the minimum top limit, the minimum top limit is 
	set to equal to the current 'variable' amount. The maximum top limit is set to equal the 
	'standard' amount ($10). 

	As soon as the difference between the respective maximum bottom limit and maximum top 
	limit reaches $0.50, the corresponding variable amount is recorded as estimate of the 
	respective indifference point. 
	After an indifference point has been successfully determined for a particular temporal or
	probabilistic delay, no more trials of that type will be run.


INSTRUCTIONS
see section EDITABLE INSTRUCTIONS

EDITABLE CODE:
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.

The parameters you can change are:

	pretrialdelay:							Adjustable pretrialpause in milliseconds. Change as needed.
	posttrialdelay:							Adjustable posttrialpause in milliseconds. Change as needed.
	distractorstart:						Number of trials to run *before* distractor trials should be 
											added to the mix. Default is 70, i.e. after 70 experimental
											trials ('t1' to 'p5') have been run, every second trial will be a
											distractor trial ('d0').
	std:									'Standard' amount of money to use throughout the task.
											Default is 10.
	t1 to t5:								Values for the five temporal delays. The procedure estimates
											indifference points for five different temporal delays. Defaults
											are 0, 2, 30, 180 and 365 days.
	p1 to p5:								Values for the five probabilistic 'delays'. The procedure 
											estimates indifference points for five different probabilities.
											Defaults are 100, 90, 75, 50 and 25 percent.

Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment