Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Smooth ROC curve estimation via Bernstein polynomials

  • Dongliang Wang ,

    Roles Conceptualization, Methodology, Writing – original draft, Writing – review & editing

    wangd@upstate.edu

    Affiliation Department of Public Health and Preventive Medicine, State University of New York Upstate Medical University, Syracuse, New York, United States of America

  • Xueya Cai

    Roles Conceptualization, Methodology, Writing – original draft, Writing – review & editing

    Affiliation Department of Biostatistics and Computational Biology, University of Rochester, Rochester, New York, United States of America

Abstract

The receiver operating characteristic (ROC) curve is commonly used to evaluate the accuracy of a diagnostic test for classifying observations into two groups. We propose two novel tuning parameters for estimating the ROC curve via Bernstein polynomial smoothing of the empirical ROC curve. The new estimator is very easy to implement with the naturally selected tuning parameter, as illustrated by analyzing both real and simulated data sets. Empirical performance is investigated through extensive simulation studies with a variety of scenarios where the two groups are both from a single family of distributions (symmetric or right skewed) or one from a symmetric and the other from a right skewed distribution. The new estimator is uniformly more efficient than the empirical ROC estimator, and very competitive to eleven other existing smooth ROC estimators in terms of mean integrated square errors.

Introduction

The Receiver Operating Characteristic (ROC) curve has been widely used in medical research to evaluate the classification accuracy of a diagnostic test or biomarker with a continuous scale in disease screening and diagnosis. The ROC curve is essentially a plot of sensitivity versus 1-specificity, both of which are associated with the binary test rule derived at each possible threshold point. Let X1 and X0 denote diagnostic biomarker values from the diseased (case) and non-diseased (control) populations with distribution functions X1F1 and X0F0, respectively. The ROC curve is formally defined as for 0 ≤ u ≤ 1, or equivalently, as the graph (1 − F0(x), 1 − F1(x)) for all possible cutoff points x, where 1 − F1(x) and F0(x) are the sensitivity and specificity given a cutoff point x, respectively. More details about ROC analysis can be found in the books by Pepe [1] and Zhou et al. [2].

An extensive array of estimators for ROC curve has been developed from perspectives of parametric, nonparametric, semiparametric and Bayesian statistics. The most widely used parametric ROC estimator is the binormal model in combination with Box-Cox transformation, as described by Hanley [3], but many parametric alternatives, such as the bi-gamma model, are available as well. As an instance of semiparametric estimators, Cai & Moskowitz [4] derived maximum likelihood methods directly for a binormal ROC curve with respects to the intercept and slope parameters, instead of the distributions of test results. Empirical ROC (eROC) curve is a widely used nonparametric estimator based upon empirical distribution functions . The properties of the eROC have been thoroughly studied by Hsieh and Turnbull [5]. To overcome the lack of smoothness of the eROC estimator, a variety of smoothed estimators have been developed, which can be roughly distinguished into two classes. One class of the smoothed ROC estimators is based upon the classic kernel density estimators with regards to F0 and F1, and includes those proposed by Sheather and Jones [6], Altman and Leger [7], Lloyd [8], and Hall and Hyndman [9]. A comprehensive simulation study conducted by Zhou and Harezlak [10] suggests that the ROC estimator developed by Altman & Leger [7] generally performs better within this class. More recently, Qiu & Le [11] proposed a plug-in estimator replacing with the quantile function estimator by Harrell and Davis [12]. Rufibach [13] derived a new estimator based upon the log-concave density estimates. The other class of smoothed estimators are obtained by directly smoothing the eROC, such as with local polynomial [14], or with splines [15, 16]. A more recent estimator proposed by Pulit [17] is defined as the kernel density estimator of the derived data , where X1:j is the jth order statistic of the X1 values. It is worthy noting that the ROC curve estimators mentioned in this paper are only a subset of the available estimators and the readers are referred to Gonçalves et al. [18] for a comprehensive review, in particular for the discussions of related Bayesian methods.

