Description Usage Arguments Value Examples
View source: R/mainFunctions.R
This function estimates the difference between two cross-validated AUCs
fit using the wrap_cvAUC
function. It also provides an influence
function-based confidence interval estimate and hypothesis test of the null
hypothesis that the two CV-AUCs are equal.
1 | diff_cvAUC(fit1, fit2, confidence = 0.95)
|
fit1 |
An object of class |
fit2 |
An object of class |
confidence |
A |
An object of class diff_cvAUC
with the following entries:
diff |
The difference in CV-AUC between the two fits. |
ci |
The confidence interval for the difference between the two fits. |
p |
The two-sided p-value for the test that the two CV-AUCs are equal. |
folds |
The number of folds used by |
learner1 |
The name of the learner used for |
learner2 |
The name of the learner used for |
confidence |
The confidence interval level. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | n <- 1000
X <- data.frame(x1=rnorm(n),x2=rnorm(n))
Y <- rbinom(n,1,plogis(X$x1 + X$x2))
myglm1 <- function(Y,X,newX){
fm <- glm(Y~.,data=X,family=binomial())
pred <- predict(fm,newdata=newX,type="response")
return(list(fit = fm, pred = pred))
}
myglm2 <- function(Y,X,newX){
fm <- glm(Y~x1,data=X,family=binomial())
pred <- predict(fm,newdata=newX,type="response")
return(list(fit = fm, pred = pred))
}
out1 <- wrap_cvAUC(Y = Y, X=X, learner = "myglm1")
out2 <- wrap_cvAUC(Y = Y, X=X, learner = "myglm2")
diff_auc <- diff_cvAUC(fit1 = out1, fit2 = out2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.