<?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: How to Create one table displaying average age and weekly seizure rate at baseline by treatment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526806#M143556</link>
    <description>&lt;P&gt;I don't see any picture. Also, a picture is not the best way to post data. Post your example data in the form of a data step or insert a table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;this macro&lt;/A&gt;&amp;nbsp;to create a data step version of your SAS data set.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Jan 2019 23:10:45 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-01-13T23:10:45Z</dc:date>
    <item>
      <title>How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526803#M143553</link>
      <description>&lt;P&gt;Question is to Create one table displaying average age and weekly seizure rate at baseline by treatment .&lt;/P&gt;&lt;PRE&gt;proc means data = epilepsy n mean;
Var Age;
title "AverageAge";
proc tabulate data = epilepsy;
var seizurecount Age; 
table seizurecount*Age;
run;&lt;/PRE&gt;&lt;P&gt;This is my code. The error it gave is that "There are multiple analysis variables associated with a single table cell in the following&lt;BR /&gt;nesting : Seizurecount * Age"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 22:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526803#M143553</guid>
      <dc:creator>Stacy</dc:creator>
      <dc:date>2019-01-13T22:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526804#M143554</link>
      <description>&lt;P&gt;Can you show us what your data looks like? Sounds like a single procedure job and not something you need both PROC MEANS and PROC TABULATE to do&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 23:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526804#M143554</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-01-13T23:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526805#M143555</link>
      <description>I added a picture of my data.&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Jan 2019 23:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526805#M143555</guid>
      <dc:creator>Stacy</dc:creator>
      <dc:date>2019-01-13T23:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526806#M143556</link>
      <description>&lt;P&gt;I don't see any picture. Also, a picture is not the best way to post data. Post your example data in the form of a data step or insert a table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;this macro&lt;/A&gt;&amp;nbsp;to create a data step version of your SAS data set.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 23:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526806#M143556</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-01-13T23:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526807#M143557</link>
      <description>&lt;PRE&gt;data epilepsy;
  infile datalines truncover;
  input ID $ Treatment Age @;
  do period = 0 to 4;
    if period = 0 then weeks = 8;
	else weeks = 2;
    input Seizurecount @;
	rate = Seizurecount / weeks;
    output;
  end;
  datalines;
1     0      31      11      5     3     3     3
2     0      30      11      3     5     3     3
3     0      25       6      2     4     0     5
4     0      36       8      4     4     1     4
5     0      22      66      7    18     9    21
6     0      29      27      5     2     8     7
7     0      31      12      6     4     0     2
8     0      36      52     40    20    23    12
9     0      37      23      5     6     6     5
10     0      28      10     14    13     6     0
11     0      36      52     26    12     6    22
12     0      24      33     12     6     8     5
13     0      28      18      4     4     6     2
14     0      36      42      7     9    12    14
15     0      26      87     16    24    10     9
16     0      26      50     11     0     0     5
17     0      28      18      0     0     3     3
18     0      31     111     37    29    28    29
19     0      32      18      3     5     2     5
20     0      21      20      3     0     6     7
21     0      29      12      3     4     3     4
22     0      21       9      3     4     3     4
23     0      32      17      2     3     3     5
24     0      25      28      8    12     2     8
25     0      30      55     18    24    76    25
26     0      40       9      2     1     2     1
27     0      19      10      3     1     4     2
28     0      22      47     13    15    13    12
29     1      18      76     11    14     9     8
30     1      32      38      8     7     9     4
31     1      20      19      0     4     3     0
32     1      20      10      3     6     1     3
33     1      18      19      2     6     7     4
34     1      24      24      4     3     1     3
35     1      30      31     22    17    19    16
36     1      35      14      5     4     7     4
37     1      57      11      2     4     0     4
38     1      20      67      3     7     7     7
39     1      22      41      4    18     2     5
40     1      28       7      2     1     1     0
41     1      23      22      0     2     4     0
42     1      40      13      5     4     0     3
43     1      43      46     11    14    25    15
44     1      21      36     10     5     3     8
45     1      35      38     19     7     6     7
46     1      25       7      1     1     2     4
47     1      26      36      6    10     8     8
48     1      25      11      2     1     0     0
49     1      22     151    102    65    72    63
50     1      32      22      4     3     2     4
51     1      25      42      8     6     5     7
52     1      35      32      1     3     1     5
53     1      21      56     18    11    28    13
54     1      41      24      6     3     4     0
55     1      32      16      3     5     4     3
56     1      26      22      1    23    19     8
57     1      21      25      2     3     0     1
58     1      36      13      0     0     0     0
59     1      37      12      1     4     3     2
;
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Jan 2019 23:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526807#M143557</guid>
      <dc:creator>Stacy</dc:creator>
      <dc:date>2019-01-13T23:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create one table displaying average age and weekly seizure rate at baseline by treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526844#M143565</link>
      <description>&lt;P&gt;Definitely a couple of questions in order to get started ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Your data set already contains RATE.&amp;nbsp; Is there any reason you still need SEIZURECOUNT for this report?&lt;/LI&gt;
&lt;LI&gt;How do you determine which records are "at baseline" ?&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Could this be as simple as the program&amp;nbsp; below, or is there more to it?&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;proc means data = epilepsy n mean;
Var Age rate;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jan 2019 03:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Create-one-table-displaying-average-age-and-weekly/m-p/526844#M143565</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-01-14T03:47:41Z</dc:date>
    </item>
  </channel>
</rss>

