AUC_zeros {discAUC} | R Documentation |
Impute zero delay/100% likely indifference points
Description
As defined by Myerson et al. (2001) the indifference point at 0 delay (100% likelihood) is set to 0. This function will add that indifference point, wherever it is missing. If the 0 delay (100% likelihood) is included in the data then it will not be overwritten.
Usage
AUC_zeros(dat, indiff, x_axis, amount, groupings = NULL, prob_disc = FALSE)
Arguments
dat |
Discounting data tibble |
indiff |
Indifference points Variable |
x_axis |
Delays/probabilities/social distance variable |
amount |
Amount of the larger delayed/probablistic/etc. outcome (A in discounting formulas) |
groupings |
Variables for grouping (e.g., subject, expeirmental group) as a character or vector of characters |
prob_disc |
Boolean for probability discounting, if set to true
function will calculate and report odds against |
Value
Tibble that is grouped by groupings
but in the same
order as supplied to the function. If prob_disc == FALSE
, then the
function will add indifference points of amount
at x_axis = 0
.
If prob_disc == TRUE
, then the
function will add indifference points of amount
at x_axis = 1
.
Additionally, a orig
column will be added to indicate whether the
indifference point was included in the data or was imputed.
Examples
AUC_zeros(
examp_DD,
indiff = "prop_indiff",
x_axis = "delay_months",
amount = 1,
groupings = c("subject", "outcome")
)
AUC_zeros(
examp_PD,
indiff = "prop_indiff",
x_axis = "prob",
amount = 1,
groupings = c("subject", "outcome"),
prob_disc = TRUE
)