Learn R Programming

TSA (version 1.3)

tsdiag.TAR: Model diagnostics for a fitted TAR model

Description

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.

Usage

# S3 method for TAR
tsdiag(object, gof.lag, col = "red",xlab = "t", ...)

Arguments

object

a fitted TAR model output from the tar function

gof.lag

number of lags of ACF to be examined

col

color of the lines flagging outliers, etc.

xlab

x labels for the plots

any additional user-supplied options to be passed to the acf function

Value

Side effects: plot the time-series plot of the standardized residuals, their sample ACF and portmanteau test for residual autocorrelations in the standardized errors.

References

"Time Series Analysis, with Applications in R" by J.D. Cryer and K.S. Chan

See Also

tar

Examples

Run this code
# 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