<?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: calculate mean for specific period in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687635#M79586</link>
    <description>&lt;P&gt;I suspect the problem is more general than you stated. To calculate the one mean is very simple, but again I'm guessing the real problem is a larger data set with many means being calculated. In that case, it's not clear why the mean that gets placed next to 2020-01-13 is the mean of 2020-01-02 through 2020-01-06, and what other means gets calculated from what time periods. Can you explain further?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:12:46 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-29T19:12:46Z</dc:date>
    <item>
      <title>calculate mean for specific period</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687632#M79585</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I want to calculate a mean for a specific day for example here 13-01-2020 using observation 02-01-2020 and 06-01-2020&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data ind;&lt;BR /&gt;input gvkey datadate : yymmdd10. TRT1M;&lt;BR /&gt;format date yymmdd10.;&lt;BR /&gt;cards;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1 2020-01-02 -1.35&lt;BR /&gt;1 2020-01-03 -1.48&lt;BR /&gt;1 2020-01-06 2.40&lt;BR /&gt;1 2020-01-07 -0.85&lt;BR /&gt;1 2020-01-08 -0.24&lt;BR /&gt;1 2020-01-09 2.49&lt;BR /&gt;1 2020-01-10 1.68&lt;BR /&gt;1 2020-01-13 -1.69&amp;nbsp;&amp;nbsp;&lt;BR /&gt;1 2020-01-14 -0.91&lt;BR /&gt;1 2020-01-15 -0.93&lt;BR /&gt;1 2020-01-16 2.71&lt;BR /&gt;1 2020-01-17 -0.05&lt;BR /&gt;1 2020-01-20 1.69&lt;BR /&gt;1 2020-01-21 -3.64&lt;BR /&gt;1 2020-01-22 1.24&lt;BR /&gt;1 2020-01-23 -2.05&lt;BR /&gt;1 2020-01-24 -2.97&lt;BR /&gt;1 2020-01-27 -0.78&lt;BR /&gt;1 2020-01-28 3.09&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output that I want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;gvkey datadate&amp;nbsp;TRT1M wantedmean&lt;/P&gt;
&lt;P&gt;1 2020-01-02 -1.35&lt;BR /&gt;1 2020-01-03 -1.48&lt;BR /&gt;1 2020-01-06 2.40&lt;BR /&gt;1 2020-01-07 -0.85&lt;BR /&gt;1 2020-01-08 -0.24&lt;BR /&gt;1 2020-01-09 2.49&lt;BR /&gt;1 2020-01-10 1.68&lt;BR /&gt;1 2020-01-13 -1.69&amp;nbsp;-0,14&lt;BR /&gt;1 2020-01-14 -0.91&lt;BR /&gt;1 2020-01-15 -0.93&lt;BR /&gt;1 2020-01-16 2.71&lt;BR /&gt;1 2020-01-17 -0.05&lt;BR /&gt;1 2020-01-20 1.69&lt;BR /&gt;1 2020-01-21 -3.64&lt;BR /&gt;1 2020-01-22 1.24&lt;BR /&gt;1 2020-01-23 -2.05&lt;BR /&gt;1 2020-01-24 -2.97&lt;BR /&gt;1 2020-01-27 -0.78&lt;BR /&gt;1 2020-01-28 3.09&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687632#M79585</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-09-29T18:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculate mean for specific period</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687635#M79586</link>
      <description>&lt;P&gt;I suspect the problem is more general than you stated. To calculate the one mean is very simple, but again I'm guessing the real problem is a larger data set with many means being calculated. In that case, it's not clear why the mean that gets placed next to 2020-01-13 is the mean of 2020-01-02 through 2020-01-06, and what other means gets calculated from what time periods. Can you explain further?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687635#M79586</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-29T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculate mean for specific period</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687636#M79587</link>
      <description>&lt;P&gt;here the problem is just to calculate one mean when fixing just one interval&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687636#M79587</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-09-29T19:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculate mean for specific period</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687644#M79588</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=ind(where=('02JAN2020'd&amp;lt;=datadate&amp;lt;='06JAN2020'd));
	var trt1m;
	output out=_stats_(drop=_:) mean=mean;
run;
data want;
	if _n_=1 then set _stats_;
	set ind;
	if datadate='13JAN2020'd then wantedmean=mean; 
	drop mean;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-mean-for-specific-period/m-p/687644#M79588</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-29T19:31:30Z</dc:date>
    </item>
  </channel>
</rss>

