Date: Tue, 18 Jul 2006 09:39:29 -0500
Reply-To: "Oliver, Richard" <roliver@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Oliver, Richard" <roliver@SPSS.COM>
Subject: Re: rolling 5 yr average
Content-Type: text/plain; charset="US-ASCII"
Would the CREATE command give you what you want? For example:
CREATE ma_var1=MA(var1 3).
This creates a new variables that is the centered moving average of the original variable.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of David Wright
Sent: Monday, July 17, 2006 7:07 PM
Subject: rolling 5 yr average
Listed below is an excerpt from a database reporting degree completion in years for each academic program.
year prog time
1998 mc1 2
1998 mc2 2.5
1998 mc3 1
2001 mc1 1.8
2001 mc2 2
2001 mc3 3
I want to generate a report that displays rolling 3 year averages:
1993-95 1994-96 1995-97
time 2.3 1.8 3
The goal is to keep it simple (ala running a means by 3yravg to generate a display of 3 year averages).
I could do separate temporary select ifs for 3 year segments, but then I can only output to a report a single year set per display.
Or perhaps I could aggregate by 3 year sets & then combine each as a separate 3 yr group.
Any ideas would be welcomed.
Thanks in advance.