How can I apply backwards variable selection based on performance on test data in R?
I already know that there is the stepAIC() function which does almost what i want, but in every step it removes one variable based on the AIC criteria. i want to do the same with test and training data and remove the variable in every step based on prediction performance.