Date: Mon, 30 Dec 2002 22:23:54 -0500
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: previous and next records
This is another situation in which some context would be helpful.
I'm wondering just why this formulation is requested.
This type of moving avarage calculation is usually used to smooth data. But
it seems to me that forcing the first two values to be equal goes beyond
Why not just use a two-term average in the first observation: (2+3)/2 ? Or
perhaps double-weight the first term: (2+2+3)/3 ?
The former would probably simplify the computing.
In my work I usually just discard the tails of the series and keep only
those observations for which the centered moving average can be calculated.
But that of course is in my context.
On Mon, 30 Dec 2002 08:54:57 -0800, Jishnu <jishguha@YAHOO.COM> wrote:
>does anyone know how to get the previous recorda nd the next record.
>I mean this is what I am trying to do
>2 (2+3+4)/3 (next and next)
>3 (2+3+4)/3 (previous and next)
>4 (3+4+5)/3 (previous and next)