I have tried to model a time series (https://dl.dropboxusercontent.com/u/13029929/ts.txt) with various approaches, but haven't been satisfied. The original time series and its ACF and PACF look like
It doesn't look weakly stationary to me, because the mean and variance don't seem constant. I want to test its stationarity by the augmented Dickey-Fuller test, but the test gives a very small p-value, rejecting the existence of a unit root. (I wonder if I misuse the adfTest() function?)
Title: Augmented Dickey-Fuller Test Test Results: PARAMETER: Lag Order: 20 STATISTIC: Dickey-Fuller: -12.4317 P VALUE: 0.01 Description: Thu May 1 00:47:45 2014 by user: Warning message: In adfTest(tmp, lags = 20, type = c("c")) : p-value smaller than printed p-value
Its ACF and PACF seem to suggest a AR(20) model, so I fit it with AR(20), but the residual series didn't pass Ljung-Box test (p-value = 1.11e-15):
out = arima(tmp, order=c(20,0,0)) Box.test(out$residuals, lag = max(log(length(tmp)), 20)+10, fitdf = 20, type = "Ljung-Box")
Because the series doesn't look stationary to me, I then difference the series once, and the differenced series seems to have constant mean, although still nonconstant variance.
It looks like a MA(6) process, but after fitting MA(6), the p-value of Ljung-Box test on the residual series is still too small (p-value < 2.2e-16)
I then think of taking logarithm of the original series, to reduce variability:
and then difference the logarithm of the original series (see below):
I am not sure if it is worth to take the logarithm, and what models to try with the differenced logarithm series, as I tried several ARMA models on it, the residual series doesn't pass the Ljung-Box test.
forecastwritten by Prof Hyndman, on my time series. It suggests ARIMA(3,1,3), while, suprisingly, my
adfTestdoesn't say the series has unit root (see part 1). But the residual series still has spikes, and doesn't pass Ljung-Box test
out1 = auto.arima(tmp)
Series: tmp ARIMA(3,1,1) Coefficients: ar1 ar2 ar3 ma1 0.9747 -0.2607 0.1460 -0.9811 s.e. 0.0063 0.0081 0.0061 0.0020 sigma^2 estimated as 0.1172: log likelihood=-9881.62 AIC=19773.24 AICc=19773.25 BIC=19814.53
Box.test(out1\$residuals, lag = max(log(length(out1\$residuals)), 4)+10, fitdf = 4, type = "Ljung-Box")
Box-Ljung test data: out1$residuals X-squared = 61.8217, df = 16.257, p-value = 3.101e-07
The residual series and its ACF look like:
It is similar to apply
auto.arima()to logarithm of the original time series, which suggests ARIMA(3,1,3)
I really appreciate if you could suggest some models (and transforms on the original series) to try. Thanks!