BookmarkSubscribeRSS Feed
RickM
Fluorite | Level 6
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?
1 REPLY 1
RickM
Fluorite | Level 6
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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1 reply
  • 2807 views
  • 0 likes
  • 1 in conversation