BookmarkSubscribeRSS Feed
ATomczyk
Calcite | Level 5

Dear Community,

We are reaching out to you to get some more understanding on the PROC UNIVARIATE Signed Rank S statistic and associated Pr >=|S| (p-value) as described here: PROC UNIVARIATE: Performing a Sign Test Using Paired Data (sas.com)

ATomczyk_0-1718012347230.png

 

When we have a sample size >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).

 

Could you clarify what algorithm is followed for calculating p values?

  • Is the normal/t-Student/Monte Carlo distribution applied?
  • Is a continuity correction added?
  • Which approach is followed? We have noticed p values are not based on Bauer or Hodges-Lehman algorithms

 

2 REPLIES 2
Rick_SAS
SAS Super FREQ

What is the purpose of your study? 

 

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.  See "On the computation of the Wilcoxon signed rank statistic"

 

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 "Modifications of the Wilcoxon signed rank test and exact p-values."

 

Both articles contain references.

ballardw
Super User

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 <.0001 for 6 characters.

 

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  have no idea what you submitted in R.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 437 views
  • 2 likes
  • 3 in conversation