View source: R/forecast_tools.R
check_res | R Documentation |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.