<?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: Descriptive Statistics issues in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346530#M79930</link>
    <description>&lt;P&gt;Look at Proc expand. We don't need actual data, sample data that reflects your situation.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Apr 2017 21:30:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-04-02T21:30:54Z</dc:date>
    <item>
      <title>Descriptive Statistics issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346521#M79926</link>
      <description>&lt;P&gt;Hello Everyone here. It's my first day to show up here with a problem.&lt;BR /&gt;I have made some deciles (10 groups) into my data using following procedures;&lt;/P&gt;&lt;P&gt;proc rank data=mydata.descriptive out=results group=10 ties=low;&lt;BR /&gt;by year month;&lt;BR /&gt;var CR;&lt;BR /&gt;ranks CRRank;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next i calculated their median values by follwoing codes:&lt;/P&gt;&lt;P&gt;proc summary median data=results;&lt;BR /&gt;var BM Prc ;&lt;BR /&gt;by CRRANK;&lt;BR /&gt;output out=Desc n=ht_n median=ht_median std=ht_sd; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I wanna calculate these median for var = BM and PRC for next period (t+1). I have year and month variables in my data and portfolios are made every month. so for portfolio made in january i want to calculate median of BM from its february value. and then i want to make mean of these median values in each group. may be using something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc summary mean data=results;&lt;BR /&gt;var BM Prc ;&lt;BR /&gt;by CRRANK;&lt;BR /&gt;output out=Desc n=ht_n mean=ht_median std=ht_sd; run;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be grateful if you can make some suggestions.&lt;BR /&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 19:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346521#M79926</guid>
      <dc:creator>Kyojik</dc:creator>
      <dc:date>2017-04-02T19:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Descriptive Statistics issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346522#M79927</link>
      <description>&lt;P&gt;I'm not following your logic. Some sample data and expected output will help illustrate your problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 20:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346522#M79927</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-02T20:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Descriptive Statistics issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346528#M79929</link>
      <description>&lt;P&gt;Yes unfortunately its hard to follow because of my bad instructions.&lt;BR /&gt;I have no idea how to put data here its really big in many GB.&lt;BR /&gt;I thought about another thing. Creating one month lead of my variables (BM Prc). Deciles&amp;nbsp; are already there. I can make median of that.&lt;BR /&gt;by using following codes.&lt;BR /&gt;proc summary median data=results;&lt;BR /&gt;var BM Prc ;&lt;BR /&gt;by CRRANK;&lt;BR /&gt;output out=Desc n=ht_n median=ht_median std=ht_sd; run;&lt;BR /&gt;now I have only one issue left. how can I take mean of all these medians in each group ? for each variable (BM, PRC)?&lt;BR /&gt;proc means;&lt;BR /&gt;var BM PRC;&lt;BR /&gt;BY CRRANK; run;&lt;BR /&gt;The issue is I donot know how can I export above median results into one sas table with lead values. so that I can use these codes to get mean.&lt;BR /&gt;does this make any sense?&lt;BR /&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 20:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346528#M79929</guid>
      <dc:creator>Kyojik</dc:creator>
      <dc:date>2017-04-02T20:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Descriptive Statistics issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346530#M79930</link>
      <description>&lt;P&gt;Look at Proc expand. We don't need actual data, sample data that reflects your situation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 21:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descriptive-Statistics-issues/m-p/346530#M79930</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-02T21:30:54Z</dc:date>
    </item>
  </channel>
</rss>

