Date: Wed, 15 Apr 1998 21:54:26 +0100
Reply-To: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Organization: Crawford Software Consultancy Limited
Subject: Re: Cummulative product
Content-Type: text/plain; charset=iso-8859-1
In article <35356D2C.57FF@nexo.es>, Toni Monleon <amonleong@nexo.es>
writes
>Hi all.
>
>You can try the option RETAIN in the data step to generate a
>new variable that contains the cumulative product or any
>cumulative function you want to define.
>
>Try something like this:
>
>data a;
>set yourdata;
by firm year;
>retain cumprod 1;*the initial value is 1;
if first.year then cumprod = amount;
else
>cumprod=cumprod*yourvar;
>run;
>
>
>Have a nice day.
>
>
>
>Hasta luego lucas.
>
>Lloreng Badiella
>Professor Associat
>Departament de Matematiques
>Universitat Autonoma de Barcelona
In other words, answering your original question
--- NO there isn't a statistic offered by SAS in proc means
as the cumulative product or geometric mean.
--
Peter Crawford
|