Skip to content

shinybeez is a a free and open-source R Shiny application designed to streamline behavioral economic analyses of demand and discounting data.

License

Notifications You must be signed in to change notification settings

brentkaplan/shinybeez

Repository files navigation

shinybeez

Shinybeez: A Shiny app for Behavioral Economic (be) Easy (ez) Demand and Discounting.

Overview

shinybeez is an R Shiny app that allows analyses and visualizations of behavioral economic demand and discounting data. It relies on the beezdemand and beezdiscounting R packages. In addition to a comprehensive user guide, template files, and dark mode toggle, shinybeez includes the following features:

Demand

  • Exportable descriptive table of demand data (mean, median, sd, proportion of zeros, etc.)

  • Exportable empirical measures of demand data (Intensity, BP0, BP1, Omax, Pmax)

  • Exportable table of systematic response sets (customizable bounce, trend, reversals from zero criteria)

  • Exportable table of regression results (Q0, $\alpha$, R2, derived and exact Omax, Pmax)

  • Exportable plot in APA format of demand data and best-fit lines (customizable plot title, axis title text, pseudo-log axes) in png, pdf, svg, and more

  • Option to calculate descriptive and regression results by a grouping variable

  • Choose between the exponential model of demand or the exponentiated model of demand

  • Select various k values (1-4, individual k, fitted k, empirical range of data)

  • Choose between Fit to Group (pooled), Fit to Group (mean), and Two Stage

Discounting

  • Choose between scoring the 27-Item Monetary Choice Questionnaire (MCQ), the 5-trial minute task for delay discounting, and the 5-trial minute task for probability discounting

  • Score the 27-Item MCQ identically to that of the 27-Item MCQ Automated Scorer in Microsoft Excel

  • Choose various methods to impute missing data for the 27-Item MCQ

  • Choose between no transformation, log10, transformation, and natural log transformation

  • Exportable table of MCQ results (overall, small, medium, large, and geomean (i.e., composite) k values; overall, small, medium, large, and composite consistency; overall, small, medium, and large proportion of LDR/LL chosen; and the imputation method)

  • Exportable table of summary statistics (mean, sd, sem)

  • Exportable table of correlations between small, medium, and large magnitudes

  • Exportable table of imputed data when imputing missing data

  • Exportable plot in APA format of proportion of SIR/SS choices by k value rank

  • Exportable plot in APA format of box plot of k values

Example Files

If you would like to test the functionality of shinybeez, you can download some of the example files included in this Github repository:

Template Files

Several template files are included in this Github repository:

Citation

If you use any part of shinybeez in your work, please cite it:

Kaplan, B. A. & Reed. D. D. (under review). Shinybeez: A Shiny app for behavioral economic easy demand and discounting.

Access and Installation

Links to shinybeez online

The app is currently hosted at https://brentkaplan.shinyapps.io/shinybeez/. We plan to self-host the app in the near future and links will be updated.

Local installation

This Github repsitory contains the code required to run the app locally. To run the app locally,

  • Clone the repository

  • Open new R session in the downloaded folder

  • Install all required packages using renv::install()

  • Run shiny::runApp()

Issues

If you find issues, questions, or feedback, or would like to contribute, please submit an issue or a pull request, or email me.

Recommended Citations

In addition to using shinybeez, we recommend citing the following papers depending on what features of shinybeez you use:

Demand

Underyling R package driving demand functions:

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

Systematic criteria:

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

Exponentiated demand equation:

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

Exponential demand equation:

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


Discounting

Underyling R package driving discounting functions:

Kaplan, B. A. (2023). beezdiscounting: Behavioral Economic Easy Discounting. R package version 0.3.1, https://CRAN.R-project.org/package=beezdiscounting

Describing scoring of the 21- and 27-Item Monetary Choice Questionnaires:

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

Seminal article introducing the 27-Item Monetary Choice Questionnaire:

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

Imputing missing data in the 27-Item Monetary Choice Questionnaire:

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), e0292258. https://doi.org/10.1371/journal.pone.0292258

Minute discounting task:

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

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

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

About

shinybeez is a a free and open-source R Shiny application designed to streamline behavioral economic analyses of demand and discounting data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published