<?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: merging a few variables from 1 &amp;quot;short&amp;quot; database to a longer database (longitudinal ana in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523900#M142412</link>
    <description>&lt;P&gt;Hi.&amp;nbsp; I figured it out!!!!&amp;nbsp; I just couldn't get back to this page!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data short ;&lt;BR /&gt;set aung.initial_complete5 (keep= id new3medtype bmi dmyearsdur sexmg smoker&lt;BR /&gt;age_initial M_diff_bg);&lt;BR /&gt;proc print; var id new3medtype;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data long;&lt;BR /&gt;set aung.longeachvisit5 (keep =id diff_bg diff_o_bgallv_lower diff_o_lt120_posthi);&lt;BR /&gt;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* Merging long and short */&lt;/P&gt;&lt;P&gt;proc sort data=short; by id; run;&lt;BR /&gt;proc sort data=long; by id; run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;merge short long;&lt;BR /&gt;by id;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Dec 2018 00:32:53 GMT</pubDate>
    <dc:creator>mgrzyb</dc:creator>
    <dc:date>2018-12-31T00:32:53Z</dc:date>
    <item>
      <title>merging a few variables from 1 "short" database to a longer database (longitudinal analysis)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523895#M142407</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy new year!&amp;nbsp; &amp;nbsp;I have done this before, but with a constraint of time, I just can't figure it out.&amp;nbsp; Hoping someone will help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 data sets for a longitudinal database.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The short one is a database with age, and basic information, including type of medicine. The variable for the short database that I want to merge with each visit in the visit database is called MEDTYPE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to check the differences in bloodpressure&amp;nbsp; by visits (1700 total visits) which is long SAS database form.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a table like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DrugA&amp;nbsp; &amp;nbsp; &amp;nbsp; DrugB&amp;nbsp; &amp;nbsp; DrugC&lt;/P&gt;&lt;P&gt;1.drop in BP (mean and freq)&lt;/P&gt;&lt;P&gt;2. increase in BP (mean and freq)&lt;/P&gt;&lt;P&gt;3. another variable (ditto)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't have the drug type in the long database.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I join these so I can create that table or something like it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thank you and sorry to bother&amp;nbsp; you!!&lt;/P&gt;</description>
      <pubDate>Sun, 30 Dec 2018 23:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523895#M142407</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-12-30T23:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: merging a few variables from 1 "short" database to a longer database (longitudinal ana</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523897#M142409</link>
      <description>Post sample data that reflects your situation. Make it up if you cannot post real data.</description>
      <pubDate>Mon, 31 Dec 2018 00:03:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523897#M142409</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-31T00:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: merging a few variables from 1 "short" database to a longer database (longitudinal ana</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523900#M142412</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; I figured it out!!!!&amp;nbsp; I just couldn't get back to this page!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data short ;&lt;BR /&gt;set aung.initial_complete5 (keep= id new3medtype bmi dmyearsdur sexmg smoker&lt;BR /&gt;age_initial M_diff_bg);&lt;BR /&gt;proc print; var id new3medtype;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data long;&lt;BR /&gt;set aung.longeachvisit5 (keep =id diff_bg diff_o_bgallv_lower diff_o_lt120_posthi);&lt;BR /&gt;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* Merging long and short */&lt;/P&gt;&lt;P&gt;proc sort data=short; by id; run;&lt;BR /&gt;proc sort data=long; by id; run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;merge short long;&lt;BR /&gt;by id;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 00:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-a-few-variables-from-1-quot-short-quot-database-to-a/m-p/523900#M142412</guid>
      <dc:creator>mgrzyb</dc:creator>
      <dc:date>2018-12-31T00:32:53Z</dc:date>
    </item>
  </channel>
</rss>

