tsdiag.TAR: Model diagnostics for a fitted TAR model

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/tsdiag.TAR.R

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

1
2
## 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

1
2
3
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)

Example output

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

    acf, arima

The following object is masked from 'package:utils':

    tar

time series included in this analysis is:  log(prey.eq) 
SETAR(2, 1 , 4 ) model delay = 3 
estimated threshold =  4.661  from a Minimum AIC  fit with thresholds 
searched from the  17  percentile to the   81  percentile of all data.
The estimated threshold is the  56.6  percentile of
all data.
lower regime: 
Residual Standard Error=0.2341
R-Square=0.9978
F-statistic (df=2, 28)=6355.76
p-value=0

                       Estimate Std.Err t-value Pr(>|t|)
intercept-log(prey.eq)   0.2621  0.3156  0.8305   0.4133
lag1-log(prey.eq)        1.0175  0.0704 14.4455   0.0000




 (unbiased) RMS 
0.05479 
 with no of data falling in the regime being 
log(prey.eq) 30 


 (max. likelihood) RMS for each series (denominator=sample size in the regime) 
log(prey.eq) 0.05114 


 upper regime: 
Residual Standard Error=0.2676
R-Square=0.9971
F-statistic (df=5, 18)=1253.556
p-value=0

                       Estimate Std.Err t-value Pr(>|t|)
intercept-log(prey.eq)   4.1986  1.2841  3.2697   0.0043
lag1-log(prey.eq)        0.7081  0.2023  3.5005   0.0026
lag2-log(prey.eq)       -0.3009  0.3118 -0.9648   0.3474
lag3-log(prey.eq)        0.2788  0.4063  0.6861   0.5014
lag4-log(prey.eq)       -0.6113  0.2726 -2.2427   0.0377




 (unbiased) RMS 
0.07158 
 with no of data falling in the regime being 
23 


 (max. likelihood) RMS for each series (denominator=sample size in the regime)
0.05602 

 Nominal AIC is  10.92 

TSA documentation built on July 2, 2018, 1:04 a.m.