How to make `auto.arima` choose the model with least auto-correlation in R I have read that auto.arima choses the model with the best AIC.
I am looking to create a model that best neutralises the autocorrelation, as it will be used for prewhitening.
Can I use auto.arima for that, or should I use a different function/is this at all possible in R? I am looking to find the best model that removes the autocorrelation.
 A: The targets of auto.arima are either AICc, AIC or BIC. Models having the lowest values of information criteria need not be the same as those having the lowest absolute autocorrelations. Hence, you will need to write your own function if your goal is to have low absolute values of autocorrelations. 
However, mind the following. The more parameters you include (the higher the lag orders), the lower absolute values of autocorrelations you should get; but without penalization of model complexity (such as in AIC, AICc or BIC), you are likely to overfit. Then you will have low absolute values of in-sample autocorrelation, but you will get high absolute values of out-of-sample autocorrelations. Meanwhile, information criteria strike a good balance between overfitting and underfitting (AIC/AICc are efficient, BIC is consistent). With a choice of model by an information criterion you are more certain of what you will get out of sample. Since we are normally interested in generalizing our results out of sample, this is an important concern. (There is little point in estimating anything if you are only interested in the particular sample you have observed: you know perfectly what it is because you see every point of it.)
