<?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: Compare two medians in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82305#M3950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use proc freq.&amp;nbsp; Take a look at &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm" title="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2012 17:18:11 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-11-27T17:18:11Z</dc:date>
    <item>
      <title>Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82303#M3948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a test in SAS that compares two medians? I am looking for the equivalent of PROC TTEST, but with medians instead of means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 16:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82303#M3948</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-27T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82304#M3949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the MEDIAN test available in NPAR1WAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:15:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82304#M3949</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-11-27T17:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82305#M3950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use proc freq.&amp;nbsp; Take a look at &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm" title="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82305#M3950</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-27T17:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82306#M3951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was always my understanding that the median test in PROC NPAR1WAY was a non-parametric test of means, not of medians.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 18:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82306#M3951</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-27T18:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82307#M3952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Arthur Tabachneck wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;You can also use proc freq.&amp;nbsp; Take a look at &lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_intronpar_sect006.htm&lt;/A&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;I don't see the word "median" anywhere in the PROC FREQ documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 18:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82307#M3952</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-27T18:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82308#M3953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="9481" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;: I'll have to leave it to &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;, &lt;A __default_attr="129106" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt; or another statistician to provide the correct answer but, the following is in the documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS/STAT software provides the following nonparametric tests for comparing the locations of two related&lt;/P&gt;&lt;P&gt;samples:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wilcoxon signed rank test&lt;/P&gt;&lt;P&gt;&amp;nbsp; sign test&lt;/P&gt;&lt;P&gt;&amp;nbsp; McNemar’s test&lt;/P&gt;&lt;P&gt;The first two tests are available in the UNIVARIATE procedure, and the last test is available in the FREQ&lt;/P&gt;&lt;P&gt;procedure. When you perform these tests, your data should consist of pairs of measurements for a random&lt;/P&gt;&lt;P&gt;sample from a single population. For example, suppose your data consist of SAT scores for students before&lt;/P&gt;&lt;P&gt;Tests for k Samples F 281&lt;/P&gt;&lt;P&gt;and after attending a course on how to prepare for the SAT. The pairs of measurements are the scores before&lt;/P&gt;&lt;P&gt;and after the course, and the students should be a random sample of students who attended the course. &lt;SPAN style="color: #ff0000;"&gt;Your&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;goal in analysis is to decide whether the median change in scores is significantly different from zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82308#M3953</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-27T19:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82309#M3954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The mean is never mentioned in the definition of the test. My experience is that this test isn't very powerful which might explain why it is so rarely used. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82309#M3954</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-11-27T19:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82310#M3955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;Arthur Tabachneck wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"When you perform these tests, your data should consist of pairs of measurements for a random&lt;/P&gt;
