<?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: Stacking matched controls under respective cases in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252658#M6807</link>
    <description>&lt;P&gt;Thanks. Can you give me the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2016 05:40:33 GMT</pubDate>
    <dc:creator>wajmsu</dc:creator>
    <dc:date>2016-02-26T05:40:33Z</dc:date>
    <item>
      <title>Stacking matched controls under respective cases</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252628#M6802</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to make a sub-dataset out of the main data in a way that two controls are stacked below their respective case.&amp;nbsp; Any opinion or hint!&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 03:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252628#M6802</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-02-26T03:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking matched controls under respective cases</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252629#M6803</link>
      <description>&lt;P&gt;1.&amp;nbsp;Number each Case/Control set with a unique ID -&amp;gt; SetID&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;Create a variable where&amp;nbsp;Case are 1, controls are 2 -&amp;gt;Case_Control&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can sort by SetID, Case_Control&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 03:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252629#M6803</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-26T03:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking matched controls under respective cases</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252652#M6805</link>
      <description>&lt;P&gt;Thanks Reeza!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is my sample datasets wtih id numbers from sample and controls as paris; can you guide me how to do stacking with individual paris together?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;input id age edu race parity wt ht;&lt;BR /&gt;datalines;&lt;BR /&gt;05 32 9 1 0 90 5.2&lt;BR /&gt;12 35 12 1 2 110 5.0&lt;BR /&gt;17 40 10 2 1 130 4.9&lt;BR /&gt;22 25 14 3 0 110 5.4&lt;BR /&gt;29 27 12 2 1 95 5.0&lt;BR /&gt;40 28 10 3 2 130 6&lt;BR /&gt;;&lt;BR /&gt;data controls;&lt;BR /&gt;input id age edu race parity wt ht;&lt;BR /&gt;datalines;&lt;BR /&gt;10 33 11 2 1 98 5.7&lt;BR /&gt;11 35 10 2 2 120 5.9&lt;BR /&gt;19 42 11 1 3 139 5.9&lt;BR /&gt;26 26 14 0 1 99 5.0&lt;BR /&gt;31 27 10 2 1 95 5.5&lt;BR /&gt;32 29 12 2 2 125 6.2&lt;BR /&gt;37 31 10 2 1 190 7.2&lt;BR /&gt;43 35 12 1 1 110 5.0&lt;BR /&gt;46 45 10 1 1 130 4.9&lt;BR /&gt;51 28 12 3 0 110 5.4&lt;BR /&gt;55 22 10 1 1 95 5.0&lt;BR /&gt;58 28 10 3 2 130 6&lt;BR /&gt;70 32 9 1 0 90 5.2&lt;BR /&gt;79 37 11 1 2 110 5.0&lt;BR /&gt;85 48 14 2 1 130 4.9&lt;BR /&gt;88 29 14 3 0 110 5.4&lt;BR /&gt;90 25 14 2 1 95 5.0&lt;BR /&gt;93 27 11 3 2 130 6&lt;BR /&gt;99 35 10 1 0 90 5.2&lt;BR /&gt;101 33 11 1 2 110 5.0&lt;BR /&gt;114 38 16 2 1 130 4.9&lt;BR /&gt;125 25 13 3 0 110 5.4&lt;BR /&gt;129 25 10 2 1 95 5.0&lt;BR /&gt;130 24 11 3 2 130 6&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Matched pairs with original IDs&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Sample&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Control 1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Control 2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;70&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;99&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;43&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;101&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;22&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;125&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;51&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 26 Feb 2016 04:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252652#M6805</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-02-26T04:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking matched controls under respective cases</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252655#M6806</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie create a table that looks like the following from your third table. Them merge in table 1/2 &amp;nbsp;by ID and sort by N and Type2, I would recommend SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;N   Type    Type2  ID
1   Sample   1   5
1   Control   2   70
1   Control   2   99
2   Sample   1  12
2   Control   2   43
2   Control   2   101&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 04:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252655#M6806</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-26T04:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking matched controls under respective cases</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252658#M6807</link>
      <description>&lt;P&gt;Thanks. Can you give me the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 05:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Stacking-matched-controls-under-respective-cases/m-p/252658#M6807</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-02-26T05:40:33Z</dc:date>
    </item>
  </channel>
</rss>

