<?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: Macro for Proc Freq and Proc Means in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355769#M274068</link>
    <description>&lt;P&gt;For pre written macros search lexjansen.com and clinical reports or summary tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll find a ton of papers with detailed explanations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There's one that's a great reference: Creating Complex Reports by Cynthia Zender.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI - as phrased, your question isn't coming across as help me do something I can't do, but can you please do my work? Obviously this is up to people how they respond to questions of this nature.&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 20:21:06 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-05-03T20:21:06Z</dc:date>
    <item>
      <title>Macro for Proc Freq and Proc Means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355743#M274066</link>
      <description>&lt;P&gt;I would like to efficiently output frequencies, percent, and cumulative time for a number of categorical variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My dataset variables include:&lt;/P&gt;
&lt;P&gt;ID number&lt;/P&gt;
&lt;P&gt;Many variables for genes with the prefix "rs", with three possible categories per variable&lt;/P&gt;
&lt;P&gt;Case (1 or 0)&lt;/P&gt;
&lt;P&gt;Years of follow-up per case&lt;/P&gt;
&lt;P&gt;Death (1 or 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like my final output to look like this for each gene:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rs#:&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;&amp;nbsp;&amp;nbsp; Cases # (% of total cases): &amp;nbsp;&amp;nbsp; PYears: &amp;nbsp; Deaths # (% of total deaths):&lt;/P&gt;
&lt;P&gt;Category1&lt;/P&gt;
&lt;P&gt;Category2&lt;/P&gt;
&lt;P&gt;Category3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My program to calculate Years for each gene and category:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=analytic; by case rs1; run; &lt;BR /&gt;&lt;BR /&gt;PROC MEANS DATA=analytic NWAY noprint;&lt;BR /&gt;&amp;nbsp; VAR Years ;&lt;BR /&gt;&amp;nbsp; by case rs1;&lt;BR /&gt;&amp;nbsp; OUTPUT OUT=survival SUM=PYears;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be grateful if someone could post a macro to do this efficiently since I have many genes to consider.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 19:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355743#M274066</guid>
      <dc:creator>TJ87</dc:creator>
      <dc:date>2017-05-03T19:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Proc Freq and Proc Means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355751#M274067</link>
      <description>&lt;P&gt;If you have a program that is working for one gene, it's just a hop, skip, and a jump away.&amp;nbsp; Right now&amp;nbsp; you are sorting/processing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by case rs1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead,&amp;nbsp; you can process:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by gene case rs1;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 19:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355751#M274067</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-03T19:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for Proc Freq and Proc Means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355769#M274068</link>
      <description>&lt;P&gt;For pre written macros search lexjansen.com and clinical reports or summary tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll find a ton of papers with detailed explanations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There's one that's a great reference: Creating Complex Reports by Cynthia Zender.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI - as phrased, your question isn't coming across as help me do something I can't do, but can you please do my work? Obviously this is up to people how they respond to questions of this nature.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 20:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-for-Proc-Freq-and-Proc-Means/m-p/355769#M274068</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-03T20:21:06Z</dc:date>
    </item>
  </channel>
</rss>

