ts.diag {aTSA} | R Documentation |
Performs diagnostics for ARIMA model fitted by arima
or
estimate
with output of diagnostic plots.
ts.diag(object, lag.seq = NULL)
object |
the result of an |
lag.seq |
the sequence of lag to calculate the Ljung-Box test statistics. The default
is |
This function is similar to ts.diag
in stats
package, but with
one more diagnostic plot for the normality of residuals. Also, the default sequence of lags
for a Ljung-Box test is set to be seq(4,24,by = 4)
if sample size n > 24
,
otherwise seq(1,n,4)
. This function has been automatically implemented in
estimate
function.
Diagnostics are plotted, including the ACF plot, PACF plot, p.value of white noise checking plot, and Q-Q plot for residuals.
A matrix for the result of white noise checking by Ljung-Box test.
Debin Qiu
x <- arima.sim(list(order = c(3,0,0),ar = c(0.2,0.4,-0.15)),n = 100)
fit <- estimate(x,p = 3) # same as fit <- arima(x,order = c(3,0,0))
ts.diag(fit)