HDTenEightyP/NetNews huggingface dataset:
X-Mailer: ELM [version 2.2 PL16]
Newsgroups: bit.listserv.sas-l
Date:         Fri, 13 Nov 1992 12:27:06 CST
Reply-To:     "R. Snyder" <rsnyder@LOBBY.TI.COM>
From:         "R. Snyder" <rsnyder@LOBBY.TI.COM>
Subject:      Re: SAS Consulting Services
Comments: To: 71020.1025@COMPUSERVE.COM
Comments: cc: sas-l@uga.cc.uga.edu
              92 9:18 pm

SUBJECT:   SAS Consulting tips.
SUMMARY:   Get your ducks in a row.
E-ADDR:    rsnyder@lobby.ti.com
NAME:      Bob Snyder
COMPANY:   Texas Instruments, Sherman, TX
PHONE:     (903) 868-5799
FAX:       (903) 868-7240
>
> Subject: SAS Consulting tips?
> Message-ID: <921113021834_71020.1025_EHC28-2@CompuServe.COM>
>
> We are just starting a small project with SAS Consulting Inc. (a subsidary
> of SI).  <...> Has anyone on the list any experience working with SC?
> Any suggestions on what we can do to maximize the chance of a successful
> project?

> <...> The "look" of the graphs is very hard to define contractually,
> but very important in terms of value.
> The underlying data structures used favor certain kinds of future
> expansion over others. Etc.

> Does SC make "good" choices?  How "micro" should we manage this project?
> Are there an important differences in which programmer actually does the
> work?  Do you have specific recommendations?
>
> William Kahn
> W. L. Gore and Associates
> 71020.1025@compuserve.com
>
William,

I personally worked with Don Henderson of SAS Consulting Services in Rockville,
MA a couple of years ago to kick off a project here at TI. His help was
invaluable and I recommend this service highly.

The most valuable advice I can give is to get your ducks in a row before you
start shelling out $800 + a day. No consultant can "make good choises" unless
you know what you are trying to build. Specifically:

a) Know who your users ( customers ) are, and what their objectives and
   expectations are up front. This will allow you to establish their data
   needs and hopfully their output reguirements ( reports and graphs ).
   Note: If a graph carries the proper information, it's "look" is fairly
   easy to tailor or change later on.

b) Establish your strategic directions so that you can build the right data
   base. That is not easy to change later on.

c) While I don't recommend micro management, I do recommend putting one of
   your own programmers ( train one if you must) on the team so that that
   the knowledge base SC brings to the project will to some extent stay
   with the project over the long term.

d) The "which programmer" question is valid. Don was a specialist at building
   applications but was not a statistical consultant. Don't go off writing
   code until you know what kind of help you really need.

I hope I've helped.

Regards,
Bob
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Thu, 12 Nov 1992 12:44:35 +0100
Reply-To:     HOLLI@FRINED51.BITNET
From:         HOLLI@FRINED51.BITNET
Subject:      epi

Hi,
In the US, I used EPI lots and I was very pleased with it.  Since I moved here
with in hurry, I didn't check if there is distributer of EPI in Europe.
Please let me know if someone knows where I can get EPI in France.  If possible
I want to have a manual written in French.

Thanks in advance.

Machiko Hollifield

Institut National D'Etudes Demographiques
Paris, France
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Mailer: ELM [version 2.2 PL16]
Newsgroups: bit.listserv.sas-l
Date:         Fri, 6 Nov 1992 14:54:12 CST
Reply-To:     "(R. Snyder)" <rsnyder@LOBBY.TI.COM>
From:         "(R. Snyder)" <rsnyder@LOBBY.TI.COM>
Subject:      Re: Suggestions sought for a computation problem
Comments: To: GFX@PSUVM.PSU.EDU
Comments: cc: sas-l@uga.cc.uga.edu
              Nov 6, 92 2:18 pm

