<?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 - Get the Remaining two Sample by Using Proc Surveyselect? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329353#M73676</link>
    <description>&lt;P&gt;yes that would work, or more compactly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data out_75 out_25;
   set want1;
   if selected = 1 then output out_75;
   else output out_25;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Feb 2017 10:22:40 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-02-02T10:22:40Z</dc:date>
    <item>
      <title>How to - Get the Remaining two Sample by Using Proc Surveyselect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329339#M73667</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get sample of data when I use the Proc Surveyselect procedure but I can just one part of sample I want to get both part of data being sample data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a sample data as below(I'm just created) When use Proc SurveySelect procedure I can get %75 of data I also want to get the remaining %25 as data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can somebody help me, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Have;
Length ID 8 Target 8;
Infile Datalines Missover;
Input ID Target;
Datalines;
1 1
2 0
3 1
4 0
5 1
6 1
7 1
8 1
9 0
10 1
11 0
12 0
13 1
14 0
15 0
;
Run;

Proc Surveyselect Data=Have 
	Out=Want1
	Method=Srs
	Rate=%Sysevalf(75/100);
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 09:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329339#M73667</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2017-02-02T09:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to - Get the Remaining two Sample by Using Proc Surveyselect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329344#M73669</link>
      <description>&lt;P&gt;If I understand your question correctly, you can use the outall option to achieve this, by writing your code as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Have;
Length ID 8 Target 8;
Infile Datalines Missover;
Input ID Target;
Datalines;
1 1
2 0
3 1
4 0
5 1
6 1
7 1
8 1
9 0
10 1
11 0
12 0
13 1
14 0
15 0
;
Run;

Proc Surveyselect Data=Have 
	Out=Want1 outall
	Method=Srs
	Rate=%Sysevalf(75/100);
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;, and then splitting up the want1 dataset by the selection indicator variable that now appears in your data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 09:58:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329344#M73669</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-02-02T09:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to - Get the Remaining two Sample by Using Proc Surveyselect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329349#M73673</link>
      <description>&lt;P&gt;Then like this-&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA out_75;
 set Want1(where=(Selected=1));
run;
DATA out_25;
 set Want1(where=(Selected=0));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 10:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329349#M73673</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2017-02-02T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to - Get the Remaining two Sample by Using Proc Surveyselect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329353#M73676</link>
      <description>&lt;P&gt;yes that would work, or more compactly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data out_75 out_25;
   set want1;
   if selected = 1 then output out_75;
   else output out_25;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 10:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Get-the-Remaining-two-Sample-by-Using-Proc-Surveyselect/m-p/329353#M73676</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-02-02T10:22:40Z</dc:date>
    </item>
  </channel>
</rss>

