I am trying to perform bagging of decision trees using a number of bag sizes 200, 400, 600 to get the accuracy of each bag size using oob estimation. How would I update my code to use multiple bag sizes and from this how would I get the accuracy using oob estimation for each bag size? Here is my code so far...
library(ipred)
data(iris)
training_set.tree <- bagging(as.factor(Species)~., iris, nbagg=200, coob=TRUE)