SUBJECT:   Date computations.
SUMMARY:   More info needed but, some sql code anyway.
REL/PLTF:  6.07/HP300
E-ADDR:    rsnyder@lobby.ti.com
NAME:      Bob Snyder
COMPANY:   Texas Instruments, Sherman, TX
PHONE:     (903) 868-5799
FAX:       (903) 868-7240
>
> The dataset is structured like this:
>
>         OBS  Date       x1 x2 ... xn  N_12Mo
>          1   04/12/82   1  0      1
>          2   04/21/82   1  1      0
>          3   04/28/82   0  0      1
>          .
>          .
>          .
>          K
>
> Variable N_12Mo should indicate the number of observations that are
> less than a year old. In other words, how many lines above observation K
> are less than a year old. We used the LOOKUP procedure in Microsoft Excel.
> How could it be done in SAS?
>
Stephane,

Has your date been recoded as a numeric SAS date value or is it in character
form?

If it is in character form you may do the following:

data new;

  length SASDate 8;
  informat SASDate date7.;
  format SASDate date7.;
  drop Date;
  set old;
  SASDate = input( Date, mmddyy8. );

run;

Now, to set N_12Mo:

proc sql;

  select count(*) into :N_12Mo
    from new
      where month(SASDate) lt ( month(date()) + 12 )
  ;

Now the macro variable N_12Mo contains the number of files less than 12
months old.

I hope I helped.
Bob
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Thu, 12 Nov 1992 10:34:48 CET
Reply-To:     Arnold Schick <SCHICK@DMRHRZ11.BITNET>
From:         Arnold Schick <SCHICK@DMRHRZ11.BITNET>
Subject:      Re: Thanks, new groups id values from the old one

CONTENT:  Addendum
SUMMARY:  notsorted option in MERGE, UPDATE statement
REL/PLTF: 6.04/DOS 6.07/CMS
DATE:     12. November 1992
NAME:     Arnold Schick

the 2nd program in the sent mail with the above subject does not running
in 6.07; to invoke it in 6.07, notsorted options are to remove and data
sets OLD and CALC are to sort by id.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Wed, 11 Nov 1992 10:51:00 EST
Reply-To:     BRUMME@IRISHMVS.BITNET
From:         BRUMME@IRISHMVS.BITNET
Subject:      Maximum Liklihood and PROC NLIN

I have been fooling with a way to get PROC NLIN to generate
Maximum Liklihood estimates of a CES production function.
I am assuming a normal distribution.

The idea is simple. Use METHOD=NEWTON and the first and
second derivatives from the log liklihood function in PROC NLIN.
The MODEL statement does not matter because NEWTON does not
use any information from it in the update equation.  By setting
CONVERGEPARM=10^(-8), all influence of the MODEL equation may
be removed (the convergence criterian no longer depends on SSE).
At least, I believe this to be the case.

The problem, of course, lies in the fact that the derivatives
are summations.  The summations are combinations of both
current parameter values and data values.  Ideally, there would
be a way to stop NLIN in the middle of a loop, run through the data
and, using current parameter values, calculate the summations, then
continue with the loop and calculate the derivatives.  This sounds a
lot like an ideal spot for an ARRAY.  But I can't define any from the
data set I have got, K,L,Output observations.  If I transpose the
dataset prior to entering NLIN, then I could create the ARRAY but
NLIN wouldn't know which way the observations went, it would still
assume the observations were up and down, not left to right.

The only solution I have been able to come up with is to tell
the program to only calculate the summations when _MODEL_ = 1.
That means the current pass through the data is only to find
residual values, and not to calculate derivatives.  If
_MODEL_ = 0 (meaning the derivatives are being calculated during the
current pass through the data), the program is instructed to use the
summation values as last calculated in evaluating the derivatives.

In my mind this should work, however, I am having trouble getting
even one iteration from NLIN before it says convergence criterian
met.  My immediate solution is going into IML and doing it myself,
but then I have to deal with the "STEP SIZE" and all other issues
which make nonlinear estimation cumbersome.  I would rather do it
in a canned PROC or program.

If there are any suggestions concerning either NLIN or IML (Step size)
please let me know.  Or if there is a better way to generate
Maximum liklihood estimates, Please Please let me know!

