AUC {discAUC} | R Documentation |
Area Under the Curve for Discounting Data
Description
Area Under the Curve for Discounting Data
Usage
AUC(
dat,
indiff,
x_axis,
prob_disc = FALSE,
max_x_axis = NULL,
amount,
groupings = NULL,
imp_zero = TRUE,
type = "linear",
log_base = 2
)
Arguments
dat |
Discounting data tibble |
indiff |
Indifference points Variable in |
x_axis |
Delays/probabilities/social distance variable in |
prob_disc |
Boolean for whether data are probability discounting |
max_x_axis |
Numeric; Maximum possible value in |
amount |
Numeric; Maximum amount of indifference points. (A in discounting models.) |
groupings |
Variables for grouping (e.g., subject, experimental group) as a character or vector of characters |
imp_zero |
Boolean for whether indifference points at |
type |
String for the type of AUC that should be calculated. Acceptable
values are one of |
log_base |
If using logarithmic, what is the base of the log |
Value
Tibble or with AUC by all grouping factors. If no grouping factor specified then a tibble with one AUC will be returned.
Examples
AUC(examp_DD,
indiff = "prop_indiff",
x_axis = "delay_months",
amount = 1,
type = "linear",
prob_disc = FALSE,
groupings = c("subject", "outcome")
)