<?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: PROC UNIVARIATE Signed Rank S statistic and associated Pr &amp;gt;=|S| (p-value) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936030#M46664</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Massive thanks for coming back to us. We really appreciate you lookin into that and referring us to the articles.&lt;/P&gt;&lt;P&gt;This study is part of the CAMIS project (&lt;A href="https://psiaims.github.io/CAMIS/" target="_blank"&gt;https://psiaims.github.io/CAMIS/&lt;/A&gt;). We compare statistical methods across software and describe similarities/differences and reasons for them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Wilcoxon signed-rank test, I am aware of the difference in the test statistic ( S - Signed Rank) vs. a common T+., and that is actually an equivalent.&lt;/P&gt;&lt;P&gt;Nevertheless I struggle replicating the SAS calculations of p value (0.0093 in SAS, versus 0.0095 in StatXact or R).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The considered dataset has 240 observations (so &amp;gt;20), no ties and no "0" differences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please specify what method is used in SAS to calculate the p value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 12:35:16 GMT</pubDate>
    <dc:creator>ATomczyk</dc:creator>
    <dc:date>2024-07-17T12:35:16Z</dc:date>
    <item>
      <title>PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931523#M46440</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;We are reaching out to you to get some more understanding on the PROC UNIVARIATE &lt;STRONG&gt;Signed Rank S statistic&lt;/STRONG&gt; and associated &lt;STRONG&gt;Pr &amp;gt;=|S| (p-value)&lt;/STRONG&gt; as described here: &lt;A href="https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect068.htm" target="_blank"&gt;PROC UNIVARIATE: Performing a Sign Test Using Paired Data (sas.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ATomczyk_0-1718012347230.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97174i29D66A83011C58B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ATomczyk_0-1718012347230.png" alt="ATomczyk_0-1718012347230.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we have a sample size &amp;gt;20, we match on the S statistic, but can’t get a match on the p-value result (we are using R for comparison which uses Normal distribution approximation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you clarify what algorithm is followed for calculating p values?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is the normal/t-Student/Monte Carlo distribution applied?&lt;/LI&gt;&lt;LI&gt;Is a continuity correction added?&lt;/LI&gt;&lt;LI&gt;Which approach is followed? We have noticed p values are not based on Bauer or Hodges-Lehman algorithms&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 09:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931523#M46440</guid>
      <dc:creator>ATomczyk</dc:creator>
      <dc:date>2024-06-10T09:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931531#M46441</link>
      <description>&lt;P&gt;What is the purpose of your study?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The statistic itself is sometimes reported differently in different software. This has been discussed before. There are several different statistics that can be used for the signed rank test.&amp;nbsp; See &lt;A href="https://blogs.sas.com/content/iml/2023/07/19/wilcoxon-signed-rank.html" target="_self"&gt;"On the computation of the Wilcoxon signed rank statistic"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the p-values and continuity corrections, there is a modification to the test statistic due to Pratt, which will affect the p-values. For a discussion of that and other issues, see &lt;A href="https://blogs.sas.com/content/iml/2023/07/24/exact-signed-rank-pratt.html" target="_self"&gt;"Modifications of the Wilcoxon signed rank test and exact p-values."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both articles contain references.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 10:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931531#M46441</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-06-10T10:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931557#M46442</link>
      <description>&lt;P&gt;One thing I always ask when some one says "values don't match" is "what is the other value that didn't match?" If the SAS result for something is 0.5278 and a different program reports 0.528 then I would say they are likely "the same but rounded differently" . If you export that SAS output to a data set I am almost certain that the value will show a different value and the 0.5278 has been rounded to 4 decimal places as that is what the format width of 6 will show: 6 characters, one for the typical leading 0, the decimal itself and 4 more characters for decimal places. Or if the value is small you get the &amp;lt;.0001 for 6 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without data and actual code submitted we can't be sure if any SAS options may have been applied that might affect the calculations. And of course we&amp;nbsp; have no idea what you submitted in R.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 13:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/931557#M46442</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-10T13:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936030#M46664</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Massive thanks for coming back to us. We really appreciate you lookin into that and referring us to the articles.&lt;/P&gt;&lt;P&gt;This study is part of the CAMIS project (&lt;A href="https://psiaims.github.io/CAMIS/" target="_blank"&gt;https://psiaims.github.io/CAMIS/&lt;/A&gt;). We compare statistical methods across software and describe similarities/differences and reasons for them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Wilcoxon signed-rank test, I am aware of the difference in the test statistic ( S - Signed Rank) vs. a common T+., and that is actually an equivalent.&lt;/P&gt;&lt;P&gt;Nevertheless I struggle replicating the SAS calculations of p value (0.0093 in SAS, versus 0.0095 in StatXact or R).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The considered dataset has 240 observations (so &amp;gt;20), no ties and no "0" differences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please specify what method is used in SAS to calculate the p value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 12:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936030#M46664</guid>
      <dc:creator>ATomczyk</dc:creator>
      <dc:date>2024-07-17T12:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936035#M46665</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for looking into that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As have mentioned in my above response, the study is part of CAMIS project, where we look into differences between statistical methods in software.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for mentioning the rounding! We can see that as well that it is a case for many "not matching" results. I've ruled that out already as that is a difference between 0.0093 vs .&amp;nbsp;0.009535.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is 240 observations dataset, no ties, no "0" differences.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case SAS should apply the non-exact method as an only option (if I understood the specification correctly).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what distribution is used for the test statistic? Is it with or without continuity correction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am happy to share more details, dataset and the matching calculations in R and StatXact.&lt;/P&gt;&lt;P&gt;However enough and much appreciated support from the SAS Community would be sharing the details of the function calculating the p value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help again. It is so nice to see people getting involved in studies like that!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 12:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936035#M46665</guid>
      <dc:creator>ATomczyk</dc:creator>
      <dc:date>2024-07-17T12:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC UNIVARIATE Signed Rank S statistic and associated Pr &gt;=|S| (p-value)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936045#M46666</link>
      <description>&lt;P&gt;The method for calculating the p-value is at the bottom of this page:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_univariate_details17.htm" target="_blank"&gt;SAS Help Center: Tests for Location&lt;/A&gt;. For non-exact p-values, it looks like proc univariate uses a t distribution with a complicated transformation of S. The linked page also gives references for this method.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 13:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-UNIVARIATE-Signed-Rank-S-statistic-and-associated-Pr-gt-S-p/m-p/936045#M46666</guid>
      <dc:creator>Mike_N</dc:creator>
      <dc:date>2024-07-17T13:34:55Z</dc:date>
    </item>
  </channel>
</rss>