Thanks!
Daric Brummett...
BRUMME@IRISHMVS.BITNET
Newsgroups: bit.listserv.sas-l
From: randy@raven.alaska.edu (Randy Hayman)
Subject: IBM CMS FP -> VAX/VMS INT with SAS?
Reply-To: randy@raven.alaska.edu (Randy Hayman)
Organization: University of Alaska - Fairbanks
Date: Wed, 11 Nov 1992 22:41:01 GMT

Hi! 

Being as I am VAX/VMS oriented, I am having some problems with IBM CMS to VAX
VMS informats.

I have a user who would like to read an unformatted tape (written via
IBM CMS - 
meaning EBCDIC) into a standard ASCII file in VAX/VMS using SAS 6.07.  I
have been
able to successfully get the data read off the tape and converted to
ascii, or left as 
EBCDIC hex values in the VAX/VMS file.  The situation I believe - the
operative word 
here is "believe" - I am seeing is that the numeric data in the file is
of the following 
form (IBM FP format presumably):

Bit 0 (far left bit): the sign bit
Bits 1-7: mantissa (powers of 16) with bit 1 the sign bit of the mantissa
Bits 8-15: the fractional part of the FP number

My problem is the tape is old, came from a fourth party, and has a block
size of 
15812 and a Logical RECord Length of 15808.  This hasn't been a problem
as yet.

The conversion I've used to get the file from the tape to the VAX has
worked for
Text in the file because it is readable when I dump the file and view
it.

The real problem is what informat, or how do I/does he convert these FP
data to 
what he believes should be integers.  We've tried most of the informats
listed 
in the SAS manuals that we think should have worked.  

Any ideas??

Any ideas may be posted here, or sent to me directly.

Randy
sxrmh1@orca.alaska.edu
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Thu, 5 Nov 1992 13:37:04 CET
Reply-To:     Arnold Schick <SCHICK@DMRHRZ11.BITNET>
From:         Arnold Schick <SCHICK@DMRHRZ11.BITNET>
Subject:      new group id values from the old one

Hallo SAS-Lers,

here, I have a question about new naming of group-ids within a SAS data set.

One data set has an id variable, which becomes by processing through a program
new values (_numeric_). The order and the values of it are stored in the
orginal data set.

Now, how do I give the processed data set the old id-values with its order.
(the solution should be downwards compatible to SAS 6.04 (DOS) and SQL can not
be used)

Example, used IDs         data orginal;
in _character_ for          input x y id $ ;
better showing:             cards;
                          1 0 A  2 1 A  3 2 A  1 3 B  2 4 B  3 5 B
                          ;
                          * ... processing through a special program .. ;

          the processed
          data set has the form:         X   Y   ID
                                         1   0   B
                                         1.5 0.7 B
                                         2   1   B
                                         2.3 1.6 B
                                         3   2   B
                                         1   3   C
                                         1.2 3.4 C
                                         2   4   C
                                         3   5   C
                                         etc.

          and I want the orginal
          ID values in the old order:    X   Y   ID
                                         1   0   A
                                         1.5 0.7 A
                                         2   1   A
                                         2.3 1.6 A
                                         3   2   A
                                         1   2   B
                                         1.2 3.4 B
                                         2   4   B
                                         3   5   B

Can anyone assist me or give me the right directions ?

Thanks in advance

Arnold Schick  University of Marburg/Lahn
From: TWB2%RatesRDS%FAR@CTS27.CS.PGE.COM
Newsgroups: bit.listserv.sas-l
Subject: Short Fat From Wide Skinny
Date: 4 Nov 92 20:00:10 GMT
Reply-To: TWB2%RatesRDS%FAR@CTS27.CS.PGE.COM
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU

What Chas. needs is PROC TRANSPOSE.  He particularly needs it to avoid hard
coding the maximum number of events.
Organization: Penn State University
Date: Mon, 9 Nov 1992 10:36:42 EST
From: Daryl R. Hoffman <DRH4@psuvm.psu.edu>
Newsgroups: bit.listserv.sas-l
Subject: Re: thanx - simple update question

