The time series plot and the sample ACF of the standardized residuals are plotted. Also, a portmanteau test for detecting residual correlations in the standardized residuals are carried out.
# S3 method for TAR
tsdiag(object, gof.lag, col = "red",xlab = "t", ...)
a fitted TAR model output from the tar function
number of lags of ACF to be examined
color of the lines flagging outliers, etc.
x labels for the plots
any additional user-supplied options to be passed to the acf function
Side effects: plot the time-series plot of the standardized residuals, their sample ACF and portmanteau test for residual autocorrelations in the standardized errors.
"Time Series Analysis, with Applications in R" by J.D. Cryer and K.S. Chan
# NOT RUN {
data(prey.eq)
prey.tar.1=tar(y=log(prey.eq),p1=4,p2=4,d=3,a=.1,b=.9,print=TRUE)
tsdiag(prey.tar.1)
# }
Run the code above in your browser using DataLab