&lt;P&gt;sample from a single population."&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Okay, that does not describe my situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82310#M3955</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-27T19:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82311#M3956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then PG's answer at #1 is what you need--the median test in PROC NPAR1WAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 20:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82311#M3956</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-11-27T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82312#M3957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not an expert, but I believe that the Mann-Whitney (aka, Wilcoxon-Mann-Whitney or just Wilcoxon) test is generally used as an alternative to a &lt;EM&gt;t &lt;/EM&gt;test when the data are not normally distributed. The Mann-Whitney test is commonly regarded as a test of population medians, but this is technically only true if the two populations have the same shape and one is a "translation" (or shift) of the other. If the populations have different scales and shape, the M-W test will detect that as well, which tends to muddy the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to create box plots of the two groups. If the boxes are approximately the same size and shape, but one is offset from the other, then an M-W test would be a way to test whether the medians are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For an introduction to nonparametric tests, including how to perform a M-W test by using PROC NPAR1WAY, see &lt;A href="http://analytics.ncsu.edu/sesug/2004/TU04-Pappas.pdf" title="http://analytics.ncsu.edu/sesug/2004/TU04-Pappas.pdf"&gt;http://analytics.ncsu.edu/sesug/2004/TU04-Pappas.pdf&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 20:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82312#M3957</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-11-27T20:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82313#M3958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use PROC QUANTREG. Suppose you have two variables, y1 and y2, that potentially have different medians. Create a new variable y that is just y1 stacked on top of y2, and create a dummy variable x that has a value of 0 if an observation is from y1 and a value of 1 if an observation is from y2. Now you can use QUANTREG to estimate the median conditional on the value of x. The TEST statement performs a WALD test of whether the effect of x is significantly different from 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample program that demonstrates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; call streaminit(736283);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i&amp;lt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;51&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; y=rand(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'NORMAL'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i&amp;lt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;51&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; x=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;51&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; y=rand(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'NORMAL'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;51&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; x=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;quantreg&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; y=x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; test&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resulting Wald test statistic is 13.2403, the p-value is 0.0003.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 16:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82313#M3958</guid>
      <dc:creator>AllenMcDowell</dc:creator>
      <dc:date>2012-11-29T16:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82314#M3959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Allen. That looks like a reasonable approach. Do you have any references on the Wald test? I don't really find much in SAS docs for PROC QUANTREG about the Wald test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 16:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82314#M3959</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-29T16:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82315#M3960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The mathematical details of the Wald test are provided at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_syntax11.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_syntax11.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also perform a likelihood ratio test by specifying the LR option in the TEST statement; the mathematical details are provided on this same page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 18:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82315#M3960</guid>
      <dc:creator>AllenMcDowell</dc:creator>
      <dc:date>2012-11-29T18:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82316#M3961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's an intriguing idea, but if it were me I'd use the simpler NPAR1WAY procedure. To me, the simpler procedure has the advantage of more explicit assumtions and (often) more power than the general test. (And it's easier for me to understand what is being tested.) By way of an analogy, if I'm testing for the difference of means, I wouldn't use PROC GLM and the ESTIMATE statement when I could use PROC TTEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, rerun @AllenMcDowell's DATA step where the second mean is 0.5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;if i&amp;gt;=51 then y=rand('NORMAL',0.5,1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now compare the QUANTREG and NPAR1WAY results. In this case the Wilcoxon two-sample test has a p-value of 0.0174,the MEDIAN test has a p-value of 0.047, and the QUANTREG Wald test has a p-value of 0.09:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc npar1way data=one median wilcoxon;&lt;/P&gt;&lt;P&gt;class x;&lt;/P&gt;&lt;P&gt;var y;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 19:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82316#M3961</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-11-29T19:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82317#M3962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;AllenMcDowell wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;The mathematical details of the Wald test are provided at:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_syntax11.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_syntax11.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;You can also perform a likelihood ratio test by specifying the LR option in the TEST statement; the mathematical details are provided on this same page.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;With all due respect, there are no mathematical details of the Wald test at this link.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 20:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82317#M3962</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-29T20:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82318#M3963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;Rick Wicklin wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It's an intriguing idea, but if it were me I'd use the simpler NPAR1WAY procedure. To me, the simpler procedure has the advantage of more explicit assumtions and (often) more power than the general test. (And it's easier for me to understand what is being tested.) By way of an analogy, if I'm testing for the difference of means, I wouldn't use PROC GLM and the ESTIMATE statement when I could use PROC TTEST.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure that the stated criterion of "(often) more power" is a useful one. Especially when "(often)" is demonstrated by a single example. Do you have references regarding power?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What "explicit assumtions (sic)" are present in NPAR1WAY that are not present for QUANTREG's test?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 20:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82318#M3963</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-11-29T20:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82319#M3964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, wrong link. try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_details13.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_qreg_details13.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or look at the Details section and select the "Linear Test" entry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 20:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82319#M3964</guid>
      <dc:creator>AllenMcDowell</dc:creator>
      <dc:date>2012-11-29T20:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82320#M3965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is a single example. You are welcome to run a simulation study to see how well it holds in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know what assumptions are behind the QUANTREG test, which is why I would not use it myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assumptions and power behind the "median test" and the Wilcoxon test are discussed in "&lt;A href="http://www.jstor.org/stable/10.2307/2685584"&gt;Should the Median Test be retired from general use?&lt;/A&gt;", (Freidlan and Gastwirth, 2000, TAS). That article provides evidence and gives references that show that the median test has less power in small samples, for unbalanced designs, and for asymmetric distributions than many other tests, including the Wilcoxon test. The same article also provides power analysis for various distributional assumptions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 20:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82320#M3965</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-11-29T20:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82321#M3966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I am new to Proc QuantReg. Comparing medians is appealing since it would be more robust to outliers than comparing means. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The appeal of Quantreg, for me,&amp;nbsp; is that it can compare medians while including other factors in the model. So you get what I'd call 'an adjusted test of medians' with QuantReg, instead of the usual unadjusted comparison of medians with Proc npar1way Wilcoxon. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The first step is to get QuantReg to duplicate the Wilcoxon result. Then I’d use Proc Quantreg to improve on a Wilcoxon test by adjusting for other factors. I’ve come as close as I can using the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;test&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x / rankscore (wilcoxon);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;syntax below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Note that the Wald test p=.0899 given in the first Proc QuantReg below must not be right, since the 95%CI&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;-1.0039,-0.0535)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; for the X parameter estimate does not include 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I don’t understand why we don’t see a SE and a p-value in the Parameter Estimates table output of Proc Quantreg. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; streaminit(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;736283&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;51&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; y=rand(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'NORMAL'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;51&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;51&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; y=rand(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'NORMAL'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: green; background: white;"&gt;*&amp;lt;&amp;lt;&amp;lt;note .5 difference in means;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i&amp;gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;51&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;npar1way&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=one &lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;WILCOXON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; y ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp; Wilcoxon Two-Sample Test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Statistic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2180.0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Normal Approximation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Z&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;&amp;nbsp; -2.3749&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;One-Sided Pr &amp;lt;&amp;nbsp; Z&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0088&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Two-Sided Pr &amp;gt; |Z|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0176&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;quantreg&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; data=one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; y=x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;test&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameter Estimates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 95% Confidence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Parameter&amp;nbsp;&amp;nbsp; DF Estimate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Limits&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Intercept&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0.4081&amp;nbsp;&amp;nbsp; -0.0237&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8264&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 1&amp;nbsp; -0.4365&amp;nbsp;&amp;nbsp; -1.0039 -0.0535&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;x 1 0&amp;nbsp;&amp;nbsp; 0.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0000 0.0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&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; Test Results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&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;&amp;nbsp; Test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chi-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Test&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; Statistic DF&amp;nbsp; Square Pr &amp;gt; ChiSq&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Wald&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; 2.8766&amp;nbsp; 1 2.88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0899&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 8pt; font-family: Arial, sans-serif;"&gt;The following syntax comes closer to the Wilcoxon p-value (Wilcoxon p=.0176; quantreq p=.0168), but why are they different??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;quantreg&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; data=one alpha=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;0.05&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; y=x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;test&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; x / rankscore (wilcoxon);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameter Estimates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 95% Confidence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Parameter&amp;nbsp;&amp;nbsp; DF Estimate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Limits&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Intercept&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0.4081&amp;nbsp;&amp;nbsp; -0.0237&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8264&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 1&amp;nbsp; -0.4365&amp;nbsp;&amp;nbsp; -1.0039 -0.0535&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0&amp;nbsp;&amp;nbsp; 0.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0000 0.0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&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; Test Results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&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;&amp;nbsp; Test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chi-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Test&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; Statistic DF&amp;nbsp; Square Pr &amp;gt; ChiSq&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;Rank_Wilcoxon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.7132 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.71&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0168&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 15:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82321#M3966</guid>
      <dc:creator>peterinboston</dc:creator>
      <dc:date>2013-01-04T15:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two medians</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82322#M3967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I asked SAS about why the results of Npar1way and Quantreg were not more similar. Below I give their response and an example they provided where the two procedures give very similar results. Apparently expecting the results to match identically was naive, since the procedures are quite different. What follows is their response.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Summary&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;=========&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1) The traditional nonparametric two-sample tests are given by PROC NPAR1WAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;but this procedure is not designed to fit a model and is essentially doing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;something different than PROC QUANTREG which is optimizing an objective function,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;i.e. - determining the coefficient/parameter estimates that optimize the objective function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2) When there are ties in the response data there are different ways to compute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;the rank scores in NPAR1WAY but QAUNTREG does not do any adjustment for ties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;The QUANREG developer said this is the main difference between NPAR1WAY and QUANTREG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(3) If you have other covariates you wish to include in the analysis then you are&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;better served by using PROC QUANTREG which can incorporate other factors into the model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;Test program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;=============&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;You will notice in the test program and data set simulated by the QUANTREG developer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;that the NPAR1WAY results agree rather closely with QUANTREG:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1) Regarding the "Wilcoxon Two-Sample Test" (WilcoxonTest ODS table) from NPAR1WAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;versus the Rank_Wilcoxon Test (Test 1 ODS Table) from QUANTREG:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(a) If you square the "Normal Approximation" Z value you will get something&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;very close to the Rank_Wilcoxon Test "Chi-Square" value from QUANTREG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(b) The two-sided Z pvalue (Two Sided Pr &amp;gt; |Z|) from NPAR1WAY is very similar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;the to Chi-square p-value (Pr &amp;gt; ChiSq) from QUANTREG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2) Regarding the "Median Two-Sample Test" (MedanTest ODS table) from NPAR1WAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;versus the Rank_Sign Test (Test 2 ODS table) from QUANTREG:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(a) If you square the Z value you will get something very close to the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;Rank_Sign "Chi-Square" value from QUANTREG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;(b) The two-sided Z pvalue (Two Sided Pr &amp;gt; |Z|) from NPAR1WAY is very&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;similar the to Chi-square p-value (Pr &amp;gt; ChiSq) from QUANTREG.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;%let n=100;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;data Trial(drop=i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to &amp;amp;n;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (i &amp;lt;= &amp;amp;n/2) then do;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = rannorm(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; treatment = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = 0.75 + rannorm(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; treatment = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;ods trace on / listing;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;ods select WilcoxonTest MedianTest; * MedianAnalysis;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;proc npar1way data=Trial Wilcoxon Median;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Treatment;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var y;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title1 "NPAR1WAY - two sample tets";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ods select ModelInfo ObjFunction ParameterEstimates Tests;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;proc quantreg data=Trial alpha=0.05;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class treatment;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y =&amp;nbsp; treatment / quantile=.5;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test treatment / rankscore(Wilcoxon);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test treatment / rankscore (median);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title1 "QUANTREG - rankscore tests of two treatments";&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;ods trace off;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 17:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/m-p/82322#M3967</guid>
      <dc:creator>peterinboston</dc:creator>
      <dc:date>2013-02-28T17:00:25Z</dc:date>
    </item>
  </channel>
</rss>