In article <SAS-L%92110914593471@AWIIMC12.IMC.UNIVIE.AC.AT>,
HOLLI@FRINED51.BITNET says:


>Now I'm testing INDEX= option in DATA set.  The variable ELEVE has sequencial
>value of student ID.  The error must have some syntax
>problem but I cannot find the clearer example in "SAS Technical Report P-222,
> 9          data promo(index=eleve); set matiere.promo;
>+                            _____
>+                            _____
>+                            _____
>                             23
>+                            23
>+                            23
> 10         endsas;

> ERROR 23-7: Invalid value for the INDEX option.
>+ERROR 23-7: Invalid value for the INDEX option.
>+ERROR 23-7: Invalid value for the INDEX option.

Statement is not in correct syntax.  Page 82 of Tech Report P-222 would show
your data statement like this:

  data promo(index=(eleve));

The syntax is similar to the WHERE data statement option and the rename option.


Daryl R. Hoffman              The Pennsylvania State University
Bitnet:   DRH4@PSUVM.BITNET   The Center for Academic Computing
Internet: DRH4@PSUVM.PSU.EDU  Sr. Appl Prog/Anal, Resource Administration
Office: (814) 865-0845        Fax: (814) 863-7049
From: retzer@convex.csd.uwm.edu (Joe J Retzer)
Newsgroups: bit.listserv.sas-l
Subject: Proc for doing Generalized Least Squares
Date: 6 Nov 92 00:30:23 GMT
Reply-To: retzer@convex.csd.uwm.edu
Organization: University of Wisconsin - Milwaukee
NNTP-Posting-Host: 129.89.7.30
Originator: retzer@convex.csd.uwm.edu

Can anyone tell me where I might find a proc (possibly in IML)
that would do Generalized Least Squares?

			 Many Thanks in advance,
			       Joe Retzer
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 10 Nov 1992 10:08:15 -0500
Reply-To:     robertso@nprdc.navy.mil
From:         "(Paul Robertson)" <robertso@NPRDC.NAVY.MIL>
Subject:      Re: Proc Freq ?
Comments: To: CRSTAT03%TS1A@TS9.TEALE.CA.GOV
Comments: cc: SAS-L@uga.cc.uga.edu

This could be effected in the following manner:

proc sort ;
     by co_name;

Data t;
     set x;
     by co_name;
     if first.co_name then count = 0;
     count + 1;
     if last.co_name;

proc print data=t;
     var co_name count;
From: SKPWORK@SUVM.BITNET (Sanjay K. Pandey)
Newsgroups: bit.listserv.sas-l
Subject: reshaping raw data ...
Date: 8 Nov 92 02:52:25 GMT
Reply-To: "Sanjay K. Pandey" <SKPWORK@SUVM.BITNET>
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU

Fellow SAS-lers:

   I am stumped on how to do the following with some raw data
I have.  I would be grateful for any advice on how to accomplish
this task.

I have a dataset of the following form which I wish to transform:

         ORIGINAL                   TRANSFORMED

    ID    X1  X2 X3 X4 X5       ID  X1 X2 X3  X4 X5

    1     1   .  2  .  .        1   1   3  2   4  .
    1     .   3  .  4  .        2   1   2  3   .  4
    1     .   .  .  .  .        3   1   .  .   .  .
    2     1   2  3  .  .
    2     .   .  .  .  4
    3     1   .  .  .  .

 X1 to X5 are measures on a given ID and they are recorded as
 separate observations.  I want to read a particular ID value
 as one observation.  For a given ID there is only
 one non-missing value for x1-x5.

 Thanks
 sanjay
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
From: NASSER@UMSLVMA.BITNET (David Nasser)
Newsgroups: bit.listserv.sas-l
Subject: MVS Transport Lib running 6.07???
Date: 6 Nov 92 01:29:50 GMT
Reply-To: David Nasser <NASSER@UMSLVMA.BITNET>
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU

