Diagnostic plots modelled after stats::tsdiag()
with some modifications
and corrections of p-values in the Box--Ljung test.
# S3 method for Arima xyplot(x, data = NULL, which = 1:4, lag.max = NULL, gof.lag = NULL, qq.aspect = "iso", na.action = na.pass, main = NULL, layout = NULL, ...)
x | A fitted time-series model of class |
---|---|
data | Ignored |
which | A sequence of integers between 1 and 4, identifying the plots to be shown. |
lag.max | Number of lags to compute ACF for. |
gof.lag | The maximum number of lags for the Ljung--Box test. |
qq.aspect | Aspect of Q-Q plot (see |
na.action | Treatment of |
main | Optional titles for the plots. Can also be |
layout | Either a numeric vector with (columns, rows) to use in the call
to |
... | Parameters to pass to |
Plots a lattice plot and returns a trellis
object.
fit <- arima(lh, order = c(1, 1, 0)) xyplot(fit, layout = c(2, 2))xyplot(fit, which = c(1:2, 4), layout = rbind(c(1, 1), c(2, 3)))