<?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 get one sample Wilcoxon Signed Rank Z Statistic? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695463#M33578</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/347836"&gt;@kwil&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your sample does neither contain two equal values ("ties") nor zeros, I would calculate the &lt;EM&gt;z&lt;/EM&gt; statistic as follows (using &lt;FONT face="courier new,courier"&gt;x&lt;/FONT&gt; as the variable name&lt;FONT face="helvetica"&gt;) -- otherwise it would be more complicated:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=have noprint;
var x;
output out=stats signrank=S n=n;
run;

data want;
set stats;
z=S/sqrt(n*(n+1)*(2*n+1)/24);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is based on&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://www.stata.com/manuals13/rsignrank.pdf" target="_blank" rel="noopener"&gt;https://www.stata.com/manuals13/rsignrank.pdf&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_univariate_details17.htm&amp;amp;locale=en#procstat_univariate015076" target="_blank" rel="noopener"&gt;PROC UNIVARIATE documentation, details section "Wilcoxon Signed Rank Test"&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Note that SAS does not use the &lt;EM&gt;z&lt;/EM&gt; statistic, but a &lt;EM&gt;t&lt;SUB&gt;n-1&lt;/SUB&gt;&lt;/EM&gt; distributed statistic for the p-value computation, which is why the p-value based on the former (0.0327) differs slightly from the p-value in your output (0.0310).&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 13:33:00 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2020-10-30T13:33:00Z</dc:date>
    <item>
      <title>How to get one sample Wilcoxon Signed Rank Z Statistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695387#M33574</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing the significance of the median in my sample using the one sample Wilcoxons signed rank test through proc univariate. However, the ouput presents an S statistic and for reporting purposes I would like to report the commonly used Z statistic. Is there any easy way of getting the Z statistic in SAS or would it be easier using another program like Stata?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwil_1-1604016970254.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51229i559E48EDAC1F5E0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwil_1-1604016970254.png" alt="kwil_1-1604016970254.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 00:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695387#M33574</guid>
      <dc:creator>kwil</dc:creator>
      <dc:date>2020-10-30T00:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get one sample Wilcoxon Signed Rank Z Statistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695429#M33575</link>
      <description>&lt;P&gt;You can use PROC NPAR1WAY in SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_npar1way_overview.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_npar1way_overview.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 10:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695429#M33575</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-30T10:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get one sample Wilcoxon Signed Rank Z Statistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695460#M33577</link>
      <description>&lt;P&gt;Another way would be to use the &lt;STRIKE&gt;CDF&lt;/STRIKE&gt;&lt;STRONG&gt;quantile&lt;/STRONG&gt;('normal') function, plugging in the p value to get the Z value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only issue here is that S really is not normally distributed.&amp;nbsp; For small n, an exact p value is computed.&amp;nbsp; For large n (n&amp;gt;20), there is a function of S that is t distributed (see the Details\Tests for Location part of the UNIVARIATE documentation).&amp;nbsp; I don't see any reference to a Z score for the Signed Rank statistic in the SAS documentation or in my copy of Hollander and Wolfe, which also uses an approximate t distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695460#M33577</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-30T13:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get one sample Wilcoxon Signed Rank Z Statistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695463#M33578</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/347836"&gt;@kwil&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your sample does neither contain two equal values ("ties") nor zeros, I would calculate the &lt;EM&gt;z&lt;/EM&gt; statistic as follows (using &lt;FONT face="courier new,courier"&gt;x&lt;/FONT&gt; as the variable name&lt;FONT face="helvetica"&gt;) -- otherwise it would be more complicated:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=have noprint;
var x;
output out=stats signrank=S n=n;
run;

data want;
set stats;
z=S/sqrt(n*(n+1)*(2*n+1)/24);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is based on&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://www.stata.com/manuals13/rsignrank.pdf" target="_blank" rel="noopener"&gt;https://www.stata.com/manuals13/rsignrank.pdf&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_univariate_details17.htm&amp;amp;locale=en#procstat_univariate015076" target="_blank" rel="noopener"&gt;PROC UNIVARIATE documentation, details section "Wilcoxon Signed Rank Test"&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Note that SAS does not use the &lt;EM&gt;z&lt;/EM&gt; statistic, but a &lt;EM&gt;t&lt;SUB&gt;n-1&lt;/SUB&gt;&lt;/EM&gt; distributed statistic for the p-value computation, which is why the p-value based on the former (0.0327) differs slightly from the p-value in your output (0.0310).&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695463#M33578</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-10-30T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get one sample Wilcoxon Signed Rank Z Statistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695858#M33587</link>
      <description>Thanks very much, works great!</description>
      <pubDate>Mon, 02 Nov 2020 09:09:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-one-sample-Wilcoxon-Signed-Rank-Z-Statistic/m-p/695858#M33587</guid>
      <dc:creator>kwil</dc:creator>
      <dc:date>2020-11-02T09:09:18Z</dc:date>
    </item>
  </channel>
</rss>