More recently, Wang et al. [19] proposed a nonparametric ROC estimator via smoothing the Bernstein polynomials (BP). The asymptotic properties of the estimator have been well studied but more efforts are desired to select the optimal tuning parameter for real data analysis. In this study a novel Bernstein polynomial ROC estimator is derived from the framework of smooth quantile function estimation. The new estimator shares the asymptotic properties with the existing Bernstein polynomial estimator but naturally provides an inherent bandwidth. The empirical performances of the new estimators are investigated and compared with a wide range of existing ROC estimators via extensive simulation studies.

We should start from a formal introduction of Bernstein polynomial approximation. A continuous function f(x) on the interval [0, 1] can be approximated by where , and as n → ∞,

Bernstein polynomials have been previously used for estimating probability density function [20], cumulative distribution function [21], and quantile function [22].

The rest of the paper is organized as follows: In the next section, a new estimator of the ROC curve is proposed via directly smoothing the eROC curve with Bernstein polynomial approximation. The BP method is illustrated by analyzing both simulated and real data sets, respectively. Empirical performance of the BP estimators is further explored via extensive simulations.

Bernstein polynomial ROC estimator

We start this section by formally defining the empirical ROC estimator. Let and denote n1 and n0 independent diagnostic biomarker measurements from the diseased (case) and non-diseased (control) populations with distribution functions X1F1 and X0F0, respectively. Let Xi:j (i = 1, 0, j = 1, …, ni), denote the jth order statistic from the ith population. Given Xi, the empirical distribution functions and the correspondent sample quantile functions are defined as (0.1) (0.2) respectively, where I(⋅) is the indicator function and ⌊⋅⌋ is the floor function. The ‘+1’ term in ensures that sample quantiles lie between the minimum and maximum order statistics. The empirical ROC curve estimator is defined as (0.3) The empirical ROC curve is essentially a step function of the proportions versus where the steps take place at every possible values of X1.

Definition 0.1. The Bernstein polynomial ROC (bpROC) estimator is defined as (0.4) where X0:0 = −∞.

The definition of the estimator at (0.4) follows similarly to the derivation of the Bernstein polynomial quantile function estimator [22]. Given a continuous distribution function F0,

It follows directly that (0.5)

Thus a class of L-estimators for R(u) can be constructed as Letting leads to the Bernstein polynomial ROC estimator at (0.4). Note that the function h(s, t) can be any measurable function such that h(s, t) ∈ [s, t).

The bpROC estimator at (0.4) is a special case of the estimators recently proposed by Wang et al. (2019), namely, where

Wang et al. [19] have thoroughly investigated the asymptotic properties but also noted that “the choice of the tuning parameter is generally an issue” and “are going to put more effort into the tuning method of parameter m”. The contribution of the bpROC estimator at (0.4) is to provide a naturally selected bandwidth m = n0, which reflects the numbers of steps in . Since the ROC estimation depends on both F0 and F1, and there are some equal values among , we take one step further and propose another bandwidth m as the number of steps of the empirical ROC curve including the two end points (0, 0) and (1, 1), in case that one or both of these two points are not included in the eROC curve.

Both bpROC estimators avoid burden of bandwidth selection by automatically tuning the bandwidth along with sample sizes, and yield satisfactory empirical performance as shown in Section. The new BP ROC estimators are also transformation invariant, since they are direct derivatives of eROC based on rank statistics.

Examples

To illustrate the bpROC estimators and compare with other existing estimators, a simulated example is firstly analyzed for the sake that the true ROC curve can be used for reference. In this example, n = 30 observations are generated from F0 ∼ Normal(0,1) and F1 ∼ Normal(1,1), respectively. The data are displayed in Table 1. A variety of ROC estimators are graphed in Fig 1, including the empirical ROC curve (E) and those.

  • derived from kernel estimators of F0 and F1 with bandwidth selected by Sheather and Marron [6] (KS-SJ), by Altman and Leger [7] (KS-AL), by Lloyd [8] (KS-L), and by Hall and Hyndman [9] (KS-HH),
  • derived by kernel smoothing of pseudo data by Pulit [17] (KSP),
  • derived from log-concave density estimation (LC) and (SLC) [13],
  • derived from binormal model (BN),
  • derived by Bernstein Polynomials with m equal to the number of unique values from F0 (BP) and equal to the number of steps in empirical ROC estimate (BPa).