Content   : Question
Summary   : MVS Transport Lib running 6.07??
System(s) : MVS/ESA/SAS6.07
Name      : David Nasser

Am I supposed to be able to write an MVS SAS transport *library* to
disk running SAS6.07?

I thought it was as simple as allocating the transport library
and writing numerous members (type "data") to it.

But after I run something like:

 //YR1 DD DSN=YEAR1,UNIT=CART,DISP=OLD
 //YR2 DD DSN=YEAR2,UNIT=CART,DISP=OLD
 .
 .
 //YR8 DD DSN=YEAR8,UNIT=CART,DISP=OLD
 //TRANS DD DSN=TRANS,DISP=OLD,DCB=(RECFM=FB,LRECL=80,BLOCKSIZE=8000)

LIBNAME TRANS XPORT 'TRANS';
DATA TRANS.YR1;
 SET YR1.YEAR1;
  KEEP thisun thatun;
.
.
DATA TRANS.YR8;
 SET YR8.YEAR8;
  KEEP thisun thatun;

CONTENTS tells me that the only member in the lib is TRANS.YR8. Per
the LOG, all 8 were written, hence they were writing over one-another?

I know that this sort of thing was practical to do running _some_
version of SAS on *some* platform, tho I recognize that many of my
brain cells may have self-destructed in the interim. Seems I assumed
that it is practical running MVS/SAS6.07.

But how do you spell a-s-s-u-m-e???

  Prosit,

David Nasser                              NASSER@UMSLVMA
St. Louis, Mo                             NASSER@UMSLVMA.UMSL.EDU

"One dyin' and a-buryin',
 one dyin' and a-buryin',
 some cryin', six carryin'
 me.
 I want to be free."
   -Roger Miller, who passed away last week
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Return-Path: <phil@wubios>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: bit.listserv.sas-l
Date:         Wed, 11 Nov 1992 21:46:16 CST
Reply-To:     "(J. Philip Miller)" <phil@WUBIOS.WUSTL.EDU>
From:         "(J. Philip Miller)" <phil@WUBIOS.WUSTL.EDU>
Subject:      Re[2]: Window License Fee Schedule (fwd)
Comments: To: "(SAS Mailing List)" <SAS-L@ohstvma.ircc.ohio-state.edu>

> Question:
>
> Is there any mention of Windows for workgroups or Windows NT (SERVER
> BASED SAS) in the pricing document? Large shops will likely find
> such an arrangement economically desirable..   (INSIDER NEWS:
> SCUTTLEBUT HAS IT THAT CERTAIN SOFTWARE COMPANIES BE DEMO-ING on NT
> on an Intel PENTIUM MICROPROCESSOR BASED PLATFORM at the MS Booth at
> FALL COMDEX NEXT WEEK)
>
SI has indicated that it will support Windows NT on the Intel platform (I
don't recall any statement that they would support it on DEC's Alpha to answer
an earlier private question).  The time schedule for this is dependent on when
MicroSoft really starts delivering NT.  Currently, although there are
development versions of NT available, the delivery schedule seems to keep
slipping (why am I not suprised :-).

As far as I understand Windows for WorkGroups, there is no reason why the SAS
for Windows will not run fine in that environment.  So far SI has not been
good at providing multiuser functionality for low end multiuser environments,
e.g. SAS/SHARE is not supported under Unix so I am not sure that there will be
good facilities for record locking, etc.  However, using SAS/ACCESS one can
access data via other DBMS's which might in turn support such facilities.

-phil

--
     J. Philip Miller, Professor, Division of Biostatistics, Box 8067
	 Washington University Medical School, St. Louis MO 63110
     phil@wubios.WUstl.edu - Internet  (314) 362-3617 [362-2694(FAX)]
From: TWB2%RatesRDS%FAR@CTS27.CS.PGE.COM
Newsgroups: bit.listserv.sas-l
Subject: Usage Notes and ZAPS
Date: 4 Nov 92 17:54:09 GMT
Reply-To: TWB2%RatesRDS%FAR@CTS27.CS.PGE.COM
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU

