Skip to contents

Compute either the model-based or model-free area under the curve.

Usage

AUC(
  obj,
  min_del = 0,
  max_del = NULL,
  val_del = NULL,
  del_transform = c("none", "log", "ordinal-scaling"),
  ...
)

Arguments

obj

A temporal discounting model or a dataframe with columns indiff (indifference point) and del (delay).

min_del

Lower limit to use for integration. Defaults to 0.

max_del

Upper limit to use for integration. Defaults to the maximum delay in the data.

val_del

Delayed value to use for computing the indifference curve, if applicable. Defaults to the average del_val in the data.

del_transform

String specifying transformation to apply to the delays (e.g., log10 + 1 transform or ordinal scaling transform; Borges et al., 2016, doi:10.1002/jeab.219 ). Default is no transform.

...

Further arguments passed to `integrate()`.

Value

AUC value.

Note

Calculation of the area always begins from delay 0, where an indifference point of 1 is assumed.

Examples

if (FALSE) { # \dontrun{
data("td_bc_single_ptpt")
mod <- td_bcnm(td_bc_single_ptpt)
print(AUC(mod))
data("td_ip_simulated_ptpt")
} # }