shinybeez: A Shiny app for behavioral economic easy demand and discounting.

Brent A Kaplan, Derek D Reed
Author Information
  1. Brent A Kaplan: codedbx.com. ORCID
  2. Derek D Reed: Institutes for Behavior Resources, Inc. ORCID

Abstract

This article introduces shinybeez, a free and open-source web application designed to streamline behavioral economic analyses of demand and discounting data. Although quantitative modeling of behavioral economic phenomena has increased in popularity and led to translational successes in clinical practice and policy, complex analyses have remained a barrier for many researchers and practitioners. The shinybeez application addresses this gap by providing an intuitive interface for conducting descriptive and inferential analyses without requiring programming expertise. The app integrates features previously scattered across multiple tools, allowing users to upload data, calculate empirical measures, identify systematic data sets, fit nonlinear models, and visualize results-all within a single platform. The shinybeez application supports various types of analysis for demand and discounting data, including indifference point data and the 27-Item Monetary Choice Questionnaire. Built on R Shiny and leveraging existing R packages, the app ensures reproducibility and consistency with underlying analytical methods while remaining flexible for future enhancements. The advantages of shinybeez include its accessibility through web browsers or local installation, ability to handle large data sets, and customizable data visualization options. By consolidating behavioral economic tools into a user-friendly interface, shinybeez is intended to broaden the reach of these analytical techniques and facilitate their application in addressing societal issues.

Keywords

