I used the function auto.arima to predict sales for the next year. When using only 3 years of the dataset, my results were not good. When I go back 10 years, it improved. However, in order for me to have a normal distribution of the residuals, or have the ACF inside the confidence interval that considers the errors as 0, I need to remove a few outliers. My question is: can I even remove outliers from a residuals plot? Because if I do remove then, it seems like I am removing the points that shows the biggest flaws of my model and I am not sure if it continues to be valid then.
s <- ts(data$sales, frequency = 12) fit <- auto.arima(s) checkresiduals(fit)