var_boot: Calculate the naive nonparametric bootstrap variance...

View source: R/var_boot.R

var_bootR Documentation

Calculate the naive nonparametric bootstrap variance estimator for AUC

Description

Calculate the naive nonparametric bootstrap variance estimator for AUC

Usage

var_boot(formula_string, label_true, data, B, link = "logit")

Arguments

formula_string

A string with an expression of the form y ~ model that represents the binary classification model. It may include operators as +, ^ and :

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 logit., probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and cloglog (complementary log-log). The default is logit.

Value

The value of the bootstrap variance estimator for the AUC.

References

B. Efron and C. Stein (1981). The jackknife estimate of variance. The Annals of Statistics 9: 586-596.

Examples

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)


fmoyaj/aucvar documentation built on Nov. 28, 2023, 10:50 p.m.