I Used the following codes to make 39 models and select the best set of variables using the Recursive Feature Elimination method (RFE). RFE calculated a table in which there are columns for Variables, RMSE and R-squared. These are the codes:
set.seed(10)
ctrl <- rfeControl(functions = caretFuncs, method="repeatedcv", repeats =5, number= 5,
allowParallel = TRUE)
RF_39 <- rfe(X,Y, sizes = c(1:39), method = 'rf', rfeControl = ctrl, tuneGrid = data.frame(mtry=6))
The table that RFE made for me is like the following image:
My Question: Can I add a condition to my codes to calculate Concordance instead of R-squared, because I need Concordance? Thanks