<?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 Creating a new database from aggregate data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32645#M7883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;General PROC SUMMARY (proc means) is the easiest way to summarize the data.&amp;nbsp; For a binary (1/0) variables the mean is the same as the percent that have a 1.&amp;nbsp; So you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=have&amp;nbsp; nway ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class community ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var sex smoker ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=want mean=male_percent smoker_percent ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2011 00:02:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-07-18T00:02:25Z</dc:date>
    <item>
      <title>Creating a new database from aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32644#M7882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make a new dataset based on output from another and I'm not sure even where to start.&amp;nbsp;&amp;nbsp; Any direction is highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simplified version of what I'm trying to do.&amp;nbsp; I have a person-centered dataset, say with 100 people coming from a total of 10 communities.&amp;nbsp; I have a number of binary variables for each person (e.g. gender (m/f) and current smoker (y/n)).&amp;nbsp; I'm interested in creating community variables for each binary variable in these individual data, e.g. % male in each community and % smoker in each community.&amp;nbsp; Then I would like to use this community information in subsequent analyses (so now my n=10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm seriously tempted to manually input the column % statistic from x*community frequency tables but I'm convinced there is a much better way, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jul 2011 23:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32644#M7882</guid>
      <dc:creator>KMack</dc:creator>
      <dc:date>2011-07-17T23:22:26Z</dc:date>
    </item>
    <item>
      <title>Creating a new database from aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32645#M7883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;General PROC SUMMARY (proc means) is the easiest way to summarize the data.&amp;nbsp; For a binary (1/0) variables the mean is the same as the percent that have a 1.&amp;nbsp; So you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=have&amp;nbsp; nway ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class community ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var sex smoker ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=want mean=male_percent smoker_percent ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 00:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32645#M7883</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-07-18T00:02:25Z</dc:date>
    </item>
    <item>
      <title>Creating a new database from aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32646#M7884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'd better to post some sample data and what output you need.&lt;/P&gt;&lt;P&gt;It will give you answer fastestly and correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 05:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32646#M7884</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-07-18T05:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new database from aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32647#M7885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; Proc summary generated exactly the output I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 12:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-new-database-from-aggregate-data/m-p/32647#M7885</guid>
      <dc:creator>KMack</dc:creator>
      <dc:date>2011-07-18T12:25:38Z</dc:date>
    </item>
  </channel>
</rss>

