Hello,
I have created an ROC curve from a multivariable logistic regression. I am trying to do a bootstrap of the ROC but I keep getting a wide range of errors, so I assume I do not understand boot.roc from the fbroc package. I have read the page about boot.roc from boot.roc function - RDocumentation but I guess I do not understand it. I would appreciate any help. Here is the code:
model.multivar<-glm((y)~ a+b+c+d+e+f,family=binomial,data=data)
predicted <- predict(model.multivar, type="response")
install.packages("pROC")
library(pROC)
ROCC<-roc(data$y, predicted, na.rm = TRUE)
install.packages('fbroc')
library(fbroc)
#what do I put here?
boot.roc(pred, true.class, stratify = TRUE, n.boot = 1000,
use.cache = FALSE, tie.strategy = NULL)
#I would assume pred=predicted, true.class=ROCC? but when I do that I get "Error in boot.roc(pred = predicted, true.class = ROCC, stratify = TRUE, :
Predictions and true classes need to have the same length"
Thank you so much!