BookmarkSubscribeRSS Feed
LAYMAN_YO
Calcite | Level 5

Th Mann-Whitney (WMW) chi-square statistic is

X2 =[ R1-E(R1)]/se(R1)] * [ R1-E(R1)]/se(R1)]   

The WMW U formulation is based on a U statistic instead of a rank sum, but hose two quantities differ only by a constant,

that is   U1= n1*n2 + n1*(n1+n2)/2 - R1

and the WMW chi-square test statistic may be expressed as:

 X2=[ U1-E(U1)]/se(U1)] * [ U1-E(U1)]/se(U1)] 

 

The general null hypothesis of the WMW test is p''=Pr(X1 >X2 ) + 1/2 * Pr(X1=X2) =.5 

 U1/n1/n2 = p''_hat  

So, the chi-square statistic might be expressed as:

X2={ [ p''_hat -E(p''_hat)] / se(U1)/n1/n2] } * { [ p''_hat -E(p''_hat)] / se(U1)/n1/n2] }

which directly shows that the WMW procdeure is  a test of 

p''=Pr(X1 >X2 ) + 1/2 * Pr(X1=X2) = 0.5.

--------------------------------------------------------

I tried to compare the test result using NPAR1WAY and LOGISTIC procedures.

data roc;
input arm z ;
cards;
1 1
1 1
1 1
1 2
2 1
2 2
2 3
2 3
;
run;

proc npar1way data=roc wilcoxon;
class arm;
var z;
exact wilcoxon;
run;

                Wilcoxon Two-Sample Test                                                                

                                                                      t Approximation       Exact
Statistic (S)     Z            Pr < Z   Pr > |Z|       Pr < Z Pr > |Z|          Pr <= S     Pr >= |S-Mean|

13.0000         -1.4031  0.0803  0.1606        0.1017 0.2033          0.1286       0.2571
Z includes a continuity correction of 0.5.


Kruskal-Wallis Test
Chi-Square DF   Pr > ChiSq
2.4306       1      0.1190


proc logistic data=roc;
model arm=z/ scale=none
clparm=wald
clodds=pl
rsquare;
roc ; roccontrast;
run;

 

                      ROC Association Statistics

                               Mann-Whitney 

ROC Model    Area      Standard   95% Wald

                                     Error        Confidence Limits
Model             0.8125   0.1614     0.4962 1.0000  
ROC1             0.5000   0              0.5000 0.5000     

 

ROC Contrast Test Results
Contrast                   DF     Chi-Square   Pr > ChiSq
Reference = Model  1        3.7500          0.0528

 

p'' = 0.8125

               

I could not get find any same chi-square values.

What is wrong with the idea?

 
5 REPLIES 5
PaigeMiller
Diamond | Level 26

You will not find the same chi-squared tests. LOGISTIC and NPAR1WAY do different tests, using different assumptions and different algorithms. It's perfectly normal to show different results.

--
Paige Miller
LAYMAN_YO
Calcite | Level 5

The null hypothesis for WMW is Pr(X1>X2) + 1/2 * Pr(X1=X2)=0.5

I think that for AUC is the same.

How different are test statistics for both tests?

Could you tell me in a more specific formula?

PaigeMiller
Diamond | Level 26

"LOGISTIC and NPAR1WAY do different tests, using different assumptions and different algorithms."

 

It doesn't matter that the null hypotheses are the same. 

--
Paige Miller
StatDave
SAS Super FREQ

Formulas for the test and and confidence interval in ROC analysis are given in the Details:Receiver Operating Characteristic Curves section of the PROC LOGISTIC documentation. A reference to a paper by DeLong et. al. is also provided which describes the connection to the Mann-Whitney U statistic which might be what you need to look over.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 1299 views
  • 1 like
  • 4 in conversation