<?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: Demographic table creation in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406736#M3783</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;- My data is clean already. My problem here is the proper use of proc freq, proc transpose... things are required in proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2017 20:09:49 GMT</pubDate>
    <dc:creator>sasban</dc:creator>
    <dc:date>2017-10-23T20:09:49Z</dc:date>
    <item>
      <title>Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406722#M3780</link>
      <description>&lt;P&gt;I need to create a demographic summary table. Since I'm doing this for the first time, I'm looking for the reference that describes creating table with continuous and categorical variables explicitly (possibly with step by step coding). Any suggestions please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 19:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406722#M3780</guid>
      <dc:creator>sasban</dc:creator>
      <dc:date>2017-10-23T19:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406725#M3781</link>
      <description>&lt;P&gt;Search LexJansen.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And note that everyone defines demographic table differently, so you may need to customize things as needed.&lt;/P&gt;
&lt;P&gt;It seems down right now, but should be up soon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or search on here, there's a lot of examples. John King has some great papers on this as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 19:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406725#M3781</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-23T19:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406726#M3782</link>
      <description>&lt;P&gt;My first suggestion is to make sure your data is as clean as possible. Each field involved should have an agreed upon content and be in that form. For instance if Gender or Sex is a field is it allowed to be missing or something like "don't know" or "refused". If the values are supposed to be "Male" or "Female" then beware of case ( "male" "female"), abbreviations ("M" "F" or "m" "f").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second is if you have continuous values like Age but want to report age groups to investigate custom formats so you can make changes without having to add multiple variables to your data for that purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you are reporting percentages make sure everyone involved knows what the denominator(s) involved should be: All records or records with valid values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very likely questions will arise if the total counts&amp;nbsp;for all&amp;nbsp;Sexes, for example, don't match total counts for all ages.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 19:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406726#M3782</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-23T19:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406736#M3783</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;- My data is clean already. My problem here is the proper use of proc freq, proc transpose... things are required in proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 20:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/406736#M3783</guid>
      <dc:creator>sasban</dc:creator>
      <dc:date>2017-10-23T20:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407294#M3800</link>
      <description>&lt;P&gt;Could you provide a template of what your demographic table should look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I presume it will be a table of frequencies cross-classified by demographic variables&amp;nbsp; If so, which vars?&amp;nbsp;&amp;nbsp; SEX,RACE,AGE_GROUP..... other vars like IMMIGRANT/NATIVEBORN, Education level?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407294#M3800</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-10-25T14:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407299#M3801</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, It is like this: &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Treatment A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Treatment B &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;Total&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sex &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&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;M &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50 (10%) &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; 100 (20%) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 500 (100%)&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;F&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;Race&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;White&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;Asian&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; .&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407299#M3801</guid>
      <dc:creator>sasban</dc:creator>
      <dc:date>2017-10-25T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407472#M3804</link>
      <description>&lt;P&gt;You can get close to this with a PROC TABULATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assume you have a data set of individuals with variables SEX ("M" or "F"), Race ("White", "Asian").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have noseps;
  class age sex treatment;
  tables age sex all, (treatment all)*(N pctn) / rts=10;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which gives the layout you want, but is ugly.&amp;nbsp; You can improve the appearance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  picture mypct  low-high='00.0%';
run;
proc tabulate data=have noseps;
  class age sex treatment;
  tables age sex all, (treatment all)*(N=''*f=comma4.0 pctn=''*f=mypct5.1) / rts=10;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you want better than that, I think you need to learn about PROC REPORT.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407472#M3804</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-10-25T20:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407483#M3805</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;,&amp;nbsp;I did following and did proc report with other variables. But could not calculate total.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Proc import datafile="/folders/myshortcuts/Myfolders/SAS Exercise/DM_Exercise1.xls"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Out=Q1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Dbms=XLS replace;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc sort data=Q1 nodupkey;&lt;/DIV&gt;&lt;DIV&gt;by usubjid;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data Q1a;&lt;/DIV&gt;&lt;DIV&gt;set Q1 (keep=agegr1 sex age race ethnic trt01pn pltcnt);&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc freq data=Q1a noprint;&lt;/DIV&gt;&lt;DIV&gt;tables trt01pn*agegr1/missing outpct out=Q1afreq_agegr1;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data Q1afreqper_agegr1;&lt;/DIV&gt;&lt;DIV&gt;set Q1afreq_agegr1;&lt;/DIV&gt;&lt;DIV&gt;length value $25;&lt;/DIV&gt;&lt;DIV&gt;value=put(count, 4.)!!' ('!!put(pct_row,4.1)!!'%)';&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc sort data=Q1afreqper_agegr1;&lt;/DIV&gt;&lt;DIV&gt;by agegr1;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc transpose data=Q1afreqper_agegr1 out=Q1atrans_agegr1;&lt;/DIV&gt;&lt;DIV&gt;by agegr1;&lt;/DIV&gt;&lt;DIV&gt;var value;&lt;/DIV&gt;&lt;DIV&gt;ID trt01pn;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data labelagegr1;&lt;/DIV&gt;&lt;DIV&gt;label="Age Categorization (%)";&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data agegr1label;&lt;/DIV&gt;&lt;DIV&gt;length label $25;&lt;/DIV&gt;&lt;DIV&gt;set labelagegr1 Q1atrans_agegr1;&lt;/DIV&gt;&lt;DIV&gt;keep label _0 _1 _2;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if _n_&amp;gt;1 then select;&lt;/DIV&gt;&lt;DIV&gt;when (agegr1='&amp;lt;65') label="&amp;lt;65";&lt;/DIV&gt;&lt;DIV&gt;when (agegr1='&amp;gt;=65') label="&amp;gt;=65";&lt;/DIV&gt;&lt;DIV&gt;otherwise;&lt;/DIV&gt;&lt;DIV&gt;end;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 21:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/407483#M3805</guid>
      <dc:creator>sasban</dc:creator>
      <dc:date>2017-10-25T21:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/454010#M5213</link>
      <description>&lt;P&gt;&amp;nbsp;Did you find the solution? Can u share the solution on how to create demographic table?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 18:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/454010#M5213</guid>
      <dc:creator>dimrana</dc:creator>
      <dc:date>2018-04-13T18:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Demographic table creation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/454085#M5220</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; I show one approach to create several tables/reports (for RTF output) in my paper, Creating Complex Reports &lt;A href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt; (page 9)&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="demog.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19797i4DA347B3A186E58E/image-size/large?v=v2&amp;amp;px=999" role="button" title="demog.png" alt="demog.png" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TABULATE is another approach, but TABULATE does not give you as much control over break lines and spacing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You'll find the programs that accompany the paper here: &lt;A href="http://support.sas.com/rnd/papers/#RegUsers_2008" target="_blank"&gt;http://support.sas.com/rnd/papers/#RegUsers_2008&lt;/A&gt; scroll down on the page for 2008 and look for the paper title.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just one idea. I second the idea of searching on &lt;A href="http://www.lexjansen.com" target="_blank"&gt;www.lexjansen.com&lt;/A&gt; because the PharmaSUG and PhUSE presenters have talked a lot about producing these types of reports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 23:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Demographic-table-creation/m-p/454085#M5220</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-13T23:42:07Z</dc:date>
    </item>
  </channel>
</rss>

