<?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: Summary table with p values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203025#M37857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC MEANS will give me a t-test of each variable vs. 0, I wish to have a t-test of each variable vs. the control group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2015 08:20:27 GMT</pubDate>
    <dc:creator>BlueNose</dc:creator>
    <dc:date>2015-07-16T08:20:27Z</dc:date>
    <item>
      <title>Summary table with p values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203023#M37855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume I have a dataset with 2 variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Group - character variable, with 3 levels: Treatment 1, Treatment 2 and Control.&lt;/P&gt;&lt;P&gt;2) Y - Numeric variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to product a summary statistics table, with mean, standard deviation and median for all 3 categories, which is easy, using PROC TABULATE. But, I also wish to have another column at the end, with p values of a t test comparing the means of the Treatment 1 vs. Control and Treatment 2 vs. Control. In other words, the last column, will have a missing value for the first row (can't compare control to itself), and two p values in the other two rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something, I wouldn't even upload the code, it is very very long and complicated. There must be an easy way of doing it. Can you assist me with some tips on how to do it gently and efficiently ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input &lt;SPAN style="font-size: 13.3333330154419px;"&gt; (numbers are arbitrary)&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); width: 263px; height: 47px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Group&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;X&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Control&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Treatment 1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Treatment 2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Control&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requested Output (numbers are arbitrary):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); width: 430px; height: 68px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Variable&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Mean&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Standard Deviation&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Median&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;P value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Control&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;22&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;21&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Treatment 1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Treatment 2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;17&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.785&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 05:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203023#M37855</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2015-07-15T05:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Summary table with p values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203024#M37856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not use proc means with output out=?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards to you requested output, I don't know what model you are using so guessing a bit.&amp;nbsp; First, put:&lt;/P&gt;&lt;P&gt;ods trace on;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before your model procedure and run it.&amp;nbsp; This will print to the log each of the objects that are created by the model.&amp;nbsp; Next, once you have highlighted the objects you want to use put:&lt;/P&gt;&lt;P&gt;ods output &amp;lt;object&amp;gt;=&amp;lt;dataset&amp;gt;;&lt;/P&gt;&lt;P&gt;This will create a dataset &amp;lt;dataset&amp;gt; with the data from &amp;lt;object&amp;gt;.&amp;nbsp; Now that you have proc means output and the object output it is just a matter of merging the two together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 08:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203024#M37856</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-15T08:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Summary table with p values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203025#M37857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC MEANS will give me a t-test of each variable vs. 0, I wish to have a t-test of each variable vs. the control group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 08:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-table-with-p-values/m-p/203025#M37857</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2015-07-16T08:20:27Z</dc:date>
    </item>
  </channel>
</rss>

