Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Fwd: Seasonality in time series data


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Fwd: Seasonality in time series data
Date   Mon, 2 Dec 2013 16:50:47 +0000

More on graphs for seasonality:

SJ-9-2  gr0037  . . . . . . . .  Stata tip 76: Separating seasonal time series
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q2/09   SJ 9(2):321--326                                 (no commands)
        tip on separating seasonal time series

SJ-6-3  gr0025  . . . . . . . . . . . . Speaking Stata: Graphs for all seasons
        (help cycleplot, sliceplot if installed)  . . . . . . . . .  N. J. Cox
        Q3/06   SJ 6(3):397--419
        illustrates producing graphs showing time-series seasonality

My line is that cosinor and similar analyses are basically regression,
although you might need to do a  little work to get out parameters in
required form. A big advantage of regression is that it easy to extend
it to include trend terms.

My bias is that if seasonality has to be searched for in the spectrum,
it is too faint to be of major importance.
-ucm- is a very impressive and powerful approach.

P.S. Some clarification here on Bob Yaffee's suggestions, working backwards.

-fft- as a Stata command (not function) is not documented. Mata
functions for FFT are documented. Programming spectral analysis from
scratch would be a substantial task, but -pergram- etc. are available.

There is no -fourier- function in Stata. Bob may possibly be referring
to a -fourier- command lurking on SSC as part of -circular-. Be
advised that the help refers to a -npair()- option but the syntax is
really -nh()-. (That's my bug.)

Nick
[email protected]


On 2 December 2013 02:45, Robert A Yaffee <[email protected]> wrote:

(3)

>    PS: If you want to use the fourier function, this could greatly
> facilitate your cosiner analysis.

(2)

>>    Sorry for the typos: sin and cos functions are the specific
>> functions and the fft is a  fast Fourier transform and its inverse
>> available as an integral part of Stata.

(1)

>>>     You can use the sin and cosine functions to perform a spectral
>>> analysis in Stata.
>>> If you have reason to believe that the continuous data conforms to longer wave
>>> cycles, you can use ucm (Unobserved components models) with the model(cycle) for
>>> formulate them.
>>>     You can use spectral density functions or periodograms to identify
>>> periodicity in these
>>> waveforms if the seasonality is not readily apparent.  You should also
>>> be aware that there
>>> is an fft function for a fast Fourier transform if you prefer the
>>> complex configuration
>>> for your spectral analysis.

On Sun, Dec 1, 2013 at 7:58 PM, Nick Cox <[email protected]> wrote:

>>>> Nilay Kumar had difficulty in posting this to the list. This paper
>>>> appears relevant.
>>>>
>>>> SJ-6-4  st0116  . . . .  Speaking Stata: In praise of trigonometric predictors
>>>>         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
>>>>         Q4/06   SJ 6(4):561--579                                 (no commands)
>>>>         discusses the use of sine and cosine as predictors in
>>>>         modeling periodic time series and other kinds of periodic
>>>>         responses
>>>>
>>>> A -signrank- test comparing summer and winter sounds a poor idea. It
>>>> would throw away much of the information in the data, yet still face
>>>> dependence problems.
>>>>
>>>> -lowess- in Stata is a command, not a function.

On 1 December 2013 17:55, nilay kumar <[email protected]> wrote:

>>>>> I have a time series dataset where I am trying to asses seasonal variations
>>>>> in a var1. How can I use the signed rank test to do this? the signrank
>>>>> command asks for two variables, what I'm trying to compare is var1 in summer
>>>>> to var1 in winter. (all of these observations are from a single location and
>>>>> hence related, which is why I'm using the signed rank test.)
>>>>> Using the lowess function, this time series data seems to have a very strong
>>>>> component of seasonality (visual estimate). I'm interested in assessing the
>>>>> statistical significance of this finding using cosinor analysis. Is there a
>>>>> method for performing cosinor analysis in stata?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index