Could someone please help me to find out whether a time series is linear?

And if it's nonlinear, what degree of nonlinearity?

I searched for an appropriate function in Matlab, but it seems there's no function which takes a vector as an argument and returns a boolean as a result or something like that.

I'm not really sure how to determine it visually.

The link for data: https://datamarket.com/data/set/22px/annual-sheep-population-1000s-in-england-wales-1867-1939#!ds=22px&display=line

  • $\begingroup$ This is a very interesting series. I do not see why you cannot approximate it with a simple ARMA model, maybe it will even be stationary. There might be some trend though. $\endgroup$
    – JohnK
    Jan 21 '16 at 23:07
  • $\begingroup$ I've approximated it with ARIMA(2,1,0), ARIMA(3,1,0) and GMDH (without last 10 values - I used it for forecasting). Theil's U for both ARIMA models are above 1 and for GMDH - 0.84. I don't know how to explain it. So I just think maybe it's due nonlinearity? $\endgroup$ Jan 21 '16 at 23:10
  • $\begingroup$ I am not familiar with this test. But did you try classical unit root tests? $\endgroup$
    – JohnK
    Jan 21 '16 at 23:15
  • $\begingroup$ They are for checking stationarity, aren't they? $\endgroup$ Jan 21 '16 at 23:15
  • 2
    $\begingroup$ Why would a test for stationarity tell you whether the series was linear or nonlinear? $\endgroup$
    – Glen_b
    Jan 22 '16 at 3:29

i took your data (73 values) and used AUTOBOX ( a piece of software that I have helped develop ) and found a result that is akin to non-linearity. AUTOBOX found that the parameters of the model had changed at period 30 thus segmenting the data 1-29 and 30-73. Here is the summary : a plot of the original data enter image description here with acf of enter image description here . The breakpoint (chow test ) is here enter image description here An analysis of the last 44 values led to this equation enter image description here (1,1,0) with three pulses , The statistics of the model are here enter image description here and here enter image description here . The acf of the residuals somewhat suggests randomness enter image description here with the residual plot here enter image description here . The actual/fit/forecast is hereenter image description here with forecasts here enter image description here . The whole idea is that sometimes parameters and or error variance change over time. One shouldn't simply model all the data as if it were homogeneous as the composite/global parameters may not be uniformly representative due to an exogenous (i.e.unknown) factor. You could say that two sets of parameters .. one for the first 29 and one for the last 47 is a kind of nonlinearity as was (partly) suggested here. This is one of the possible "elephants in the room" that nobody talks about but I do.

  • $\begingroup$ I don't know English that much to choose right words to express my gratitude for this answer. Thanks a lot! $\endgroup$ Jan 22 '16 at 2:02
  • $\begingroup$ @VitalyZinchenko Thank you for your praise. One of the reasons I like to explain and teach is that I have found that it is a good way to learn. Different data sets present different challenges . By examining/observing the weakness in standard/current procedures we often ( nearly always !) develop subsequent strength. $\endgroup$
    – IrishStat
    Jan 22 '16 at 3:04
  • $\begingroup$ I completely agree with you, I've found it too: sometimes just by reading different question on Android topic I learn many things, and when you come up with an answer, you literally start feeling new strength. $\endgroup$ Jan 22 '16 at 8:33
  • $\begingroup$ How is a change of the model parameters indicative of non-linearity? I would consider it indicative of non-stationarity, if not an inadequate modelling approach. $\endgroup$
    – Wrzlprmft
    Jan 22 '16 at 17:38
  • 1
    $\begingroup$ When I said " a kind of nonlinearity " I was speaking quite generally and too losely . More correctly since the parameters change they are de-facto non-stationary. $\endgroup$
    – IrishStat
    Jan 22 '16 at 20:13

Showing that an observed time series is non-linear is notoriously difficult. Briefly, you would have to find a measure indicating nonlinearity (e.g., a positive Lyapunov exponent or a non-integer dimension) and then show with surrogates that the value cannot be explained by the linear properties (frequency and amplitude distribution) of the time series.

Your time series is too short for this. Your data points are few in comparison to what is needed to expect a useful result from non-linearity measures. Then you have at most two periods of your main oscillation in your data, which is far too few for any useful analysis. Finally, you have an obvious trend in your time series making the time series non-stationary (at least for the purposes of analysing it – if this is due to a stationary oscillatory behaviour, you would have to have data from at least one oscillation to make any use of this). You can correct for this by subtracting a linear trend, but you have to expect that this is not the only effect of the non-stationarity.

  • $\begingroup$ Yeah, checking for nonlinearity is not as simple as I thought. Thanks for the answer $\endgroup$ Jan 23 '16 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.