<?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: Do mean calculation based on 2nd data time range in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Do-mean-calculation-based-on-2nd-data-time-range/m-p/12239#M170</link>
    <description>You could solve this programmatically by&lt;BR /&gt;
&lt;BR /&gt;
a) putting DATA1 into a hash with TIME as key&lt;BR /&gt;
b) iterate over DATA2 using both time values to find the relevant hash elements and doing the mean calculation&lt;BR /&gt;
&lt;BR /&gt;
Others having SAS at their hands might chime in with some ready-to-use code.&lt;BR /&gt;
&lt;BR /&gt;
(Note that this solution largely depends on the size of DATA1. If it is a very big dataset consider defining/using DATA1 as a dataset indexed on TIME).</description>
    <pubDate>Wed, 06 Oct 2010 08:41:45 GMT</pubDate>
    <dc:creator>Robert_Bardos</dc:creator>
    <dc:date>2010-10-06T08:41:45Z</dc:date>
    <item>
      <title>Do mean calculation based on 2nd data time range</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Do-mean-calculation-based-on-2nd-data-time-range/m-p/12238#M169</link>
      <description>Data1&lt;BR /&gt;
&lt;BR /&gt;
time   x    y&lt;BR /&gt;
11:00  2   3 &lt;BR /&gt;
11:03 4    5&lt;BR /&gt;
11:07  10 30&lt;BR /&gt;
12:00  30 20&lt;BR /&gt;
12:03  21 4&lt;BR /&gt;
..............&lt;BR /&gt;
&lt;BR /&gt;
Data2&lt;BR /&gt;
TimeStart TimeEnd&lt;BR /&gt;
11:00       11:07&lt;BR /&gt;
11:03       12:00&lt;BR /&gt;
12:00       12:03&lt;BR /&gt;
....................&lt;BR /&gt;
&lt;BR /&gt;
Want to get results&lt;BR /&gt;
TimeStart TimeEnd    MeanX   meanY&lt;BR /&gt;
11:00       11:07         ?          ?&lt;BR /&gt;
11:03       12:00          ?         ?&lt;BR /&gt;
12:00       12:03         ?          ?&lt;BR /&gt;
............................</description>
      <pubDate>Tue, 05 Oct 2010 19:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Do-mean-calculation-based-on-2nd-data-time-range/m-p/12238#M169</guid>
      <dc:creator>JeffNCSU</dc:creator>
      <dc:date>2010-10-05T19:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Do mean calculation based on 2nd data time range</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Do-mean-calculation-based-on-2nd-data-time-range/m-p/12239#M170</link>
      <description>You could solve this programmatically by&lt;BR /&gt;
&lt;BR /&gt;
a) putting DATA1 into a hash with TIME as key&lt;BR /&gt;
b) iterate over DATA2 using both time values to find the relevant hash elements and doing the mean calculation&lt;BR /&gt;
&lt;BR /&gt;
Others having SAS at their hands might chime in with some ready-to-use code.&lt;BR /&gt;
&lt;BR /&gt;
(Note that this solution largely depends on the size of DATA1. If it is a very big dataset consider defining/using DATA1 as a dataset indexed on TIME).</description>
      <pubDate>Wed, 06 Oct 2010 08:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Do-mean-calculation-based-on-2nd-data-time-range/m-p/12239#M170</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2010-10-06T08:41:45Z</dc:date>
    </item>
  </channel>
</rss>

