<?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 perform all combinations of pairwise t-tests with proc multtest? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148748#M39336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic, thank you PGStats!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW I also edited the format of the p-values from PVALUEw.d format to 12.8 numerical format to avoid values of "&amp;lt;.001".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 16:03:07 GMT</pubDate>
    <dc:creator>RobF</dc:creator>
    <dc:date>2014-12-14T16:03:07Z</dc:date>
    <item>
      <title>How to perform all combinations of pairwise t-tests with proc multtest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148746#M39334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I'd like to perform all unique combinations of pairwise Student's t-test comparisons of average length of stay between a family of 31 hospitals, and then output the p-values for each test (with the goal of plotting the ordered p-values to help estimate the # of true null hypotheses according to Schweder and Spjotvoll (1982)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a simple way to do this with proc multtest without specifiying all possible contrasts with multiple CONTRAST statements? I want to avoid this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc multtest data=hospital;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class hospital_name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test mean(los);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contrast 'A vs B' (-1 1 0 0 ... 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contrast 'A vs C' (-1 0 1 0 ... 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contrast 'B vs C' (0 -1 1 0 ... 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contrast 'A vs Z' (1 0 0 0 ... -1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've checked the online manual for proc multtest and it isn't terribly helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 19:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148746#M39334</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-12-12T19:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform all combinations of pairwise t-tests with proc multtest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148747#M39335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc GLM has the ability to do all pairwise comparisons and correct p-values for test multiplicity. You will have to do a bit of reformatting of the results as in the following example::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc glm data=sashelp.baseball plots=none;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class team;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model nRuns = team;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*lsmeans team / pdiff adjust=simulate;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Corrected p-values */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lsmeans team / pdiff adjust=t;&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; /* Uncorrected p-values */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods output Diff=teamDiffs LSMeans=teamLSMeans;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run; quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc transpose data=teamDiffs out=teamDiffsLong;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by rowName;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var _:;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table teamDiffsPList as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.team as team, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.team as withTeam, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.COL1 as tProb&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; teamDiffsLong as a inner join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; teamLSMeans as b on left(a.rowName) = cats(b.LSMeanNumber) inner join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; teamLSMeans as c on a._NAME_ = cats("_", c.LSMeanNumber)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where input(a.rowName, best.) &amp;gt; input(substr(a._NAME_,2), best.)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;order by tProb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 03:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148747#M39335</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-12-13T03:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform all combinations of pairwise t-tests with proc multtest?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148748#M39336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic, thank you PGStats!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW I also edited the format of the p-values from PVALUEw.d format to 12.8 numerical format to avoid values of "&amp;lt;.001".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 16:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-perform-all-combinations-of-pairwise-t-tests-with-proc/m-p/148748#M39336</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-12-14T16:03:07Z</dc:date>
    </item>
  </channel>
</rss>

