Provides a visualization of the residuals of a time series model. That includes a time series plot of the residuals, and the plots of the autocorrelation function (acf) and histogram of the residuals
check_res(ts.model, lag.max = 36)
ts.model | A time series model (or forecasted) object, support any model from the forecast package with a residuals output |
---|---|
lag.max | The maximum number of lags to display in the residuals' autocorrelation function plot |
library(forecast) data(USgas) # Create a model fit <- auto.arima(USgas) # Check the residuals of the model check_res(fit)#> Warning: Ignoring 36 observations#> Warning: Ignoring 34 observations#> Warning: Ignoring 4 observations