I'm trying to understand roc function of pROC package. My first understanding is I need to have a model first and then run against testing set to get predicted probability for each sample, then by feeding with the true class of testing set and probability from the model, with different cutoff we can get the ROC curve, like:
roc <- roc(response = test$Class, predictor = test$ModelProb).
However looks like with a dataset we can feed roc function directly with predictor and outcome. Say I have a dataset X with predictors numeric1, categorical1 and OutcomeBinaryClass, I can use:
filterVarImp(X, OutcomeBinaryClass), which is actually a wrapper and apply auc with each predictor of X and Y.
How ROC curve is generated behind the scene without a model (to get the probabilities)? And what is the meaning to get ROC for each predictor?