rStats.js v1.3.0
    Preparing search index...

    Function ciAuc

    • Confidence interval of the area under a ROC curve, by DeLong's method or the bootstrap. Equivalent to pROC::ci.auc() in R.

      DeLong's interval is θ ∓ z√S (DeLong, DeLong and Clarke-Pearson 1988), clipped to [0, 1]; it needs at least two controls and two cases (pROC: NA). The bootstrap draws R's random stream as pROC does (setSeed gives R's values): bootN resamples of the controls then the cases (stratified, at least two of each) or of all observations, and the type-7 quantiles α/2 and 1 − α/2 of their AUCs. A non-stratified resample without cases or without controls is dropped with pROC's warning (pROC stops at one without controls).

      Parameters

      Returns CiAucResult

      const r = roc({ controls: [1, 2, 2, 3, 5, 7], cases: [2, 4, 5, 5, 8, 9, 10] });
      ciAuc(r).confInt; // [0.5272205221855736, 1]