A bootstrap test of non-linearity in a time series using the third-order moment.
nonlintest(data, n.lag, n.boot, alpha=0.05)
a vector of equally spaced numeric observations (time series).
the number of lags tested using the third-order moment, maximum = length of time series.
the number of bootstrap replications (suggested minimum of 100; 1000 or more would be better).
statistical significance level of test (default=0.05).
Returns an object of class “nonlintest” with the following parts:
the region of the third order moment where the test exceeds the limits (up to n.lag
).
the maximum lag tested using the third-order moment.
a list of following statistics for the area outside the test limits:
the total area outside of limits (summed over the whole third-order moment).
the total area outside the limits divided by its standard deviation to give a standardised estimate.
the median area outside the test limits.
the (1-alpha
)th percentile of the area outside the limits.
Bootstrap p-value of the area outside the limits to test if the series is linear.
Reject the null hypothesis that the series is linear (TRUE/FALSE).
The test uses aaft
to create linear surrogates with the same second-order properties, but no (third-order) non-linearity.
The third-order moments (third
) of these linear surrogates and the actual series are then compared from lags 0 up to n.lag
(excluding the skew at the co-ordinates (0,0)).
The bootstrap test works on the overall area outside the limits, and gives an indication of the overall non-linearity.
The plot using region
shows those co-ordinates of the third order moment that exceed the null hypothesis limits, and can be a useful clue for guessing the type of non-linearity.
For example, a large value at the co-ordinates (0,1) might be caused by a bi-linear series \(X_t=\alpha X_{t-1}\varepsilon_{t-1} +\varepsilon_t\).
Barnett AG \& Wolff RC (2005) A Time-Domain Test for Some Types of Nonlinearity, IEEE Transactions on Signal Processing, vol 53, pages 26--33
print.nonlintest
, plot.nonlintest
# NOT RUN {
data(CVD)
test.res = nonlintest(data=CVD$cvd, n.lag=4, n.boot=1000)
# }
Run the code above in your browser using DataLab