R - randomForest resample - replacement or not I am studying the randomForest package to deal with an extremely imbalanced dataset (target: 98% vs 2%). 
I realize I can utilize parameters sampsize and strata to do Balanced Random Forest (downsizing). 
However, assuming I am taking 70% of the minor group and the same size of the major group as my sample size (e.g. sampsize = c(minorSize*0.7,minorSize*0.7)), should I do replacement = TRUE or FALSE? 
 A: Your sampling objective would be to have more samples from the minority class (which is 2% of population), to match the majority class to train a better classifier.
For this, you should sample with replacement from the minority class, which means you could end up having many copies of the same minority class sample in the training set.
For the majority class, you can sample without replacement since you have many records available to use.
For highly imbalanced classes, under-sampling the majority class and over-sampling the minority class works best. As part of hyper-parameter tuning, its advisable to try out different sample sizes when training your classifier and find out what works best for your dataset.
You could also consider using SMOTE - it creates synthetic samples of the minority class and randomly under samples the majority class.
Edit: You could first split the training set into majority class and minority class, sample from them separately and then re-combine them to get the final training set. If you're not comfortable doing this by writing your own code in R, you could use the downSample and upSample functions of the caret package.
