Description Usage Arguments Details Value Examples
View source: R/partial-auc-spline.R
Function for estimating the partial area under the ROC curve. ROC curve may be optionally smoothed using binormal smoothing before computing partial AUC. See Details
for a more comprehensive description.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
Data frame. |
sens |
Column name in |
spec |
Column name in |
range |
Range of sensitivity or specificity to integrate. |
focus |
String describing whether the integration range is for sensitivity or specificity. |
smooth |
Logical. Should binormal smoothing be used? |
correct |
Logical. Should a min-max correction be applied? |
n |
Number of equally-spaced points for smooth curve calculations. |
plot |
Logical. Should a partial AUC plot be returned? |
opts |
List of options passed to plotting function if |
... |
Not currently used. |
Since the x-axis of the ROC curve is mapped as 1 - Specificity, if the focus
is "sp", the range
should be provided in the left-to-right orientation for specificity. In other words, if you want to integrate the entire ROC in terms of specificity, the range
would be c(1,0); this translates to integrating the false-positive rate from c(0,1).
If you only want to integrate the a section of the ROC curve (e.g. FPR from 0 to 0.2), you would specify the range
in terms of specificity as c(1, 0.8).
When the focus
is "se" for sensitivity, the range
should be specified from the top-to-bottom orientation. In other words, to integrate the whole ROC curve, if the focus
is "se" the range
should be specificed as c(1,0). To integrate only a section of the ROC, for example, when sensitivity is between 0 and 0.5, you would specify the focus
as "se" and the range
as c(0.5,0).
The list of options (opts
) that can be passed to the plotting function are (passed as a list):
pcol
Colour of the partial area.
mcol
Colour for the maximal partial area.
fcol
Colour for the full AUC.
percent
Logical. Should axes be labeled as percentages?
Invisibly returns a tibble
containing a column for the partial AUC, and a list-column containing the ROC data. The returned tibble
inherits the tibble
classes as well as the class partial_auc
. The returned object also contains attributes indicating whether the ROC was smoothed (smooth_roc
), corrected (corrected_auc
), range of integration (range
), and focus (focus
).
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.