<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: product of a series in sas? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67617#M19358</link>
    <description>I have multiple observations of different event ranges and I would like to multiply variables in each event range conditional on the given observation [similar to using PROC MEANS and summing a variable] but instead of summing, I would like to multiply the variable.</description>
    <pubDate>Fri, 02 Jan 2009 22:16:30 GMT</pubDate>
    <dc:creator>question_on_how_to_find_a_product_of_a_</dc:creator>
    <dc:date>2009-01-02T22:16:30Z</dc:date>
    <item>
      <title>product of a series in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67615#M19356</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Does anyone happen to know how to find a product of a series in sas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
OC</description>
      <pubDate>Fri, 02 Jan 2009 19:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67615#M19356</guid>
      <dc:creator>question_on_how_to_find_a_product_of_a_</dc:creator>
      <dc:date>2009-01-02T19:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: product of a series in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67616#M19357</link>
      <description>You'll need to be more specific.  What kind of series?  What kind of data?  Do you have an example?</description>
      <pubDate>Fri, 02 Jan 2009 21:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67616#M19357</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-01-02T21:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: product of a series in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67617#M19358</link>
      <description>I have multiple observations of different event ranges and I would like to multiply variables in each event range conditional on the given observation [similar to using PROC MEANS and summing a variable] but instead of summing, I would like to multiply the variable.</description>
      <pubDate>Fri, 02 Jan 2009 22:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67617#M19358</guid>
      <dc:creator>question_on_how_to_find_a_product_of_a_</dc:creator>
      <dc:date>2009-01-02T22:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: product of a series in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67618#M19359</link>
      <description>The direct approach is to use the RETAIN statement, with the BY statement to designate the groupings.  See&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000214163.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000214163.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
for an example of using RETAIN.  Something like&lt;BR /&gt;
&lt;BR /&gt;
DATA rawdata;&lt;BR /&gt;
INPUT group value;&lt;BR /&gt;
DATALINES;&lt;BR /&gt;
1 1&lt;BR /&gt;
1 2&lt;BR /&gt;
1 3&lt;BR /&gt;
2 4&lt;BR /&gt;
2 5&lt;BR /&gt;
2 6&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA products;&lt;BR /&gt;
SET rawdata;&lt;BR /&gt;
BY group;&lt;BR /&gt;
RETAIN Prod;&lt;BR /&gt;
IF first.group THEN prod=1;&lt;BR /&gt;
prod=prod*value;&lt;BR /&gt;
IF last.group THEN OUTPUT;&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 03 Jan 2009 17:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67618#M19359</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-01-03T17:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: product of a series in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67619#M19360</link>
      <description>An indirect approach for non-zero numbers is the log transformation. Use PROC MEANS for sum(log(|x|)) and sum(x&amp;lt;0), then prod(x) = (-1)^sum(x&amp;lt;0) * e^sum(log(|x|)).</description>
      <pubDate>Sat, 03 Jan 2009 17:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/product-of-a-series-in-sas/m-p/67619#M19360</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-03T17:23:47Z</dc:date>
    </item>
  </channel>
</rss>

