Behavioral Economic Easy Discounting
Overview
Facilitates some of the analyses performed in studies of behavioral economic discounting. The package supports scoring of the 27-Item Monetary Choice Questionnaire (see Kaplan et al., 2016; doi:10.1007/s40614-016-0070-9), calculating k values (Mazur's simple hyperbolic and exponential) using nonlinear regression, calculating various Area Under the Curve (AUC) measures, plotting regression curves for both fit-to-group and two-stage approaches, checking for unsystematic discounting (Johnson & Bickel, 2008; doi:10.1037/1064-1297.16.3.264) and scoring of the minute discounting task (see Koffarnus & Bickel, 2014; doi:10.1037/a0035973) using the Qualtrics 5-trial discounting template (see the Qualtrics Minute Discounting User Guide; doi:10.13140/RG.2.2.26495.79527), which is also available as a .qsf file in this package.
New Features
- **
fit_dd()**: - Introduced a new function to fit delay-discounting models using specified equations (
"mazur"/"hyperbolic"or"exponential") and methods ("pooled","mean", or"two stage"). - Supports flexible data handling for aggregated and participant-specific modeling.
- Returns an object of class
"fit_dd"containing the fitted models, input data, and method details. - **
plot_dd()**: - Added a function to visualize fitted delay-discounting models.
- Automatically adapts to different fitting methods, including aggregated and individual models.
- Provides customizable axis labels, title, and optional log-transformed x-axis for improved visualization of delay scales.
- **
results_dd()**: - New utility to extract model parameter estimates, confidence intervals, and fit statistics from a
"fit_dd"object. - Supports both aggregated and participant-specific models.
Show all changes in 0.3.2Hide the rest of the changes in 0.3.2
- Outputs a tidy tibble with columns for terms, estimates, standard errors, t-statistics, p-values, R2, three different AUC metrics, and confidence bounds.
- **
check_unsystematic()**: - New utility function to check delay-discounting datasets for unsystematic data patterns according to Johnson & Bickel's (2008) two criteria.
- **
calc_aucs()**: - New utility function to calculate three different area under the curve (AUC) metrics for delay-discounting data according to Borges et al. (2016).
Improvements
- Confidence intervals are now computed using the
calc_conf_int()function, ensuring accurate estimation based on model degrees of freedom. - R2 values are calculated consistently using the
calc_r2()function, providing reliable fit metrics for all models.
Enhancements
- The package now supports robust delay-discounting workflows, from unsystematic identification (
check_unsystematic), model fitting (fit_dd), to visualization (plot_dd), to result extraction (results_dd). - Improved compatibility with delay-discounting datasets that require participant-level or aggregated modeling approaches.
From NEWS.md in the release
Install
Health
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-arm64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64
Missing dependency on R >= 4.2.0 because package code uses the pipe
placeholder syntax added in R 4.2.0.
File(s) using such syntax:
‘fitting.R’r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64
Missing dependency on R >= 4.2.0 because package code uses the pipe
placeholder syntax added in R 4.2.0.
File(s) using such syntax:
'fitting.R'r-oldrel-macos-x86_64
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
‘fitting.R’ ‘fivetrial.R’ ‘mcq.R’ ‘utils.R’- NOTE13 NOTE2026-09-08
- ERROR12 NOTE, 1 ERROR2026-09-07
- NOTE13 NOTE2026-06-09
- ERROR12 NOTE, 1 ERROR2026-06-08
- NOTE3 OK, 11 NOTE2026-03-10
Documentation
- Help pages
- 34 (2 internal)includes a package overview page
- Examples that run
- 100%25 run in a plain check
- Exported functions with examples
- 88%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 44
Stars over time
Releases over time
Issues over time
PRs over time
Commits over time
14 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/brentkaplan/beezdiscounting on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-23 · The repository has a site deploy workflow
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-23Named in .Rbuildignore: .claudeNamed in .gitignore: .claude, CLAUDE.local.md, CLAUDE.mdCommits: some crediting it in the message, count not recorded
- Codexfirst seen on or before 2026-06-06Commits: some crediting it in the message, count not recorded
- Claude Opus 4.898 commits · Jun 2026
- Claude Sonnet 4.62 commits · Mar 2026
Some of these counts are a minimum, because the search stopped before the oldest commits.
Dependencies
Installing beezdiscounting adds 63 packages (30 with compiled code, 63 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, beezdemand 5.6 MB.
Code & Tests
Datasets
People & History
Maintainer since 0.1.0 (2023)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.3.2Latest2025-01-09 · current release · diff ↗ ·
added 10 exports
calc_aucs, calc_conf_int, calc_r2, check_unsystematic, fit_dd, get_lookup_table, plot_dd, prop_ss, results_dd, summarize_mcq - RR 4.4.0 released · 2024-04-24
- 0.3.12023-11-16 · diff ↗
- 0.3.0
- 0.2.02023-11-02 · diff ↗ ·
removed 1 export
gmeanadded 5 exports
generate_data_mcq, long_to_wide_mcq, long_to_wide_mcq_excel, wide_to_long_mcq, wide_to_long_mcq_excel - 0.1.02023-10-26
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2023-10-26
- Total releases
- 5 / 3 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 7.7 KB / 4 files
- Download size
- 191 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("beezdiscounting")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.