var_jack | R Documentation |
Calculate the delete-d jackknife variance estimator for AUC
var_jack(formula_string, label_true, data, B = Inf, d, link = "logit")
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 |
The value of the delete-d jackknife variance estimator for the AUC
B. Efron (1979). Bootstrap methods: another look at the jackknife The Annals of Statistics 7: 1-26.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.