delay-discounting-analysis

  • Bayesian analysis toolbox for delay discounting data

    Freely available Matlab code to conduct sophisticated analyses of your delay discounting data.

    Vincent, B., T. (in press) Hierarchical Bayesian estimation and hypothesis testing for delay discounting tasks, Behavior Research Methods. doi:10.3758/s13428-015-0672-2

    Get the paper Get the code Papers which cite this paper

  1. 1

Accessible to all

There is no need to be a Matlab expert in order to use the toolbox. Analyses can be run in only a few lines of code. And documentation on the GitHub wiki should help. You do of course need a Matlab licence however.

Save time

A fair amount of time and effort goes into conducting decent analyses. By using this toolbox you’ll save time, leaving more available for more research question specific hypothesis exploration.

Actively maintained

If you find bugs or have suggestions or feature requests, then I’m happy to help. The best way is to post to the GitHub issues page.

Bayesian analysis

Better inferences

The Bayesian approach allows rich inferences to be drawn about participant parameters. We can calculate our distribution of belief over different participant parameters (discount rates, error rates etc) given the data available.

Specify priors

The ability to specify priors is very useful. It provides a rational and explicit way of stating and incorporating your beliefs into the data analysis process. They can also act as a way of constraining inferences in low-data situations.

Multi-level modelling

The core probabilistic model is hierarchical (or multi-level) in nature. We model each and every trial, or multiple participants, whilst making inferences about group-level discounting parameters. This approach has many advantages, but most notably it allows us to avoid spurious accuracy at the group level by incorporating our uncertainty at the trial, participant, and group levels simultaneously.

Model goodness checks

Version 1.3 introduces posterior predictive checks to measure what proportion of behavioural responses can be accounted for by the model.

Get new insights into your data

Discount rates

New in version 1.2, comes the ability to estimate the discount rate, k, assuming the 1-parameter hyperbolic model. This is  especially handy when your primary research goal is to estimate discount rates, and not how they vary as a function of reward magnitude.

Magnitude effect

The toolbox does not just analyse discount rates, but how discount rates vary as a function of reward magnitude. This allows the magnitude effect to be characterised.

This animated wobble-plot shows reflects the certainty over predictions in data-space by drawing samples from the posterior distribution of parameters given the data.

Response errors are characterised

The probabilistic model underlying the analysis considers two forms of errors. The first is that participants might have a generic error rate, which is the proportion of trials they select immediate or delayed rewards randomly. The second is a ‘comparison acuity’ which models errors when the present subjective values of immediate and delayed outcomes are similar.

Latest news

Find out more by reading the paper. The toolbox is freely available on GitHub under the MIT licence. Full instructions and documentation are available at the GitHub wiki. Problems, suggestions, or feature requests are best dealt through the GitHub Issue page, but you can always email me if you have an aversion to GitHub.