var_jack: Calculate the delete-d jackknife variance estimator for AUC

View source: R/var_jack.R

var_jackR Documentation

Calculate the delete-d jackknife variance estimator for AUC

Description

Calculate the delete-d jackknife variance estimator for AUC

Usage

var_jack(formula_string, label_true, data, B = Inf, d, 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 jackknife samples.

d

Number of data entries to remove to generate the jackknife samples. If d is equal to 1, the delete-one version of the jackknife variance estimator will be used in which case B does not need to be specified.

link

A string specifying the model link function for glm function used to fit the binomial model. Possible links include 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 delete-d jackknife variance estimator for the AUC

References

B. Efron (1979). Bootstrap methods: another look at the jackknife The Annals of Statistics 7: 1-26.

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_jack(model_formula, my_data$Class, my_data, B = 10^3, d = 20)


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