tsfeatures (version 1.0.1)

nonlinearity: Nonlinearity coefficient

Description

Computes a nonlinearity statistic based on Ter<U+00E4>svirta's nonlinearity test of a time series. The statistic is \(10X^2/T\) where \(X^2\) is the Chi-squared statistic from Ter<U+00E4>svirta's test, and T is the length of the time series. This takes large values when the series is nonlinear, and values around 0 when the series is linear.

Usage

nonlinearity(x)

Arguments

x

a univariate time series

Value

A numeric value.

Examples

Run this code
# NOT RUN {
nonlinearity(lynx)
# }

Run the code above in your browser using DataCamp Workspace