varAUC | R Documentation |
Calculate an unbiased variance estimator of AUC
varAUC(p_pred, label_true, B = Inf)
p_pred |
A vector of the predicted probabilities for the observations in the data set |
label_true |
A vector of the true labels in the data set, coded as 1 (positive) and 0 (negative) |
B |
The number of random partitions to use in the partition-resampling scheme. If B is set to Inf or it is ommited, the exact unbiased variance estimation formula without the partition resampling scheme is realized. |
The value of the AUC variance estimator
Q. Wang and A. Guo (2020). An efficient variance estimator of AUC with applications to binary classification. Statistics in Medicine 39 (28): 4281-4300. DOI: 10.1002/sim.8725.
library(aucvar)
my_data <- na.omit(breastcancer) # Omit NA values
my_model <- glm(Class~`Clump Thickness`+ `Uniformity of Cell Size` +
`Uniformity of Cell Shape`+ `Marginal Adhesion` + `Single Epithelial Cell Size` +
`Bare Nuclei` + `Bland Chromatin` + `Normal Nucleoli` + `Mitoses`,
family=binomial(link="logit"), data=my_data)
predictions <- predict(my_model, type="response")
varAUC(predictions, my_data$Class, 10^3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.