Learn R Programming

ROCit (version 2.1.1)

ciAUC.rocit: Confidence Interval of AUC

Description

ciAUC constructs confidence interval of area under curve (AUC) of receiver operating characteristic (ROC) curve. This is an S3 method defined for object of class "rocit".

Usage

# S3 method for rocit
ciAUC(
  object,
  level = 0.95,
  delong = FALSE,
  logit = FALSE,
  nboot = NULL,
  step = FALSE,
  ... = NULL
)

Value

An object of class "rocitaucci".

Arguments

object

An object of class "rocit", returned by rocit.

level

Level of confidence, must be within the range (0 1). Default is 0.95.

delong

Logical; indicates whether DeLong formula should be used to estimate the variance of AUC. Default is FALSE.

logit

Logical; indicates whether confidence interval of logit transformed AUC should be evaluated first. Default is FALSE

nboot

Number of bootstrap samples, if bootstrap method is desired. Default is NULL. If a numeric value is specified, overrides logit and delong arguments.

step

Logical, default in FALSE. See rocit.

...

NULL. Used for S3 generic/method consistency.

See Also

rocit, ciROC.rocit

Examples

Run this code
data("Diabetes")
logistic.model <- glm(as.factor(dtest)~chol+age+bmi,
                      data = Diabetes,family = "binomial")
score <- logistic.model$fitted.values
class <- logistic.model$y
# Make the rocit objects
rocit_bin <- rocit(score = score, class = class, method = "bin")
# Confidence interval of AUC
ciAUC(rocit_bin, level = 0.9)
ciAUC(rocit_bin, delong = TRUE, logit = TRUE)

Run the code above in your browser using DataLab