Programming the statistical procedures from SAS

Walsh Averages and Wilcoxon Statistic

Reply
Regular Contributor
Posts: 165

Walsh Averages and Wilcoxon Statistic

Since my company still hasn't switched to 9.2 I am in the middle of writing a program that computes the Hodges-Lehmann estimate and CI. I want to check that my Walsh averages are correct and I know that you can use them to calculate the Wilcoxon Signed Rank test statistic so I am checking my derived value against proc univariates output. The problem is that my Walsh averages have ties at mu=0 and the only reference I could find for ties online said to count ties as 0.5 and values greater than 0 as 1 and sum up those values.

My value for S does not match proc univariate. It seems from my data that I should count ties as 0.25. Is my code all wrong and this is a coincidence or is my reference wrong?
Regular Contributor
Posts: 165

Re: Walsh Averages and Wilcoxon Statistic

So it looks like there was both a coincidence and SAS doesn't give the rank sign test statistic as expected. SAS subtracts Nt(Nt+1)/4 from the usual rank sign test where Nt is the number of values not equal to the hypothesized median. Does anyone know where this comes from?
Ask a Question
Discussion stats
  • 1 reply
  • 603 views
  • 0 likes
  • 1 in conversation