Learn R Programming

sensR (version 1.2.2)

AUC: AUC computation

Description

This is the default AUC function for scalar d-primes, which will compute Area Under the ROC curve (ROC is an acronym for receiver operating characteristic).

Usage

## S3 method for class 'default':
AUC(d, scale = 1, se.d, CI.alpha = 0.05, ...)
## S3 method for class 'discrim':
AUC(d, CI.alpha = 0.05, ...)

Arguments

d
a unit lenght vector with the value of d-prime for which AUC is to be computed or a discrim object from the fitting of a A-not A test with AnotA
scale
a unit length vector giving the ratio of scale (ie. standard deviation) of the latent distribution for the no-class items relative to that of the yes-class items
se.d
standard error of d (d-prime). If provided, the function will compute confidence limits of value of AUC---cf. in section value.
CI.alpha
the type I level of the confidence interval of AUC
...
additional arguments passed integrate

Value

  • A list with components. If se.d is supplied to the default method or if a discrim object is supplied, the object contains the latter three additional elements.
  • valuethe estimated value of AUC
  • res.intthe result from the call to integrate
  • lowerthe lower confidence limit
  • upperthe upper confidence limit
  • CI.alphaechoes the provided CI.alpha

Details

The function calls integrate to obtain the area under the ROC curve implied by d and scale. Confidence limits are based on a normal approximation of d and not of AUC. The limits are computed, if an estimate of the standard error of d is provided. Note that the limits do not take the uncertainty in estimating the scale nor that of estimating the standard error of d into account. A print method is implemented for objects of class AUC.

Examples

Run this code
(odor <- matrix(c(112, 112, 72, 53, 22, 4, 7, 38, 50, 117, 101, 62), 2,
               byrow = TRUE))
(d.primes <- SDT(odor)[,3])
for(i in 1:5) print(AUC(d.primes[i]))
## Provide standard error of d-prime and compute CI:
fm1 <- AnotA(8, 25, 1, 25)
AUC(fm1$coef, , fm1$se)
AUC(fm1)

Run the code above in your browser using DataLab