<?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 generate a sample with unequal inclusion probabilities depending on several variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214097#M11552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems you are simulating data , Rick might have a good idea. Post it IML forum might be a good choice.&lt;/P&gt;&lt;P&gt;and As my opinion , maybe you could use option SAMPLERATE of proc selectsurvey. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 13:11:19 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2015-05-13T13:11:19Z</dc:date>
    <item>
      <title>How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214096#M11551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm about to create a survey and the sample consists of 5,000 people from a much larger population.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample can't be just a random draw, because some values for the variables x1 to x4 must be prioritized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x1&lt;/STRONG&gt; may take any out of 15 different values, and when x1=b the inclusion probability must be higher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x2&lt;/STRONG&gt; may take any out of 4 different values, and when x2=1 the inclusion probability must be higher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x3&lt;/STRONG&gt; is binary (0,1) so when x3=1 the inclusion probability must be higher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x4&lt;/STRONG&gt; is may take any value out of 5 different values, and when x4=q the inclusion probability must be higher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see from the amount of categories there are a lot of strata (in the hundreds).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This shouldn't be too complicated through &lt;STRONG&gt;proc surveyselect&lt;/STRONG&gt; and a couple of lines of code, but I don't seem to pull it off. I used a workaround instead, but I'd love to know how to do this type of stratified sampling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214096#M11551</guid>
      <dc:creator>oskarseriksson</dc:creator>
      <dc:date>2015-05-13T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214097#M11552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems you are simulating data , Rick might have a good idea. Post it IML forum might be a good choice.&lt;/P&gt;&lt;P&gt;and As my opinion , maybe you could use option SAMPLERATE of proc selectsurvey. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214097#M11552</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-13T13:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214098#M11553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xia, and thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the SAMPRATE=() option, and then I must specify as many rates as there are strata, and I have several hundred strata. It makes it quite tedious. Maybe there's a way around that, too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214098#M11553</guid>
      <dc:creator>oskarseriksson</dc:creator>
      <dc:date>2015-05-13T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214099#M11554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to documentation , you can make a table contain this rate and feed it to SAMPLERATE= .&lt;/P&gt;&lt;P&gt;E.X.&lt;/P&gt;&lt;P&gt;table&amp;nbsp; R:&lt;/P&gt;&lt;P&gt;F 0.8&lt;/P&gt;&lt;P&gt;M 0.1&lt;/P&gt;&lt;P&gt;U 0.1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc selectsurvey&amp;nbsp; &lt;STRONG&gt;SAMPLERATE=R&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214099#M11554</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-13T14:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214100#M11555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch, I'll try that and let you know if it solved the problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 15:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214100#M11555</guid>
      <dc:creator>oskarseriksson</dc:creator>
      <dc:date>2015-05-13T15:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214101#M11556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't post non-IML content to the SAS/IML Forum.&amp;nbsp; If you want to get my opinion, just mention &lt;A __default_attr="129106" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; in the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By coincidence, I blogged about stratified sampling this morning.&amp;nbsp; It's much simpler thanthe OP's question, but it might be a good place to start: &lt;A href="http://blogs.sas.com/content/iml/2015/05/13/sampling-hierarchical-data.html" title="http://blogs.sas.com/content/iml/2015/05/13/sampling-hierarchical-data.html"&gt;http://blogs.sas.com/content/iml/2015/05/13/sampling-hierarchical-data.html&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 20:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214101#M11556</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-05-13T20:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214102#M11557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know how to answer my question, I'd be very grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I liked your blogpost - didn't know about the cluster function!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 12:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214102#M11557</guid>
      <dc:creator>oskarseriksson</dc:creator>
      <dc:date>2015-05-26T12:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a sample with unequal inclusion probabilities depending on several variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214103#M11558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not an expert in survey sampling methods, but I recommend reading the SURVEYSELECT documentation, especially &lt;A href="http://support.sas.com/documentation/cdl/en/statug/66859/HTML/default/viewer.htm#statug_surveyselect_details04.htm"&gt;the PPS methods&lt;/A&gt;. The procedure supports 13 standard sampling schemes. If none of them suit your needs, you can use the N=&amp;nbsp; option on the PROC SURVEYSELECT statement to specify your own stratum sample sizes by specifying &lt;SPAN class="phrase AAargument"&gt;values&lt;/SPAN&gt; or by specifying the name of a &lt;SPAN class="phrase AAargument"&gt;SAS-data-set that supplies the sample sizes.&amp;nbsp; You can also use the ALLOC= option on the STRATA statement to specify values or the name of a SAS data set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="phrase AAargument"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="phrase AAargument"&gt;The example for Dollar-Unit sampling might also be of interest: &lt;A href="http://support.sas.com/documentation/cdl/en/statug/66859/HTML/default/viewer.htm#statug_surveyselect_examples03.htm" title="http://support.sas.com/documentation/cdl/en/statug/66859/HTML/default/viewer.htm#statug_surveyselect_examples03.htm"&gt;SAS/STAT(R) 13.1 User's Guide&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-a-sample-with-unequal-inclusion-probabilities/m-p/214103#M11558</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-05-26T16:58:58Z</dc:date>
    </item>
  </channel>
</rss>

