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

Home » Public Forums » archive » SMOOTH or TS_SMOOTH
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: SMOOTH or TS_SMOOTH [message #82185 is a reply to message #82100] Wed, 21 November 2012 02:38 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le mercredi 21 novembre 2012 00:36:39 UTC+1, mark...@gmail.com a écrit :
> I'm looking to calculate moving / windowed averages for a given time series using the last N values to calculate the mean.
>
>
>
> Am I right in thinking ts_smooth with the /backward keyword is the right way of doing this? The documentation for ts_smooth doesn't give any formulae in the same way it does for smooth.
>
>
>
> Any advice would be greatly appreciated. Many thanks

TS_SMOOTH(/BACKWARD) uses a N-th order autoregressive model for calculating the (moving) average of the past N points, i.e. doing a weighted average in which weights are computed such that they minimize the difference with the present point. This is usually different from the simple average of the past N-points. It depends on what kind of "moving average" you actually want.
alx.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Saving via ImageMagick with Coyote Routines fails II
Next Topic: PLOTS versus POLYLINE

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

Current Time: Wed Oct 08 17:28:59 PDT 2025

Total time taken to generate the page: 0.00437 seconds