# ciROC.rocit: Confidence Interval of ROC curve In ROCit: Performance Assessment of Binary Classifier with Visualization

## Description

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

## Usage

 1 2 ## S3 method for class 'rocit' ciROC(object, level = 0.95, nboot = 500, ... = NULL) 

## Arguments

 object An object of class "rocit", returned by rocit. Supports "empirical" and "binormal" ROC curve. level Level of confidence, must be within the range (0 1). Default is 0.95. nboot Number of bootstrap samples, used to estimate var(A), var(B), cov(A,B). Only used for method = "binomial". See 'Details'. ... NULL. Used for S3 generic/method consistency.

## Details

For large values of n_Y and n_{\bar{Y}}, the distribution of TPR(c) at FPR(c) can be approximated as a normal distribution with following mean and variance:

μ_{TPR(c)}=∑_{i=1}^{n_Y}I(D_{Y_i}≥q c)/n_Y

V ( TPR(c) )= \frac{ TPR(c) ( 1- TPR(c)) }{n_Y} + ( \frac{g(c^*)}{f(c^*) } )^2 * K

where K=\frac{ FPR(c) (1-FPR(c))}{n_{\bar{Y}} } , g and f are the probability distribution functions of the diagnostic variable in positive and negative groups (with corresponding cumulative distribution functions G and F), c^*=S^{-1}_{D_{\bar{ Y}}}( FPR(c) ), and S is the survival function given by: S(t)=P(T>t)=1-F(t). density and approxfun were used to approximate PDF and CDF of the diagnostic score in the two groups and the inverse survival of the diagnostic in the negative responses.

For "binomial" type, variance of A+BZ_x is given by V(A)+Z_x^2V(B)+2Z_xCov(A, B). Bootstrap method was used to estimate V(A), V(B) and Cov{A,B}. The lower and upper limit of A+BZ_x are inverse probit transformed to obtain the confidence interval of the ROC curve.

## Value

A list of class "rocci", having following elements:

 'ROC estimation method“ The method applied to estimate ROC curve in the rocit object. 'Confidence level' Level of confidence as supplied as argument. FPR An array containing all the FPR values, for which TPR and confidence interval of TPR were estimated. TPR Array containing the TPR values associated with the FPR values. LowerTPR Lower limits of the TPR values. Forced to zero for type = "empirical", where empirical TPR is zero. UpperTPR Upper limits of the TPR values. Forced to one for type = "empirical", where empirical TPR is one.

## References

Pepe, Margaret Sullivan. The statistical evaluation of medical tests for classification and prediction. Medicine, 2003.

plot.rocci, rocit, ciAUC.rocit
 1 2 3 4 5 6 7 data("Loan") score <- Loan$Score class <- ifelse(Loan$Status == "CO", 1, 0) rocit_emp <- rocit(score = score, class = class, method = "emp") # ------------------------------------------------ ciROC_emp90 <- ciROC(rocit_emp, level = 0.9) plot(ciROC_emp90, egend = TRUE)