BookmarkSubscribeRSS Feed
liranme
Calcite | Level 5

Hello,

  I was running the following core syntax

Proc  data=XXX;

  class GROUP;

strata STRT;

var OUTCOME;

run;

For a stratified MWM test (2 groups, 2 strata).

I got the output below:

OutputOutput

My question:

We see that the (uncorrected) test-statistic Z is: (46.3 – 42.5) / 1.907524 =  1.992111

While the output Z statistic is: 2.0001

Why is the difference? (approximation/ correction? Couldn’t find any reference and would appreciate having one).

Thanks

Liran

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @liranme and welcome to the SAS Support Communities!

 

Most likely this is just because the stratified rank sum statistic (46.3) is displayed rounded to only one decimal. Note that, e.g.,

(46.3153 - 42.5) / 1.907524 = 2.00013...

 

Put an ODS OUTPUT statement before your PROC NPAR1WAY step,

ods output WilcoxonStrataTest=want;

print the output dataset with a numeric format showing more decimals (after submitting the PROC NPAR1WAY step)

proc print data=want;
format _numeric_ best16.;
run;

and then update your calculation of the Z statistic.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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
  • 1200 views
  • 5 likes
  • 2 in conversation