3
$\begingroup$

I want to calculate the standard error of the area under the curve computed with the Mann-Whitney U-Test (MWUT).

Hanley and McNeil 1982 give a formula for it (they call the AUC calculated with the MWUT "W"). However I'm finding this hard to implement so I'd like to bootstrap it to check/replace my work.

My question is how do I sample from the two distributions to perform the bootstrap? Shall I resample from them independently or resample from the whole set together and keep track of the case labels?

Another concern I have is how the resampling will affect the MWUT, given that there will be tied ranks.

$\endgroup$
2
  • $\begingroup$ Just a question: why are you interested in the standard error and not, e.g., a confidence interval? $\endgroup$ Sep 25 '13 at 1:58
  • 1
    $\begingroup$ i'm using the standard error to estimate a confidence interval. true, this could be directly estimated using the bootstrap, but i'd like to ultimately use the formulas given for the SE approximation. $\endgroup$
    – dylan2106
    Oct 7 '13 at 20:49
-1
$\begingroup$

I believe you would put both samples together since under the null hypothesis they are supposed to be equal. Then you bootstrap by selecting from the total sample taking care to identify each of the two groups. You might try something like the following:

library(boot)
grp1<-rbinom(15,10,.3)  #simulated group 1 values
grp2<-rbinom(12,10,.5)  #simulated group 2 values
values<-c(grp1,grp2)    #combinding the values into one set

myfun=function(values,i)

     {

    grps=as.factor(c(rep('A',15),rep('B',12)))  # index each group
    wilcox.test(values[i]~grps)$statistic       # WMW test extracting its statistic
         }
    myboot=boot(data=values,statistic=myfun,R=2000)
    t
    hist(myboot$t)

The reason the grps variable is created inside the function is that if done on the outside, the bootrap sampling would sample the codes and you would not get the groupings as you desire.

hope this helps.

$\endgroup$
4
  • 1
    $\begingroup$ I'm not convinced that pooling and resampling is the correct approach. The bootstrap is to estimate the SE, so it seems reasonable to keep the group sizes the same (which pooling would not do). I think the pooling you suggest is more appropriate for a permutation test... $\endgroup$
    – dylan2106
    Jul 29 '13 at 15:58
  • $\begingroup$ @dylan2106 If your sample is large, it probably won't make a big difference whether you sample from a pooled or non-pooled dataset. Just take a lot of bootstrap samples and compare. For what it's worth, Efron & Tibshirani (1994) in at least one case do not pool when they do a permutation test (Algorithm 15.1, p. 208). $\endgroup$ Sep 25 '13 at 1:54
  • $\begingroup$ @JoeF Where does t come from after the call to boot? $\endgroup$ Sep 25 '13 at 1:56
  • $\begingroup$ jason, after you run the boot, if you type the command namesImyboot) you will see all the stored parameters, The t is the generated replicates from boot. if you type the command myboot$t you will see these $\endgroup$
    – Joe F
    Aug 3 '20 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.