<?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: How to have a varying sample size in PROC surveyselect. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255605#M57077</link>
    <description>&lt;P&gt;Sorry for the lack of details. &amp;nbsp;It is currently being run in SAS EG on our companies UNIX envrionment. &amp;nbsp;I am new to SAS programming and not sure all the correct terms. &amp;nbsp;It is executed from an auto file that kicks off automatically.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2016 18:28:19 GMT</pubDate>
    <dc:creator>Sotarkadin</dc:creator>
    <dc:date>2016-03-09T18:28:19Z</dc:date>
    <item>
      <title>How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255598#M57075</link>
      <description>&lt;P&gt;I am currently using PROC surveyselect to pull a random sample from a data set using this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data= out.care_statement_all_q&amp;amp;rptqtr. 
method=srs n=60 out=out.care_statement_q&amp;amp;rptqtr.; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to set the size as a range. &amp;nbsp;Every run the user would like a varying sample size between 60-70. &amp;nbsp; This is part of an automated process so I would like there to be no manual involvement.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 17:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255598#M57075</guid>
      <dc:creator>Sotarkadin</dc:creator>
      <dc:date>2016-03-09T17:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255603#M57076</link>
      <description>&lt;P&gt;What environment is the user using to run the code? Base SAS, Enterprise Guide, something else?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 18:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255603#M57076</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-09T18:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255605#M57077</link>
      <description>&lt;P&gt;Sorry for the lack of details. &amp;nbsp;It is currently being run in SAS EG on our companies UNIX envrionment. &amp;nbsp;I am new to SAS programming and not sure all the correct terms. &amp;nbsp;It is executed from an auto file that kicks off automatically.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 18:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255605#M57077</guid>
      <dc:creator>Sotarkadin</dc:creator>
      <dc:date>2016-03-09T18:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255608#M57078</link>
      <description>&lt;P&gt;Create 11 fake strata in your data&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fakeStrataCare;
set out.care_statement_all_q&amp;amp;rptqtr.;
do stratum=60 to 70;
	output;
	end;
run;&lt;BR /&gt;&lt;BR /&gt;proc sort data=fakeStrataCare; by stratum; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and call proc surveyselect with a different sample size for each stratum&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data= fakeStrataCare 
method=srs n=(60 61 62 63 64 65 66 67 68 69 70) out=out.care_statement_q&amp;amp;rptqtr.; 
strata stratum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 18:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255608#M57078</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-03-09T18:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255711#M57090</link>
      <description>&lt;P&gt;Make a random macro variable :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=%sysevalf(%sysfunc(rand(uniform))*10+60,i);
%put NOTE: n=&amp;amp;n;

proc surveyselect ............... n=&amp;amp;n ........&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 01:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255711#M57090</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-10T01:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255910#M57097</link>
      <description>&lt;P&gt;Thank you so much Ksharp. &amp;nbsp;This worked perfectly and is simple for what I am doing. &amp;nbsp;Could you explain it a bit so if I never needed to use this again but for varying sample size. &amp;nbsp;Like if I need between 30-40 how would I change the numbers.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 19:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255910#M57097</guid>
      <dc:creator>Sotarkadin</dc:creator>
      <dc:date>2016-03-10T19:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to have a varying sample size in PROC surveyselect.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255986#M57107</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;n&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token macroname"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;rand&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;uniform&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;10&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;+3&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int(rand('uniform')*10) &amp;nbsp;will generate the random number &amp;nbsp;0,1,2,3,4,5,6,7,8,9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here 10 is the range &amp;nbsp;between 30 and 40 .&lt;/P&gt;
&lt;P&gt;here 30 is the base of range(or left value of range) &amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 01:13:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-a-varying-sample-size-in-PROC-surveyselect/m-p/255986#M57107</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-11T01:13:35Z</dc:date>
    </item>
  </channel>
</rss>