thumbnail
Fig 1. The estimated ROC curves from a simulated example data set.

The red line is the true ROC curve.

https://doi.org/10.1371/journal.pone.0251959.g001

thumbnail
Table 1. A simulated data set with n = 30 from F0 ∼ Normal(0, 1) and F0 ∼ Normal(1, 1), respectively.

https://doi.org/10.1371/journal.pone.0251959.t001

A brief description of each method has been provided in the introduction. A variety of R packages can be used to calculate the existing ROC estimators. In this paper, the R package pROC is used to calculate the KS-SJ, KS-AL, and BN estimators. The R code available from https://rdrr.io/bioc/ROC/src/R/ROC.hyndman.R is used for KS-L and KS-HH estimators. The R package logcondens is used for calculating LC and SLC estimators. All smoothed ROC estimators provide a reasonable amount of smoothing to the empirical ROC estimator and all estimators demonstrate acceptable accuracy for estimating the true ROC curve.

To further illustrate the application of the estimation methods on real life data, the well known pancreas data, firstly published by Wieand et al. [23], is analyzed to evaluate the capacity of a carbohydrate antigen (CA19.9) to distinguish subjects with pancreatic cancer (n1 = 90) from those with pancreatitis but not pancreatic cancer (n0 = 51). The ROC estimates from this data set are displayed in Fig 2. Other than KS-L and KS-HH, all the ROC estimates share high similarity, particularly when the specificity is less than 80%.

thumbnail
Fig 2. The estimated ROC curves from the pancreas data.

https://doi.org/10.1371/journal.pone.0251959.g002

Simulation study

To examine the empirical performance of bpROC estimators as compared with other existing methods, a fairly comprehensive simulation study is performed under a variety of scenarios that F0 and F1 are from either a symmetric (normal) or right skewed (gamma) distribution with the area under the ROC curve (AUC) approximately equal to 0.70 and 0.90 for the evaluation of a moderately good and excellent biomarker, respectively. More specifically, six sampling scenarios are examined as below,

  • S1. F1 ∼ normal(1,1) and F0 ∼ normal(0,1) with AUC = 0.760;
  • S2. F1 ∼ normal(2,1.2) and F0 ∼ normal(0,1) with AUC = 0.900;
  • S3. F1 ∼ gamma(0.5,4) and F0 ∼ gamma(0.5,1) with AUC = 0.702;
  • S4. F1 ∼ gamma(2,0.5) and F0 ∼ gamma(1,1) with AUC = 0.887;
  • S5. F1 ∼ gamma(2,2) and F0 ∼ normal(2,1) with AUC = 0.725;
  • S6. F1 ∼ gamma(2,2) and F0 ∼ normal(1,1) with AUC = 0.870.

Scenarios S5 and S6 are of particular interest since that in reality it is not uncommon that the distribution becomes right-skewed from symmetric when subjects are diseased. Four different sample sizes are considered with (n0, n1) equal to (30, 30), (30, 100), (100,30), (100, 100), respectively. For each given sample size, data are generated from the desired distributions and the 11 ROC estimators as listed in Section are calculated at the grid points ui = 0.01 to 0.99 by 0.01, i = 1, …, 99. The process is replicated N = 2000 times.

The performance of the jth (j = 1, …, 11) ROC estimator at each grid point ui is assessed by mean squared error (MSE) For better presentation, we further use empirical ROC estimator as the reference and assess the performance of the jth ROC estimator at each grid point by relative efficiency (RE), which is defined as where is the MSE associated with the empirical ROC estimator at ui. Thus a value of RE greater than 1 indicates a more efficient ROC estimator with less MSE than the empirical estimator.

To assess the overall performance of each estimator across all grid points, we use mean integrated square error (MISE), which has been previously used by Zhou and Harezlak (2002) and defined as

Again for better comparison, we calculate overall relative efficiency (ORE) as (0.6) where is the MISE of the empirical ROC estimator. A higher ORE value indicates smaller MISE and better performance, and an ORE value greater than 1 indicates the estimator is more efficient than the empirical ROC estimator.

