Last data update: 2014.03.03

R: Model diagnostics for a fitted TAR model
tsdiag.TARR Documentation

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 class '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.

Author(s)

Kung-Sik Chan

References

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

See Also

tar

Examples

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)

Results