2

I am new in this forum.

I am beginning to work with time series, I have a daily (25,000+ observations) temperature dataset (01/01/1946 - 07/01/2014)

I want to test for the following:

  1. Trends: So far I used OLS, but I have heard about using Mann-Kendall test may be useful.
  2. seasonality: In the same way that in the previous point so far I tried to analyze them with OLS, any recommendation is very welcome.
  3. structural breaks: the problem with this aspect is that graphically it cannot be observed any breaks, therefore I have been trying with CUSUM and CUSUMSQ to identify this structural breaks, some additional recommendations?

As additional point I need to perform this on Stata. I saw in the web about Kendall package for R, but I cannot use R. Currently I use Gretl and Stata, I hope someone might help me.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
  • What are you trying to achieve? How are you analyzing seasonality via OLS? – Glen_b Jul 20 '14 at 23:58
  • I am trying to get measure trend and seasonality (in case they exists), in order to get the inputs for later estimating weather risks. Regarding the seasonality I have been using monthly dummies and adding these monthly dummies into the OLS model (being careful with collinearity, of course) – Jorge Cárcamo Jul 21 '14 at 02:35
  • 2
    I think Mann-Kendall can be useful for detecting the existence of trend, but in order to estimate it, you may want something a little more sophisticated. A good place to start might be [here](https://www.otexts.org/fpp/), or with the Foreacsting book by Makridakis, Wheelwright and Hyndman. – Glen_b Jul 21 '14 at 02:57
  • Perfect!, thanks a lot for your help! It really helps. – Jorge Cárcamo Jul 24 '14 at 04:08

1 Answers1

1

I realize that this question is quite old and the answer will come too late for you, but perhaps it could be useful for others having similar problems. Since you mention the Gretl program, I will try to answer how it can be done with Gretl.

  1. Mann-Kendall trend test: Very recently a function package (additional functionality) named MannKendall.gfn has been provided which you can use. (Full disclosure: co-authored by myself...)

  2. Seasonality: Of course there are many ways including the popular X13 seasonal adjustment procedure, but as an easy start I would suggest to add seasonal dummies to your model. Given your daily data, perhaps use monthly dummies. Since the data sampling (daily) is not equal to the wanted seasonal dummy periodicity (monthly) I think you cannot use the built-in seasonals() function (nor the menus) for that. Instead to create for example a dummy for observations in January in Gretl you could do series M1 = ($obsminor == 1), because $obsminor gives you the monthly information here.

  3. Structural breaks: Again, there are many ways. If you have an idea about the location of the break, you could apply a Chow breakpoint test. If the break date is unknown, you could use another function package for Gretl, named StrucBreak.gfn. This package implements the break tests from Bai and Perron ( (2003, J of Applied Econometrics); given the complexity of options it cannot (yet) be used from the menus, but it comes with a fairly comprehensive help document that explains how to use it.

Sven S.
  • 524
  • 2
  • 8
  • 1
    A minor comment on Sven's reply (item 2): in gretl, monthly dummies can easily be added after creating the "M1" variable as per Sven's suggestion, by simply issuing the command list L = dummify(M1) – Jack Lucchetti Jun 09 '17 at 11:11
  • Thanks to Jack Lucchetti for reminding me of the dummify() function! I guess instead of `$obsminor == 1` (which only holds ones and zeros) it would have to be just `$obsminor` in the first step, which would contain values from 1 through 12 in this case. After the series is created, you can mark it as discrete (right-click, edit attributes, treat as discrete), and then you can choose "Add/Dummies for discrete series" from the menu to get the same result as from the dummify() function. – Sven S. Jun 11 '17 at 13:23