home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!gatech!paladin.american.edu!auvm!EBAY.SUN.COM!CLAIRE.CASTELL
- Message-ID: <9211041939.AA05595@zydeco.EBay.Sun.COM>
- Newsgroups: bit.listserv.sas-l
- Date: Wed, 4 Nov 1992 11:39:17 PST
- Reply-To: "(Claire Castell)" <Claire.Castell@EBAY.SUN.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "(Claire Castell)" <Claire.Castell@EBAY.SUN.COM>
- Subject: Re: help with moving averages
- Comments: To: SUMA%CLEMSON.BITNET@uga.cc.uga.edu
- Comments: cc: SAS-L@uga.cc.uga.edu
- Lines: 17
-
- Uma, when I was at another company we wrote programs to calculate the moving
- averages of parts failures (MTBF stuff). It involved the use of the
- lag function extensively.
-
- Here's a sample calcuation for a 6 month rolling average:
-
- HRS6 = SUM(MACH_HRS,LAG1(MACH_HRS),LAG2(MACH_HRS),LAG3(MACH_HRS),
- LAG4(MACH_HRS),LAG5(MACH_HRS));
-
- FAILS6= SUM(TOT_FAIL,LAG1(TOT_FAIL),LAG2(TOT_FAIL),LAG3(TOT_FAIL),
- LAG4(TOT_FAIL),LAG5((TOT_FAIL),LAG6(TOT_FAIL));
-
- KFITS=FAILS6/HRS6; * you might add a rounding function here;
-
-
- Claire Castell
- Sun Microystems, Inc.
-