In Figs 38, relative efficiencies of each ROC estimator are displayed to show the pattern that the performance of each ROC estimator changes over the line (0,1), together with the overall relative efficiencies, provided at the top left corners.

thumbnail
Fig 3. Normal(1,1) vs. normal(0,1) with AUC = 0.760: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g003

thumbnail
Fig 4. Normal(2,1.2) vs. normal(0,1) with AUC = 0.900: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g004

thumbnail
Fig 5. Gamma(0.5,4) vs. gamma(0.5,1) with AUC = 0.702: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g005

thumbnail
Fig 6. Gamma(2,0.5) vs. gamma(1,1) with AUC = 0.887: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g006

thumbnail
Fig 7. Gamma (2,2) vs. Normal(2, 1) with AUC = 0.725: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g007

thumbnail
Fig 8. Gamma (2,2) vs. Normal(1, 1) AUC = 0.870: (a) n1 = 30 vs. n0 = 30; (b) n1 = 30 vs. n0 = 100; (c) n1 = 100 vs. n0 = 30; and, (d) n1 = 100 vs. n0 = 100.

Overall relative efficiency at (0.1) for each smooth ROC estimator is provided in the bracket behind the abbreviation.

https://doi.org/10.1371/journal.pone.0251959.g008

Figs 3 and 4 show the results when data are simulated from normal distributions. It is not surprising that the ROC estimators from binormal model (BN) perform the best for most scenarios. For AUC = 0.760 in Fig 3, the BPa and KS-SJ are comparable to and sometimes better than the BN estimator. KSP performs reasonably well when n0 = 30 in Fig 3(a) and 3(c). For AUC = 0.900 in Fig 4, only the BP and SLC estimators are slightly worse than the BN estimator. The efficacy of BPa is slightly worse than the BP estimator.

Figs 5 and 6 show the results when data are simulated from gamma distributions. For AUC = 0.702 from Fig 5, BN demonstrates best efficiency. The performances of BP and BPa estimators are comparable to KSP but slightly worse than the BN estimator. All estimators are more efficient than the eROC estimator, other than KS-L, KS-HH, LC, and SLC. The poor performance of LC and SLC estimators is mainly caused by the violation of the log-concavity assumption. In Fig 6 with AUC = 0.883, the BN estimators still appear as the best one. The performances of LC, KSP, BP, and BPa are comparable to each other and slightly worse than the BN estimator. The efficiencies of LC and SLC estimators are significantly improved, now that the log-concavity assumption is met.

Figs 7 and 8 show the results when data are simulated from gamma and normal distributions. The relative efficacy of the BP estimators as compared to empirical ROC estimator does not change much from the binormal and bi-gamma models. BPa estimator still demonstrates as one of the most efficient estimators with comparable performance to KS-SJ, LC, and SLC estimators. The performance of the BN estimator is slightly worse than the eROC estimator in general.

As a summary of the observations from our simulation study, it is fair to conclude that the BP ROC estimators, demonstrate better and more reliable efficiency, as compared to other estimators, particularly for small sample sizes. For larger sample sizes, the performance of the BP estimator remains one of the best and is comparable to the best estimator, which usually changes given different simulation scenarios. The BPa estimator usually performs slightly better than the BP estimator.

It is also worthy noting that the BP estimators always outperform the empirical ROC estimator, when data are simulated from normal, gamma, or mixed distributions. The performance of the other estimators depends on the underlying distributions from which the data are simulated. For instance, the BN estimator does not perform well when F0 and F1 are from different families of distributions and the efficiency of the LC and SLC estimators is sensitive to the log-concavity assumption.

Conclusion and discussion

In this paper we propose a couple of tuning parameters which can be easily implemented to the recently derived Bernstein polynomial ROC estimator. The corresponding ROC estimators in general perform better than a wide range of existing estimators in terms of MISE, under scenarios that are commonly encountered in real word data. Further studies are underway towards evaluating the proposed ROC estimator on estimating the associated summary statistics, such as the area under the ROC curve, the partial AUC, and the Youden index.

