comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Seasonal Variation in Trend Analysis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Seasonal Variation in Trend Analysis [message #56077 is a reply to message #56074] Wed, 26 September 2007 15:42 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"David Fanning" <news@dfanning.com> wrote in message
news:MPG.2164877cbc85365998a09c@news.frii.com...
> Folks,
>
> Does anyone happen to have an IDL example of some
> code that might remove seasonal variation in a time
> series? Or some suggestions for how to proceed in IDL?
> I can see that I might want to use a model that has
> sin and cosine terms, but I can't see how to find the
> coefficients of such a model in IDL.
>
> Cheers,
>
> David

Just Least Squares fit the cos and sine functions (0 phase in both
those, you get phase from the amplitudes).

Ax=b
where
[c,s] [x] = [data]
x is the unknown. c, s are your sine and cosine terms.

Use the choledky (faster) or SVD solver routines.

interesting note, if the total length of the time series is a
multiple of the length of the season, just FFT and read off those
values (real = cos, imag = sin for the appropriate frequency)
It is a 'fast' way of solving the least squares fit problem

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to comment out large section of codes in IDL?
Next Topic: Unsolved indexing problem 2 weeks ago.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:52:44 PDT 2025

Total time taken to generate the page: 7.20137 seconds