home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / bit / listserv / sasl / 4919 < prev    next >
Encoding:
Text File  |  1992-11-04  |  1.1 KB  |  31 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!gatech!paladin.american.edu!auvm!EBAY.SUN.COM!CLAIRE.CASTELL
  3. Message-ID: <9211041939.AA05595@zydeco.EBay.Sun.COM>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Wed, 4 Nov 1992 11:39:17 PST
  6. Reply-To:     "(Claire Castell)" <Claire.Castell@EBAY.SUN.COM>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         "(Claire Castell)" <Claire.Castell@EBAY.SUN.COM>
  9. Subject:      Re: help with moving averages
  10. Comments: To: SUMA%CLEMSON.BITNET@uga.cc.uga.edu
  11. Comments: cc: SAS-L@uga.cc.uga.edu
  12. Lines: 17
  13.  
  14. Uma, when I was at another company we wrote programs to calculate the moving
  15. averages of parts failures (MTBF stuff). It involved the use of the
  16. lag function extensively.
  17.  
  18. Here's a sample calcuation for a 6 month rolling average:
  19.  
  20. HRS6 =     SUM(MACH_HRS,LAG1(MACH_HRS),LAG2(MACH_HRS),LAG3(MACH_HRS),
  21.     LAG4(MACH_HRS),LAG5(MACH_HRS));
  22.  
  23. FAILS6= SUM(TOT_FAIL,LAG1(TOT_FAIL),LAG2(TOT_FAIL),LAG3(TOT_FAIL),
  24.     LAG4(TOT_FAIL),LAG5((TOT_FAIL),LAG6(TOT_FAIL));
  25.  
  26. KFITS=FAILS6/HRS6;    * you might add a rounding function here;
  27.  
  28.  
  29. Claire Castell
  30. Sun Microystems, Inc.
  31.