Acknowledgments

We thank the Associate Editor and two reviewers for their careful reading of the original manuscript and for their constructive comments which significantly improve the paper.

References

  1. 1. Pepe MS. The Statistical Evaluation of Medical Tests for Classification and Prediction. Oxford University Press: USA; 2004
  2. 2. Zhou XH, McClish DK, Obuchowski NA. Statistical Methods in Diagnostic Medicine, 2nd. John Wiley & Sons Inc.: Hoboken, New Jersey; 2009
  3. 3. Hanley JA. The use of the’binormal’ model for parametric ROC analysis of quantitative diagnostic tests. Statistics of Medicine 1996; 15(14): 1575–1585. pmid:8855483
  4. 4. Cai T, Moskowitz CS. Semi-parametric estimation of the binormal ROC curve for a continuous diagnostic test. Biostatistics 2004; 5(4): 573–586.
  5. 5. Hsieh F, Turnbull BW. Nonparametric and semiparametric estimation of the receiver operating characteristic curve. The Annals of Statistics 1996; 24(1): 25–40.
  6. 6. Sheather SJ, Jones MC. A reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society series B 1991; 53: 683–690.
  7. 7. Altman N, Leger C. B|andwidth selection for kernel distribution function estimation. Journal of Statistical Planning and Inference 1995; 46: 195–214.
  8. 8. Lloyd CJ. Using smooth receiver operating characteristic curves to summarize and compare diagnostic systems. Journal of American Statistical Association 1998; 93: 1356–1364.
  9. 9. Hall PG, Hyndman RJ. Improved methods for bandwidth selection when estimating ROC curves. Statist. Probab. Lett. 2003; 64: 181–189.
  10. 10. Zhou XH, Harezlak J. Comparison of bandwidth selection methods for kernel smoothing of ROC curves. Statistics in Medicine 2002; 21(14): 2045–2055.
  11. 11. Qiu P, Le C. ROC curve estimation based on local smoothing. J. Statist. Comput. Simulation 2001; 70: 55–69.
  12. 12. Harrell FE, Davis CE. A New Distribution-free Quantile Estimator. Biometrika 1982; 69: 635–640.
  13. 13. Rufibach K. A smooth ROC curve estimator based on log-concave density estimates. International Journal of Biostatistics 2014; 8(1):
  14. 14. Peng L, Zhou XH. Local linear smoothing of receiver operating characteristic (ROC) curves. Journal of Statistical Planning and Inference 2004; 118: 129–143.
  15. 15. Du P, Tang L. Transformation-invariant and nonparametric monotone smooth estimation of ROC curves. Stat. Med. 2009; 28: 349–359.
  16. 16. Tang L, Du P, Wu C. Compare diagnostic tests using transformation–invariant smoothed ROC curves. Journal of Statistical Planning and Inference 2010; 140: 3540–3551.
  17. 17. Pulit M. A new method of kernel-smoothing estimation of the ROC curve. Metrika 2016; 79: 603–634.
  18. 18. Gonçalves L, Subtil A, Rosário Oliveira M, De Zea Bermudez P. ROC curve estimation: An overview. Revstat—Statistical Journal 2014; 12(1): 1–20.
  19. 19. Wang X, Song L, Sun L, Gao H. Nonparametric estimation of the ROC curve based on the Bernstein polynomial. Journal of Statistical Planning and Inference 2019; 203: 39–56.
  20. 20. Leblanc A. On estimating distribution functions using Bernstein polynomials. Ann Inst Stat Math 2012; 64: 919–943.
  21. 21. Guan Z. Efficient and robust density estimation using Bernstein type polynomials. Journal of Nonparametric Statistics 2016; 28: 250–271,
  22. 22. Cheng C. The Bernstein polynomial estimator of a smooth quantile function. Statistics & Probability Letters 1995; 24: 321–330.
  23. 23. Wieand S, Gail MH, James BR, James KL. A family of nonparametric statistics for comparing diagnostic markers with paired or unpaired data. Biometrika 1989; 76: 585–59.