References

  1. Acuff, S. F., Amlung, M., Dennhardt, A. A., MacKillop, J., & Murphy, J. G. (2020). Experimental manipulations of behavioral economic demand for addictive commodities: A meta���analysis. Addiction, 115(5), 817���831. https://doi.org/10.1111/add.14865
  2. Allaire, J. J., Teague, C., Scheidegger, C., Xie, Y., & Dervieux, C. (2024). Quarto (Version 1.4) [Computer software]. https://doi.org/10.5281/zenodo.5960048
  3. Allison, J. (1979). Demand economics and experimental psychology. Behavioral Science, 24(6), 403���415. https://doi.org/10.1002/bs.3830240606
  4. Bickel, W. K., Johnson, M. W., Koffarnus, M. N., MacKillop, J., & Murphy, J. G. (2014). The behavioral economics of substance use disorders: Reinforcement pathologies and their repair. Annual Review of Clinical Psychology, 10, 641���677. https://doi.org/10.1146/annurev-clinpsy-032813-153724
  5. Bickel, W. K., Pope, D. A., Kaplan, B. A., DeHart, W. B., Koffarnus, M. N., & Stein, J. S. (2018). Electronic cigarette substitution in the experimental tobacco marketplace: A review. Preventive Medicine, 117, 98���106. https://doi.org/10.1016/j.ypmed.2018.04.026
  6. Borges, A. M., Kuang, J., Milhorn, H., & Yi, R. (2016). An alternative approach to calculating area���under���the���curve (AUC) in delay discounting research. Journal of the Experimental Analysis of Behavior, 106(2), 145���155. https://doi.org/10.1002/jeab.219
  7. Chang, W., Cheng, J., Allaire, J., Sievert, C., Schloerke, B., Xie, Y., Allen, J., McPherson, J., Dipert, A., & Borges, B. (2024). Shiny: Web application framework for R. (version 1.9.1.9000) [Manual]. https://github.com/rstudio/shiny
  8. Critchfield, T. S., & Reed, D. D. (2009). What are we doing when we translate from quantitative models? The Behavior Analyst, 32(2), 339���362. https://doi.org/10.1007/BF03392197
  9. DeLeon, I. G., Fernandez, N., Goldman, K. J., Schieber, E., Greer, B. D., & Reed, D. D. (2021). Behavioral economics: Principles and applications. In Wayne W. Fisher, Cathleen C. Piazza, & Henry S. Roane (Eds.), Handbook of applied behavior analysis (pp. 115���132).
  10. Delmendo, X., Borrero, J. C., Beauchamp, K. L., & Francisco, M. T. (2009). Consumption and response output as a function of unit price: Manipulation of cost and benefit components. Journal of Applied Behavior Analysis, 42(3), 609���625. https://doi.org/10.1901/jaba.2009.42-609
  11. Foster, R. N. S., & Reed, D. D. (2020). Observed demand calculator. https://doi.org/10.17605/OSF.IO/GPVW6
  12. Franck, C. T., Koffarnus, M. N., House, L. L., & Bickel, W. K. (2015). Accurate characterization of delay discounting: A multiple model approach using approximate Bayesian model selection and a unified discounting measure. Journal of the Experimental Analysis of Behavior, 103(1), 218���233. https://doi.org/10.1002/jeab.128
  13. Frederick, S., Loewenstein, G., & O'Donoghue, T. (2002). Time discounting and time preference: A critical review. Journal of Economic Literature, 40(2), 351���401. https://doi.org/10.1257/jel.40.2.351
  14. Gelino, B. W., & Reed, D. D. (2020). Temporal discounting of tornado shelter���seeking intentions amidst standard and impact���based weather alerts: A crowdsourced experiment. Journal of Experimental Psychology: Applied, 26(1), 16���25. https://doi.org/10.1037/xap0000246
  15. Gilroy, S. P., Franck, C. T., & Hantula, D. A. (2017). The discounting model selector: Statistical software for delay discounting applications. Journal of the Experimental Analysis of Behavior, 107(3), 388���401. https://doi.org/10.1002/jeab.257
  16. Gilroy, S. P., & Kaplan, B. A. (2019). Furthering open science in behavior analysis: An introduction and tutorial for using github in research. Perspectives on Behavior Science, 42(3), 565���581. https://doi.org/10.1007/s40614-019-00202-5
  17. Gilroy, S. P., Kaplan, B. A., Bullock, C. E., & Waits, J. A. (2020). Current use and development of FOSS in behavior analysis: Modern behavioral engineering. In Carlos Rafael Fernandes Pican��o, Luiz Alexandre Barbosa de Freitas, & Hernando Borges Neves Filho (Eds.), Introduction to software development for behavior analysts (pp. 1���20).
  18. Gilroy, S. P., Kaplan, B. A., & Reed, D. D. (2020). Interpretation(s) of elasticity in operant demand. Journal of the Experimental Analysis of Behavior, 114(1), 106���115. https://doi.org/10.1002/jeab.610
  19. Gilroy, S. P., Kaplan, B. A., Reed, D. D., Hantula, D. A., & Hursh, S. R. (2019). An exact solution for unit elasticity in the exponential model of operant demand. Experimental and Clinical Psychopharmacology, 27(6), 588���597. https://doi.org/10.1037/pha0000268
  20. Gilroy, S. P., Kaplan, B. A., Reed, D. D., Koffarnus, M. N., & Hantula, D. A. (2018). The demand curve analyzer: Behavioral economic software for applied research. Journal of the Experimental Analysis of Behavior, 110(3), 553���568. https://doi.org/10.1002/jeab.479
  21. Gilroy, S. P., Kaplan, B. A., Schwartz, L. P., Reed, D. D., & Hursh, S. R. (2021). A zero���bounded model of operant demand. Journal of the Experimental Analysis of Behavior, 115(3), 729���746. https://doi.org/10.1002/jeab.679
  22. Hursh, S. R. (1984). Behavioral economics. Journal of the Experimental Analysis of Behavior, 42(3), 435���452. https://doi.org/10.1901/jeab.1984.42-435
  23. Hursh, S. R., Madden, G. J., Spiga, R., DeLeon, I. G., & Francisco, M. T. (2013). The translational utility of behavioral economics: The experimental analysis of consumption and choice. In G. J. Madden, W. V. Dube, T. D. Hackenberg, G. P. Hanley, & K. Lattal, (Eds.), APA handbook of behavior analysis, Vol. 2: Translating principles into practice (pp. 191���224). American Psychological Association. https://doi.org/10.1037/13938-008
  24. Hursh, S. R., & Schwartz, L. P. (2023). A general model of demand and discounting. Psychology of Addictive Behaviors, 37(1), 37���56. https://doi.org/10.1037/adb0000848
  25. Hursh, S. R., & Silberberg, A. (2008). Economic demand and essential value. Psychological Review, 115(1), 186���198. https://doi.org/10.1037/0033-295X.115.1.186
  26. Johnson, M. W., & Bickel, W. K. (2008). An algorithm for identifying nonsystematic delay���discounting data. Experimental and Clinical Psychopharmacology, 16(3), 264���274. https://doi.org/10.1037/1064-1297.16.3.264
  27. Kagel, J. H., & Winkler, R. C. (1972). Behavioral economics: Areas of cooperative research between economics and applied behavioral analysis. Journal of Applied Behavior Analysis, 5(3), 335���342. https://doi.org/10.1901/jaba.1972.5-335
  28. Kaplan, B. A. (2023). Beezdemand: Behavioral economic easy demand. R package (version 0.1.2) [Computer software]. https://CRAN.R-project.org/package=beezdemand
  29. Kaplan, B. A. (2025). Beezdiscounting: Behavioral economic easy discounting. R package (version 0.3.2) [Manual]. https://CRAN.R-project.org/package=beezdiscounting
  30. Kaplan, B. A., Amlung, M., Reed, D. D., Jarmolowicz, D. P., McKerchar, T. L., & Lemley, S. M. (2016). Automating scoring of delay discounting for the 21��� and 27���item Monetary Choice Questionnaires. The Behavior Analyst, 39(2), 293���304. https://doi.org/10.1007/s40614-016-0070-9
  31. Kaplan, B. A., Franck, C. T., McKee, K., Gilroy, S. P., & Koffarnus, M. N. (2021). Applying mixed���effects modeling to behavioral economic demand: An introduction. Perspectives on Behavior Science, 44(2), 333���358. https://doi.org/10.1007/s40614-021-00299-7
  32. Kaplan, B. A., Gilroy, S. P., Reed, D. D., Koffarnus, M. N., & Hursh, S. R. (2019). The R package beezdemand: Behavioral economic easy demand. Perspectives on Behavior Science, 42(1), 163���180. https://doi.org/10.1007/s40614-018-00187-7
  33. Kaplan, B. A., Lemley, S. M., Reed, D. D., & Jarmolowicz, D. P. (2014). 21���and 27���item monetary choice questionnaire automated scorers. University of Kansas. https://hdl.handle.net/1808/15424
  34. Kaplan, B. A., & Reed, D. D. (2014). Essential value, pmax, and omax automated calculator. [Computer software]. University of Kansas. https://hdl.handle.net/1808/14934
  35. Kirby, K. N., Petry, N. M., & Bickel, W. K. (1999). Heroin addicts have higher discount rates for delayed rewards than non���drug���using controls. Journal of Experimental Psychology: General, 128(1), 78���87. https://doi.org/10.1037/0096-3445.128.1.78
  36. Koffarnus, M. N., & Bickel, W. K. (2014). A 5���trial adjusting delay discounting task: Accurate discount rates in less than 60 seconds. Experimental and Clinical Psychopharmacology, 22(3), 222���228. https://doi.org/10.1037/a0035973
  37. Koffarnus, M. N., Franck, C. T., Stein, J. S., & Bickel, W. K. (2015). A modified exponential behavioral economic demand model to better describe consumption data. Experimental and Clinical Psychopharmacology, 23(6), 504���512. https://doi.org/10.1037/pha0000045
  38. Koffarnus, M. N., & Kaplan, B. A. (2018). Clinical models of decision making in addiction. Pharmacology Biochemistry and Behavior, 164, 71���83. https://doi.org/10.1016/j.pbb.2017.08.010
  39. Koffarnus, M. N., Kaplan, B. A., Franck, C. T., Rzeszutek, M. J., & Traxler, H. K. (2022). Behavioral economic demand modeling chronology, complexities, and considerations: Much ado about zeros. Behavioural Processes, 199, Article 104646. https://doi.org/10.1016/j.beproc.2022.104646
  40. Koffarnus, M. N., Kaplan, B. A., & Stein, J. S. (2017). User guide for qualtrics minute discounting template. https://doi.org/10.13140/RG.2.2.26495.79527
  41. Koffarnus, M. N., Rzeszutek, M. J., & Kaplan, B. A. (2021). Additional discounting rates in less than one minute: Task variants for probability and a wider range of delays. https://doi.org/10.13140/RG.2.2.31281.92000
  42. MacKillop, J., Few, L. R., Murphy, J. G., Wier, L. M., Acker, J., Murphy, C., Stojek, M., Carrigan, M., & Chaloupka, F. (2012). High���resolution behavioral economic analysis of cigarette demand to inform tax policy. Addiction, 107(12), 2191���2200. https://doi.org/10.1111/j.1360-0443.2012.03991.x
  43. Madden, G. J. (2013). Go forth and be variable. The Behavior Analyst, 36(1), 137���143. https://doi.org/10.1007/BF03392296
  44. Madden, G. J., & Johnson, P. S. (2010). A delay���discounting primer. In G. J. Madden & P. S. Johnson (Eds.), Impulsivity: The behavioral and neurological science of discounting (pp. 11���37). American Psychological Association. https://doi.org/10.1037/12069-001
  45. Mazur, J. E. (1987). An adjusting procedure for studying delayed reinforcement. In The effect of delay and of intervening events on reinforcement value. (pp. 55���73). Lawrence Erlbaum Associates.
  46. McKerchar, T. L., Green, L., & Myerson, J. (2010). On the scaling interpretation of exponents in hyperboloid models of delay and probability discounting. Behavioural Processes, 84(1), 440���444. https://doi.org/10.1016/j.beproc.2010.01.003
  47. McKerchar, T. L., Green, L., Myerson, J., Pickford, T. S., Hill, J. C., & Stout, S. C. (2009). A comparison of four models of delay discounting in humans. Behavioural Processes, 81(2), 256���259. https://doi.org/10.1016/j.beproc.2008.12.017
  48. McKerchar, T. L., & Renda, C. R. (2012). Delay and probability discounting in humans: An overview. The Psychological Record, 62(4), 817���834. https://doi.org/10.1007/BF03395837
  49. Meyer, F., & Perrier, V. (2024). Esquisse: Explore and visualize your data interactively R package (version 2.0.0.9010) [Manual]. https://github.com/dreamRs/esquisse
  50. Mitchell, S. H., Wilson, V. B., & Karalunas, S. L. (2015). Comparing hyperbolic, delay���amount sensitivity and present���bias models of delay discounting. Behavioural Processes, 114, 52���62. https://doi.org/10.1016/j.beproc.2015.03.006
  51. Myerson, J., & Green, L. (1995). Discounting of delayed rewards: Models of individual choice. Journal of the Experimental Analysis of Behavior, 64(3), 263���276. https://doi.org/10.1901/jeab.1995.64-263
  52. Myerson, J., Green, L., & Warusawitharana, M. (2001). Area under the curve as a measure of discounting. Journal of the Experimental Analysis of Behavior, 76(2), 235���243. https://doi.org/10.1901/jeab.2001.76-235
  53. Newman, M., & Ferrario, C. R. (2020). An improved demand curve for analysis of food or drug consumption in behavioral experiments. Psychopharmacology, 237(4), 943���955. https://doi.org/10.1007/s00213-020-05491-2
  54. Odum, A. L. (2011). Delay discounting: I'm a k, you're a k. Journal of the Experimental Analysis of Behavior, 96(3), 427���439. https://doi.org/10.1901/jeab.2011.96-423
  55. Odum, A. L., Becker, R. J., Haynes, J. M., Galizio, A., Frye, C. C. J., Downey, H., Friedel, J. E., & Perez, D. M. (2020). Delay discounting of different outcomes: Review and theory. Journal of the Experimental Analysis of Behavior, 113(3), 657���679. https://doi.org/10.1002/jeab.589
  56. Reed, D. D., Kaplan, B. A., Becirevic, A., Roma, P. G., & Hursh, S. R. (2016). Toward quantifying the abuse liability of ultraviolet tanning: A behavioral economic approach to tanning addiction. Journal of the Experimental Analysis of Behavior, 106(1), 93���106. https://doi.org/10.1002/jeab.216
  57. Reed, D. D., Kaplan, B. A., & Brewer, A. T. (2012). A tutorial on the use of Excel 2010 and Excel for Mac 2011 for conducting delay���discounting analyses. Journal of Applied Behavior Analysis, 45(2), 375���386. https://doi.org/10.1901/jaba.2012.45-375
  58. Reed, D. D., Kaplan, B. A., & Gilroy, S. P. (Eds.). (2025). Handbook of operant behavioral economics: Demand, discounting, methods, and applications. Academic Press. https://shop.elsevier.com/books/handbook���of���operant���behavioral���economics/reed/978���0���323���95745���8
  59. Reed, D. D., & Martens, B. K. (2011). Temporal discounting predicts student responsiveness to exchange delays in a classroom token system. Journal of Applied Behavior Analysis, 44(1), 1���18. https://doi.org/10.1901/jaba.2011.44-1
  60. Reed, D. D., Niileksela, C. R., & Kaplan, B. A. (2013). Behavioral economics: A tutorial for behavior analysts in practice. Behavior Analysis in Practice, 6(1), 34���54. https://doi.org/10.1007/BF03391790
  61. Reed, D. D., Strickland, J. C., Gelino, B. W., Hursh, S. R., Jarmolowicz, D. P., Kaplan, B. A., & Amlung, M. (2022). Applied behavioral economics and public health policies: Historical precedence and translational promise. Behavioural Processes, 198, Article 104640. https://doi.org/10.1016/j.beproc.2022.104640
  62. Roma, P. G., Reed, D. D., DiGennaro Reed, F. D., & Hursh, S. R. (2017). Progress of and prospects for hypothetical purchase task questionnaires in consumer behavior analysis and public policy. The Behavior Analyst, 40(2), 329���342. https://doi.org/10.1007/s40614-017-0100-2
  63. Rung, J. M., & Madden, G. J. (2018). Experimental reductions of delay discounting and impulsive choice: A systematic review and meta���analysis. Journal of Experimental Psychology: General, 147(9), 1349���1381. https://doi.org/10.1037/xge0000462
  64. Schneider, W. J. (n.d.). Apaquarto. [Computer software]. https://github.com/wjschne/apaquarto
  65. Sievert, C., Cheng, J., & Aden���Buie, G. (2024). Bslib: Custom ���bootstrap��� ���sass' themes for ���shiny��� and ���rmarkdown���. R package (version 0.8.0) [Manual]. https://github.com/rstudio/bslib
  66. Stagg, G. W., Lionel, H., Ooms, J., Fay, C., Parry, J., Balamuta, J., Hosny, H., Polkas, M., Schloerke, B., Lawson, C., Wells, T., Arregoitie, L., Statten, D., Bahadzie, B., Mulka, D., Yutani, H., Zhao, J., Chang, W. & Wang, D. (2023). webR: The statistical language R compiled to WebAssembly via emscripten. Posit, PBC. https://github.com/r-wasm/webr
  67. Stein, J. S., Koffarnus, M. N., Snider, S. E., Quisenberry, A. J., & Bickel, W. K. (2015). Identification and management of nonsystematic purchase task data: Toward best practice. Experimental and Clinical Psychopharmacology, 23(5), 377���386. https://doi.org/10.1037/pha0000020
  68. Strickland, J. C., Campbell, E. M., Lile, J. A., & Stoops, W. W. (2020). Utilizing the commodity purchase task to evaluate behavioral economic demand for illicit substances: A review and meta���analysis. Addiction, 115(3), 393���406. https://doi.org/10.1111/add.14792
  69. Strickland, J. C., & Lacy, R. T. (2020). Behavioral economic demand as a unifying language for addiction science: Promoting collaboration and integration of animal and human models. Experimental and Clinical Psychopharmacology, 28(4), 404���416. https://doi.org/10.1037/pha0000358
  70. Strickland, J. C., Lile, J. A., Rush, C. R., & Stoops, W. W. (2016). Comparing exponential and exponentiated models of drug demand in cocaine users. Experimental and Clinical Psychopharmacology, 24(6), 447���455. https://doi.org/10.1037/pha0000096
  71. Ushey, K., & Wickham, H. (2024). Renv: Project environments. R package (version 1.0.7) [Manual]. https://github.com/rstudio/renv
  72. Vuchinich, R. E., Tucker, J. A., Acuff, S. F., Reed, D. D., Buscemi, J., & Murphy, J. G. (2023). Matching, behavioral economics, and teleological behaviorism: Final cause analysis of substance use and health behavior. Journal of the Experimental Analysis of Behavior, 119(1), 240���258. https://doi.org/10.1002/jeab.815
  73. Xie, Y., Cheng, J., & Tan, X. (2024). DT: A wrapper of the JavaScript library ���DataTables���. R package (version 0.23) [Manual]. https://github.com/rstudio/DT
  74. Yeh, Y.���H., Tegge, A. N., Freitas���Lemos, R., Myerson, J., Green, L., & Bickel, W. K. (2023). Discounting of delayed rewards: Missing data imputation for the 21��� and 27���item monetary choice questionnaires. PLOS ONE, 18(10), Article e0292258. https://doi.org/10.1371/journal.pone.0292258
  75. Yoon, J. H., & Higgins, S. T. (2008). Turning k on its head: Comments on use of an ED50 in delay discounting research. Drug and Alcohol Dependence, 95(1), 169���172. https://doi.org/10.1016/j.drugalcdep.2007.12.011
  76. Young, M. E. (2017). Discounting: A practical guide to multilevel analysis of indifference data. Journal of the Experimental Analysis of Behavior, 108(1), 97���112. https://doi.org/10.1002/jeab.265
  77. Young, M. E. (2018). A place for statistics in behavior analysis. Behavior Analysis: Research and Practice, 18(2), 193���202. https://doi.org/10.1037/bar0000099
  78. Zyla, K., Nowicki, J., Siemi��ski, L., Rogala, M., Vibal, R., Makowski, T., & Basa, R. (2024). Rhino: A framework for enterprise shiny applications. R package (version 1.9.0) [Manual]. https://github.com/Appsilon/rhino

