Learn R Programming

NTS (version 1.1.3)

thr.test: Threshold Nonlinearity Test

Description

Threshold nonlinearity test.

Usage

thr.test(y, p = 1, d = 1, thrV = NULL, ini = 40, include.mean = T)

Value

thr.test returns a list with components:

F-ratio

F statistic.

df

the numerator and denominator degrees of freedom.

ini

initial number of data to start RLS estimation.

Arguments

y

a time series.

p

AR order.

d

delay for the threshold variable.

thrV

threshold variable.

ini

initial number of data to start RLS estimation.

include.mean

a logical value for including constant terms.

References

Tsay, R. (1989) Testing and Modeling Threshold Autoregressive Processes. Journal of the American Statistical Associations 84(405), 231-240.

Examples

Run this code
phi=t(matrix(c(-0.3, 0.5,0.6,-0.3),2,2))
y=uTAR.sim(nob=2000, arorder=c(2,2), phi=phi, d=2, thr=0.2, cnst=c(1,-1),sigma=c(1, 1))
thr.test(y$series,p=2,d=2,ini=40,include.mean=TRUE)

Run the code above in your browser using DataLab