Linear and Non-Linear AUC for Discounting Data

Area under the curve (AUC; Myerson et al., 2001) is a popular measure used in discounting research. Although the calculation of AUC is standardized, there are differences in AUC based on some assumptions. For example, Myerson et al. (2001) assumed that (with delay discounting data) a researcher would impute an indifference point at zero delay equal to the value of the larger, later outcome. However, this practice is not clearly followed. This imputed zero-delay indifference point plays an important role in log and ordinal versions of AUC. Ordinal and log versions of AUC are described by Borges et al. (2016). The package can calculate all three versions of AUC [and includes a new version: IHS(AUC)], impute indifference points when x = 0, calculate ordinal AUC in the case of Halton sampling of x-values, and account for probability discounting AUC.


discAUC

The goal of discAUC is to provide a solution to easily calculate AUC for delay discounting data. It includes logAUC and ordAUC as published in Borges et al.  (2016). It also includes a solution for 0 delays for logAUC.

Installation

You can install the released version of discAUC from CRAN with:

install.packages("discAUC")

This is a basic example which shows you how to solve a common problem:

library(discAUC)

#Calculate AUC for proportional indiference points for each outcome per subject.
AUC(dat = examp_DD,
    x_axis = "delay_months",
    indiff = "prop_indiff",
    amount = 1,
    groupings = c("subject","outcome"))
#> # A tibble: 60 × 3
#> # Groups:   subject [15]
#>    subject outcome            AUC
#>      <dbl> <chr>            <dbl>
#>  1   -988. $100 Gain     0.359   
#>  2   -988. alcohol       0.0953  
#>  3   -988. entertainment 0.405   
#>  4   -988. food          0.158   
#>  5     -2  $100 Gain     0.000278
#>  6     -2  alcohol       0.000278
#>  7     -2  entertainment 0.000278
#>  8     -2  food          0.000278
#>  9     -1  $100 Gain     1       
#> 10     -1  alcohol       1       
#> # ℹ 50 more rows

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("discAUC")

1.1.0 by Jonathan E. Friedel, 8 months ago


https://github.com/jefriedel/discAUC


Report a bug at https://github.com/jefriedel/discAUC/issues


Browse source code at https://github.com/cran/discAUC


Authors: Jonathan E. Friedel [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports dplyr, tibble, rlang, glue

Suggests knitr, rmarkdown, testthat


See at CRAN