<?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: Proc transpose duplicates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712251#M219549</link>
    <description>&lt;P&gt;I am making AE tables like I was asking about in the other post. The duplicate was not supposed to be there. This is why I was asking the best way to count as I have columns for AESEV, and AEREL. I make separate datasets by SOC and PT. I transpose datasets for AESEV and then transpose the datasets for AEREL.The datasets were made with proc sql group by. Once I took AESEV out there were no more duplicates.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jan 2021 22:27:25 GMT</pubDate>
    <dc:creator>tarheel13</dc:creator>
    <dc:date>2021-01-18T22:27:25Z</dc:date>
    <item>
      <title>Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712222#M219531</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lrackley_0-1610999505888.png" style="width: 630px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53615iD17F06B69711C6A1/image-dimensions/630x120?v=v2" width="630" height="120" role="button" title="lrackley_0-1610999505888.png" alt="lrackley_0-1610999505888.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am trying to transpose this. There are duplicates within Cardiac disorders. I read on here to make another count variable and put it in the id statement. But that didn't work for me. It is making two columns of aerel and I just need one column!&lt;/P&gt;
&lt;P&gt;proc transpose data=temp;&lt;/P&gt;
&lt;P&gt;by aeterm_soc count;&lt;/P&gt;
&lt;P&gt;var count;&lt;/P&gt;
&lt;P&gt;id aerel n;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lrackley_1-1610999608421.png" style="width: 585px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53616iCD9448CEA9449837/image-dimensions/585x180?v=v2" width="585" height="180" role="button" title="lrackley_1-1610999608421.png" alt="lrackley_1-1610999608421.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How do I just get one column for cntNot_Related?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 19:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712222#M219531</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-18T19:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712223#M219532</link>
      <description>&lt;P&gt;Post usable sample data please &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 19:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712223#M219532</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-18T19:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712227#M219534</link>
      <description>&lt;P&gt;I put the data in a CSV.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 20:34:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712227#M219534</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-18T20:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712229#M219535</link>
      <description>&lt;P&gt;I think I made the dataset wrong. AESEV should not be in there and removing that should take out the duplicates in cardiac disorders.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 20:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712229#M219535</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-18T20:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712250#M219548</link>
      <description>So what do you want to happen when you do have two records?&lt;BR /&gt;It's weird to see COUNT in the BY statement, I suspect that may not be doing what you think it's supposed to be doing. You may want to back up a few steps and explain this a bit more.</description>
      <pubDate>Mon, 18 Jan 2021 22:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712250#M219548</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-18T22:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712251#M219549</link>
      <description>&lt;P&gt;I am making AE tables like I was asking about in the other post. The duplicate was not supposed to be there. This is why I was asking the best way to count as I have columns for AESEV, and AEREL. I make separate datasets by SOC and PT. I transpose datasets for AESEV and then transpose the datasets for AEREL.The datasets were made with proc sql group by. Once I took AESEV out there were no more duplicates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 22:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712251#M219549</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-18T22:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712253#M219551</link>
      <description>Your other post sort of implied that you already had working programs, not that you had an approach in mind. Didn't you have an indicator variable that you were using to create the summaries?</description>
      <pubDate>Mon, 18 Jan 2021 22:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712253#M219551</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-18T22:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712256#M219554</link>
      <description>&lt;P&gt;These programs are kind of a mess. You can only count once per SOC per PT per subject. Has to be by max severity and max relatedness. My program is quite lengthy so I'm pretty sure there's a better way to do this. Yes, I made one subject-level occurrence flag and I was summing that in SQL to get counts. I kind of need something that's going to work every time because I have to repeat these tables for moderate disease severity, severe disease severity, and all subjects. Additionally, they must be presented separately for treatment A and B. The approach has been to make a dataset for SOC by aesev, PT by aesev, SOC by aerel, and PT by aerel. I transpose the count and percent separately and merge it back together to create 1 dataset. Then I wrote a macro to split out separate datasets by SOC and stack them all together. I make the top row in the table with proc summary. The top row is Any SOC and Any PT.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 22:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-duplicates/m-p/712256#M219554</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-01-18T22:34:33Z</dc:date>
    </item>
  </channel>
</rss>

