tsdiag.Arimax {TSA} | R Documentation |
Model Diagnostics for a Fitted ARIMAX Model
Description
This function is modified from the tsdiag function of the stats package.
Usage
## S3 method for class 'Arimax'
tsdiag(object, gof.lag, tol = 0.1, col = "red", omit.initial = TRUE,...)
Arguments
object |
a fitted ARIMAX model |
gof.lag |
maximum lag used in ACF and Ljung-Box tests for the residuals |
tol |
tolerance (default=0.1); see below |
col |
color of some warning lines in the figures (default=red) |
omit.initial |
suppress the initial (d+Ds) residuals if true |
... |
other arguments to be passed to the acf function |
Value
Side effects: Plot the time plot of the standardized residuals. Red dashed line at +/-qnorm(0.025/no of data) are added to the plot. Data beyond these lines are deemed outliers, based on the Bonferronni rule. The ACF of the standardized residuals is plotted. The p-values of the Ljung-Box test are plotted using a variety of the first K residuals. K starts at the lag on and beyond which the moving-average weights (in the MA(infinity) representation) are less than tol.
Author(s)
Kung-Sik Chan, based on the tsdiag function of the stats pacakage
Examples
data(color)
m1.color=arima(color,order=c(1,0,0))
tsdiag(m1.color,gof=15,omit.initial=FALSE)