powered by
Perform Tsay (1986) nonlinearity test.
Tsay(y, p = 1)
The function outputs the F statistic, p value, and the degrees of freedom. The null hypothesis is there is no nonlinearity.
time series.
AR order.
Tsay, R. (1986) Nonlinearity tests for time series. Biometrika 73(2), 461-466.
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)) Tsay(y$series,2)
Run the code above in your browser using DataLab