ts.diag(x, lag = 10, band = qnorm(0.975)/sqrt(length(x)))
Arguments
x
(type: numeric) residuals of the fitted time series model.
lag
(type: numeric) maximum lag at which to calculate the acf and
Ljung-Box test. By default set to 10.
band
(type: numeric) absolute value for bandwidth in the the ACF plot.
By default set to `qnorm(0.975)/sqrt(n)` which approximates to 0.07 for
malleco data (n = 734)
Value
A ggplot object.
Details
This function plot the residuals, the autocorrelation function of the
residuals (ACF) and the p-values of the Ljung-Box Test for all lags up to
lag.