MeSH Term

Humans
Economics, Behavioral
Software
Delay Discounting
Choice Behavior

Word Cloud

Created with Highcharts 10.0.0datashinybeezbehavioralapplicationeconomicdemanddiscountinganalysesappRShinyfreewebinterfacetoolssetsanalyticalarticleintroducesopen-sourcedesignedstreamlineAlthoughquantitativemodelingphenomenaincreasedpopularityledtranslationalsuccessesclinicalpracticepolicycomplexremainedbarriermanyresearcherspractitionersaddressesgapprovidingintuitiveconductingdescriptiveinferentialwithoutrequiringprogrammingexpertiseintegratesfeaturespreviouslyscatteredacrossmultipleallowingusersuploadcalculateempiricalmeasuresidentifysystematicfitnonlinearmodelsvisualizeresults-allwithinsingleplatformsupportsvarioustypesanalysisincludingindifferencepoint27-ItemMonetaryChoiceQuestionnaireBuiltleveragingexistingpackagesensuresreproducibilityconsistencyunderlyingmethodsremainingflexiblefutureenhancementsadvantagesincludeaccessibilitybrowserslocalinstallationabilityhandlelargecustomizablevisualizationoptionsconsolidatinguser-friendlyintendedbroadenreachtechniquesfacilitateaddressingsocietalissuesshinybeez:easyeconomicsopen���sourcesoftware

Similar Articles

Cited By