<?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: Creating a 2x2 table in Proc Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370666#M88529</link>
    <description>I can see that I could just transpose the data to get it into that format, but I am not seeing how, in proc report, I could get the 12 adjacent to the 14. In the past using proc report I have just added columns, not rows.</description>
    <pubDate>Mon, 26 Jun 2017 17:02:06 GMT</pubDate>
    <dc:creator>daszlosek</dc:creator>
    <dc:date>2017-06-26T17:02:06Z</dc:date>
    <item>
      <title>Creating a 2x2 table in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370658#M88525</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to report the following count data:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 192pt;" border="0" width="256" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="4" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;TP&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;FN&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;FP&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;TN&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt;"&gt;12&lt;/TD&gt;
&lt;TD class="xl65"&gt;110&lt;/TD&gt;
&lt;TD class="xl65"&gt;14&lt;/TD&gt;
&lt;TD class="xl65"&gt;99&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in a proc report as the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 192pt;" border="0" width="256" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="4" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="2" width="128" class="xl66" style="width: 96pt;"&gt;Gold Standard&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl65"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none;"&gt;+&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD rowspan="2" height="40" class="xl67" style="height: 30.0pt;"&gt;Result&lt;/TD&gt;
&lt;TD class="xl66" style="border-left: none;"&gt;+&lt;/TD&gt;
&lt;TD class="xl66" style="border-left: none;"&gt;12&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;14&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none; border-left: none;"&gt;-&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;99&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having some difficulty as to how I can manipulate the cells/ add rows. I would think this was a common&amp;nbsp;problem, but I am having difficulty googling it. Below is the SAS code for the dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data ex1;
input TP    FN    FP     TN;
cards;
12 110 14 99
;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions or links to the right direction would be much appreciated,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 16:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370658#M88525</guid>
      <dc:creator>daszlosek</dc:creator>
      <dc:date>2017-06-26T16:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a 2x2 table in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370659#M88526</link>
      <description>&lt;P&gt;If you read in your data differently so that each row has only one data point, and a + or - value for Gold Standard, and another + or - value for Result, then you're all set. See &lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1pl56sdqo09cyn1fifuhcz8dl2f.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1pl56sdqo09cyn1fifuhcz8dl2f.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    input gold_standard $ result $ value;
+ + 12
+ - 110
- + 14
- - 99
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 16:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370659#M88526</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-06-26T16:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a 2x2 table in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370666#M88529</link>
      <description>I can see that I could just transpose the data to get it into that format, but I am not seeing how, in proc report, I could get the 12 adjacent to the 14. In the past using proc report I have just added columns, not rows.</description>
      <pubDate>Mon, 26 Jun 2017 17:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370666#M88529</guid>
      <dc:creator>daszlosek</dc:creator>
      <dc:date>2017-06-26T17:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a 2x2 table in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370667#M88530</link>
      <description>&lt;P&gt;I gave the link to an example that does this.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 17:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370667#M88530</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-06-26T17:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a 2x2 table in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370744#M88545</link>
      <description>Yes, my apologies didn't see the link. With a little tweaking I was able to format the data the way I wanted.</description>
      <pubDate>Mon, 26 Jun 2017 20:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-2x2-table-in-Proc-Report/m-p/370744#M88545</guid>
      <dc:creator>daszlosek</dc:creator>
      <dc:date>2017-06-26T20:17:34Z</dc:date>
    </item>
  </channel>
</rss>

