Package: tempodisco 2.2.0

tempodisco: Temporal Discounting Models

Tools for working with temporal discounting data, designed for behavioural researchers to simplify data cleaning/scoring and model fitting. The package implements widely used methods such as computing indifference points from adjusting amount task (Frye et al., 2016, <doi:10.3791/53584>), testing for non-systematic discounting per the criteria of Johnson & Bickel (2008, <doi:10.1037/1064-1297.16.3.264>), scoring questionnaires according to the methods of Kirby et al. (1999, <doi:10.1037//0096-3445.128.1.78>) and Wileyto et al (2004, <doi:10.3758/BF03195548>), Bayesian model selection using a range of discount functions (Franck et al., 2015, <doi:10.1002/jeab.128>), drift diffusion models of discounting (Peters & D'Esposito, 2020, <doi:10.1371/journal.pcbi.1007615>), and model-agnostic measures of discounting such as area under the curve (Myerson et al., 2001, <doi:10.1901/jeab.2001.76-235>) and ED50 (Yoon & Higgins, 2008, <doi:10.1016/j.drugalcdep.2007.12.011>).

Authors:Isaac Kinley [aut, cre]

tempodisco_2.2.0.tar.gz
tempodisco_2.2.0.zip(r-4.7-any)tempodisco_2.2.0.zip(r-4.6-any)tempodisco_2.2.0.zip(r-4.5-any)
tempodisco_2.2.0.tgz(r-4.6-any)tempodisco_2.2.0.tgz(r-4.5-any)
tempodisco_2.2.0.tar.gz(r-4.7-any)tempodisco_2.2.0.tar.gz(r-4.6-any)
tempodisco_2.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
tempodisco/json (API)

# Install 'tempodisco' in R:
install.packages('tempodisco', repos = c('https://kinleyid.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kinleyid/tempodisco/issues

Pkgdown/docs site:https://kinleyid.github.io

Datasets:

On CRAN:

Conda:

5.91 score 3 stars 15 scripts 176 downloads 19 exports 1 dependencies

Last updated from:8faa10e147. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK212
source / vignettesOK193
linux-release-x86_64OK198
macos-release-arm64OK190
macos-oldrel-arm64OK194
windows-develOK178
windows-releaseOK178
windows-oldrelOK157
wasm-releaseOK109

Exports:adj_amt_indiffsattention_checksAUCdiscount_functionED50get_available_discount_functionsindiffsinvariance_checkskirby_consistencykirby_scoremost_consistent_indiffsnonsysplot_choicestd_bclmtd_bcnmtd_ddmtd_fntd_ipmwileyto_score

Dependencies:RWiener

Available discount functions

Last update: 2026-03-04
Started: 2026-03-04

Modeling binary choice data
Classic methods | Kirby scoring | Wileyto scoring | Newer methods | Linear models | Nonlinear models | Choice rules | Error rates | Fixed endpoints

Last update: 2026-03-04
Started: 2024-09-02

Drift diffusion models
The drift diffusion model | Fitting drift diffusion models

Last update: 2025-04-30
Started: 2024-11-08

Visualizing models
"summary" plots | "endpoints" plots | "link" plots | "rt" plots

Last update: 2025-04-30
Started: 2024-09-02

Choice rules
Background | Built-in choice rules | Logistic | Probit (normal) | Power (log-logistic) | Comparing choice rules | Fixed-endpoint choice rules | Custom choice rules | Example 1: Cauchit choice rule | Example 2: log-normal choice rule

Last update: 2025-04-03
Started: 2025-03-01

Getting started
Loading data | Computing indifference points | Data quality checks | Measuring discounting | Fitting discount functions

Last update: 2024-11-20
Started: 2024-11-20

Analyzing data from multiple participants

Last update: 2024-11-20
Started: 2024-09-03

Comparing discounting across different discount functions

Last update: 2024-11-20
Started: 2024-09-02

Computing area under the curve (AUC)
Model-free AUC | Model-based AUC

Last update: 2024-11-20
Started: 2024-11-20

Indentifying non-systematic discounting

Last update: 2024-09-04
Started: 2024-09-02

Creating custom discount functions
Example 1: hyperbolic function with magnitude effect | Example 2: dual-systems hyperbolic

Last update: 2024-09-02
Started: 2024-09-02

Working with data from an adjusting amount procedure

Last update: 2024-09-02
Started: 2024-09-02

Readme and manuals

Help Manual

Help pageTopics
Indifference points from adjusting amount procedureadj_amt_indiffs
Simulated adjusting amount procedureadj_amt_sim
Test for failed attention checksattention_checks
Area under the curve (AUC)AUC
Extract model coefficientscoef.td_bclm
Extract model coefficientscoef.td_bcnm
Extract model coefficientscoef.td_ddm
Extract model coefficientscoef.td_ipm
Model deviancedeviance.td_bcnm
Model deviancedeviance.td_ddm
Get discount function from modeldiscount_function
Median effective delayED50
Get fitted valuesfitted.td_bcnm
Get fitted valuesfitted.td_ddm
Get fitted valuesfitted.td_ipm
Get all available pre-defined discount functionsget_available_discount_functions
Get model-free indifference pointsindiffs
Check for invariant respondinginvariance_checks
Compute consistency scorekirby_consistency
Kirby MCQ-style scoringkirby_score
Extract log-likelihoodlogLik.td_bcnm
Extract log-likelihoodlogLik.td_ddm
Extract log-likelihoodlogLik.td_ipm
Experimental method for computing indifference pointsmost_consistent_indiffs
Check for non-systematic discountingnonsys
Plot choicesplot_choices
Plot modelsplot.td_um
Model Predictionspredict.td_bclm
Model Predictionspredict.td_bcnm
Model Predictionspredict.td_ddm
Model Predictionspredict.td_ipm
Residuals from temporal discounting modelresiduals.td_bcnm
Residuals from temporal discounting modelresiduals.td_ipm
Binary choice data for a single participanttd_bc_single_ptpt
Binary choice data for a studytd_bc_study
Temporal discounting binary choice linear modeltd_bclm
Temporal discounting binary choice nonlinear modeltd_bcnm
Temporal discounting drift diffusion modeltd_ddm
Predefined or custom discount functiontd_fn
Simulated indifference point data for a single participanttd_ip_simulated_ptpt
Temporal discounting indifference point modeltd_ipm
Wileyto score a questionnairewileyto_score