This utility function is useful to use in the portmanteau functions,
BoxPierce, MahdiMcLeod, Hosking, LiMcLeod, LjungBox, and portest.
GetResiduals() function takes a fitted time-series object with class "ar",
"arima0", "Arima", ("ARIMA forecast ARIMA Arima"), "lm", ("glm" "lm"),
"varest", or "list". and returns the residuals and the order from the fitted
object.
This method and the bottom documentation is taken directly from the original
'portes' package.