Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wilcoxon Signed Rank Test (one tail)

    Hi,
    I'm conducting a Wilcoxon Signed Rank Test for non-normally distributed data taken before and after a treatment is applied. My research hypothesis is that the treatment should lead to an increase, but the Wilcoxon test is two-tailed and thus only measures a significant difference in medians but provides no directionality, that I know of. Is there a way to make the Wilcoxon test indicate directional significance (like a one-tailed t test would)?

  • #2
    For this, you may wish to use - signtest - instead.
    Best regards,

    Marcos

    Comment


    • #3
      Hi Gabe. I'll start with a disclaimer. Use of a one-tailed test implies that one is perfectly happy--and it is perfectly sensible--to treat a huge difference in the "wrong" direction equivalently to a zero difference. There may be some circumstances where that is sensible and justifiable; but given that those circumstances are fairly rare, most authors recommend using two-tailed tests (virtually) always. (The concern is that the decision to use a one-tailed test may be post hoc, after the effect is confirmed to be in the "right" direction.)

      What is your sample size? If it is large enough to justify using the z-test you get from signrank, you can just compute the one-tailed p-values yourself via the normal() function. E.g.,

      Code:
      clear
      webuse fuel
      signrank mpg1 = mpg2
      display "Prob < z = " normal(r(z)) "     Prob > z = " 1-normal(r(z))
      Output:
      Code:
      . clear
      
      . webuse fuel
      
      . signrank mpg1 = mpg2
      
      Wilcoxon signed-rank test
      
              sign |      obs   sum ranks    expected
      -------------+---------------------------------
          positive |        3        13.5        38.5
          negative |        8        63.5        38.5
              zero |        1           1           1
      -------------+---------------------------------
               all |       12          78          78
      
      unadjusted variance      162.50
      adjustment for ties       -1.63
      adjustment for zeros      -0.25
                           ----------
      adjusted variance        160.63
      
      Ho: mpg1 = mpg2
                   z =  -1.973
          Prob > |z| =   0.0485
      
      . display "Prob < z = " normal(r(z)) "     Prob > z = " 1-normal(r(z))   
      Prob < z = .02427202     Prob > z = .97572798
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment

      Working...
      X