2
$\begingroup$

I have two time series on google Trends weekly data for the search of the terms 'machine learning' and 'data science'. The data can be found here http://www.filehosting.org/file/details/524910/dataScience.csv

Here's a plot of the time series in levels: enter image description here I'm not sure whether differencing the series twice is enough for ensuring stationarity.

The Augmented Dickey Fuller test (CADFtest command in R) shows that both time series are stationary when I difference them twice.

Augmented DF test 
                                            ADF test
t-test statistic:                          -1.283348e+01
p-value:                                    2.006856e-25
Max lag of the diff. dependent variable:    1.200000e+01

How to check if there's an annual seasonality (52 weeks) which would require differencing with a lag of 52? Should I just stop at differencing twice with lag 1 since the ADF test shows that the series become stationary in this case?

$\endgroup$
  • $\begingroup$ You should check if there is monthly seasonality by observing the 4th autocorrorelation. $\endgroup$ – Malick Nov 28 '15 at 17:07
  • $\begingroup$ What are you going to do further? What kind of model do you intend to use? @Malick, 4th autocorrelation may not work since one month has 4.35 weeks. Over a 10-year sample even the 52-weeks year may not be a very good approximation; there are 52.18 weeks in a year, so over 10 years the season will be off by nearly 2 weeks. $\endgroup$ – Richard Hardy Nov 28 '15 at 17:30
  • $\begingroup$ The 4th autocorrelation doesn't seem to be significant. I planned to do VECM since the series appear to be cointegrated (Johansen test results). $\endgroup$ – ori06 Nov 28 '15 at 17:43
  • $\begingroup$ Have you tested the unit root for levels and for first differences? Although I do understand why you go for second differences -- a quadratic-looking stochastic trend may ask for it; a stochastic trend in increments (unit-root increments) may be plausible then. Also, if you are going to do VECM, then you will not need to difference at all. $\endgroup$ – Richard Hardy Nov 28 '15 at 18:19
  • $\begingroup$ True that :) I was considering dynamic models and somehow lost track of the fact that if I'm gonna use VECM in the end, I don't even need to bother about differencing. Thanks! $\endgroup$ – ori06 Nov 29 '15 at 9:46

Your Answer

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

Browse other questions tagged or ask your own question.