It is not clear what role Ms. Muller has at her site.  At our site, the
official SAS consultant has systems programmer authority; she can apply zaps.
She is not a heavy SAS user.  The users tend to discover problems, get zap
numbers from SAS, and request installation of the zaps.
  Please, assuming TSNEWS-L is a SAS tech support list, publish its full name
so that I can subscribe.
  Usage notes: Ugh!  A complete copy is useless--too big to pick up.  Since it
is a SAS dataset, I picked only the obs for MVS and 6.07, then printed it in
batch and routed that around my section.  It would be nice to run ZyIndex
against it, but many things would be nice and there is so little time...
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Encoding: 60 TEXT
X-Mailer: Microsoft Mail V3.0 (beta-2)
Newsgroups: bit.listserv.sas-l
Date:         Mon, 9 Nov 1992 16:36:00 EST
Reply-To:     rjf2@PHPDLS1.EM.CDC.GOV
From:         rjf2@PHPDLS1.EM.CDC.GOV
Subject:      Using GET SAS with files written by SAS
Comments: To: SAS-L@uga.cc.uga.edu

Question: ????????????????????????????????????????????????????????????????:
Reply-To:     "F.J.Kelley" <CMSFJK@uga.cc.uga.edu>
Subject:      Using GET SAS with files written by SAS V 6.xx
VERSION:  SAS 6.07
OP/SYS    CMS

Problem: Using the SPSS "GET SAS" Command with files written with SAS 6

Hello, Net...
I haven't seen any mention of this, so perhaps others are not having
this problem:
  Using the GET SAS command on a file written with SAS V 5.xx works
  (usually) just as advertised....BUT...I have been having problems
  with SAS files created with SAS 6.07 (the V 5 engine is specified).
  PROC CONTENTS in 6.07 recognizes this as a SAS V 5 file, as does
  PROC CONTENTS in 5.18.  SPSS fails with an I/O error on it, however.
  Anyone else had this problem?  I should add that the same tests done
  on MVS/TSO ran without any trouble.  One (possibly) interesting
  addendum: the filelist descriptors show 2 records for the
  "real" SAS v 5 library but only 1 for the library written with
   SAS 6 (V 5 engine)???  Is SAS doing something odd here? am I?
   Is my system?  Many thanks in advance.
--Joe Kelley

Response: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:
content      : Response
summary      : problem with other dbms reading SAS V6.06
rlse/platform: V6.07 / MVS
Ron Fehd     :                SMTP:BitNet:    <rjf2@phpdls1.em.cdc.gov>
              Centers for Disease Control
              1600 Clifton Rd  MS:G25         FAX  : 404/639-1778
              Atlanta, GA 30333  USA          phone: 404/639-1707

At CDC *others* (not me!) use SUDAAN. After our upgrade from V5.18 to V6.06
we had several problems:

* SUDAAN would not read V6.06

we got a fix for that.

* then it would not read a V5.18 SSD created by V6.06

Your comment jogs my memory to the fact that in V6.++ there is header
information that tells SAS which version it is stored as and which version
created it.

happy crunching!*!*!
From: GFX@psuvm.psu.edu
Newsgroups: bit.listserv.sas-l
Subject: Suggestions sought for a computation problem
Date: 6 Nov 92 19:18:15 GMT
Organization: Penn State University

Hi!

The dataset is structured like this:

        OBS  Date       x1 x2 ... xn  N_12Mo
         1   04/12/82   1  0      1
         2   04/21/82   1  1      0
         3   04/28/82   0  0      1
         .
         .
         .
         K



Variable N_12Mo should indicate the number of observations that are
less than a year old. In other words, how many lines above observation K
are less than a year old. We used the LOOKUP procedure in Microsoft Excel.
How could it be done in SAS?

Thanks,

Stephane
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Wed, 4 Nov 1992 11:39:17 PST
Reply-To:     "(Claire Castell)" <Claire.Castell@EBAY.SUN.COM>
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

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.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU