var_boot | R Documentation |
Calculate the naive nonparametric bootstrap variance estimator for AUC
var_boot(formula_string, label_true, data, B, link = "logit")
formula_string |
A string with an expression of the form |
label_true |
A vector of the true labels in the data set, coded as 1 (positive) and 0 (negative) |
data |
A data frame, list or environment containing the variables in the model. It can also be an object coercible by as.data.frame to a data frame. |
B |
An integer indicating the desired number of bootstrap samples |
link |
A string specifying the model link function for glm function
used to fit the binomial model. Possible links are |
The value of the bootstrap variance estimator for the AUC.
B. Efron and C. Stein (1981). The jackknife estimate of variance. The Annals of Statistics 9: 586-596.
library(aucvar)
my_data <- na.omit(breastcancer) # Omit NA values
model_formula <- "Class~`Clump Thickness`+ `Uniformity of Cell Size`+`Uniformity of Cell Shape`+
`Marginal Adhesion` + `Single Epithelial Cell Size` + `Bare Nuclei` +
`Bland Chromatin` + `Normal Nucleoli` + `Mitoses`"
# Use quotes inside double quotes since data set variable names have spaces
var_boot(model_formula, my_data$Class, my_data, B = 10^3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.