<?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 Random Sample taken from a balanced panel in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391093#M20399</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large&lt;STRONG&gt; balanced panel&amp;nbsp;&lt;/STRONG&gt;of clients (each client is present in each period). I would like to take a random sample by randomly picking the client and keeping information for all years for that client.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the easiest way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;K.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 26 Aug 2017 20:14:39 GMT</pubDate>
    <dc:creator>GKati</dc:creator>
    <dc:date>2017-08-26T20:14:39Z</dc:date>
    <item>
      <title>Random Sample taken from a balanced panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391093#M20399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large&lt;STRONG&gt; balanced panel&amp;nbsp;&lt;/STRONG&gt;of clients (each client is present in each period). I would like to take a random sample by randomly picking the client and keeping information for all years for that client.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the easiest way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;K.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 20:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391093#M20399</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2017-08-26T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sample taken from a balanced panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391094#M20400</link>
      <description>&lt;P&gt;1) Create a list of all the clients (proc SQL)&lt;/P&gt;
&lt;P&gt;2) select a sample of clients (proc surveyselect)&lt;/P&gt;
&lt;P&gt;3) extract all data for those sample clients (proc SQL)&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 21:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391094#M20400</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-08-26T21:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sample taken from a balanced panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391096#M20401</link>
      <description>&lt;P&gt;How exactly do I do 3. in SQL? I can just extract based on a list of client numbers in another database?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 21:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391096#M20401</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2017-08-26T21:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sample taken from a balanced panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391098#M20402</link>
      <description>&lt;P&gt;Assuming that step 2 results in a table called sampleClients, do something like :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table samplePanel as
select * 
from myPanelData
where clientId in (select clientID from sampleClients);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Aug 2017 22:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391098#M20402</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-08-26T22:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sample taken from a balanced panel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391109#M20404</link>
      <description>&lt;P&gt;Actually, there is a simpler way to do this using surveyselect. The trick is to do cluster sampling&amp;nbsp;using the client as the cluster:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data panel;
do clientID = 1 to 20;
    do period = 1 to 10;
        value + 1;
        output;
        end;
    end;
run;

proc surveyselect data=panel out=panelSample sampsize=10 seed=868585;
samplingunit clientID;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Aug 2017 02:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Random-Sample-taken-from-a-balanced-panel/m-p/391109#M20404</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-08-27T02:56:07Z</dc:date>
    </item>
  </channel>
</rss>

