Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Two questions on interpreting -signtest- output


From   Reza C Daniels <[email protected]>
To   [email protected]
Subject   st: Two questions on interpreting -signtest- output
Date   Mon, 14 Nov 2005 15:24:48 +0200

Dear Statalisters,

I am having difficulty interpreting output from two -signtest- commands.

-----

* (1) Testing distribution of variable in 1995 and 2000 are equal
. signtest rtotshare95=rtotshare00

Sign test
        sign |    observed    expected
-------------+------------------------
    positive |        9646       13135
    negative |       16624       13135
        zero |           0           0
-------------+------------------------
         all |       26270       26270

One-sided tests:
  Ho: median of rtotsha~95 - rtotshare00 = 0 vs.
  Ha: median of rtotsha~95 - rtotshare00 > 0
      Pr(#positive >= 9646) =
         Binomial(n = 26270, x >= 9646, p = 0.5) =  1.0000

  Ho: median of rtotsha~95 - rtotshare00 = 0 vs.
  Ha: median of rtotsha~95 - rtotshare00 < 0
      Pr(#negative >= 16624) =
         Binomial(n = 26270, x >= 16624, p = 0.5) =  0.0000

Two-sided test:
  Ho: median of rtotsha~95 - rtotshare00 = 0 vs.
  Ha: median of rtotsha~95 - rtotshare00 != 0
      Pr(#positive >= 16624 or #negative >= 16624) =
         min(1, 2*Binomial(n = 26270, x >= 16624, p = 0.5)) =  0.0000
-----

* (2) Testing distribution of variable in 2000 and 2004 are equal
. signtest rtotshare00=rtotshare04

Sign test
        sign |    observed    expected
-------------+------------------------
    positive |       15276       13135
    negative |       10994       13135
        zero |           0           0
-------------+------------------------
         all |       26270       26270

One-sided tests:
  Ho: median of rtotsha~00 - rtotshare04 = 0 vs.
  Ha: median of rtotsha~00 - rtotshare04 > 0
      Pr(#positive >= 15276) =
         Binomial(n = 26270, x >= 15276, p = 0.5) =  0.0000

  Ho: median of rtotsha~00 - rtotshare04 = 0 vs.
  Ha: median of rtotsha~00 - rtotshare04 < 0
      Pr(#negative >= 10994) =
         Binomial(n = 26270, x >= 10994, p = 0.5) =  1.0000

Two-sided test:
  Ho: median of rtotsha~00 - rtotshare04 = 0 vs.
  Ha: median of rtotsha~00 - rtotshare04 != 0
      Pr(#positive >= 15276 or #negative >= 15276) =
         min(1, 2*Binomial(n = 26270, x >= 15276, p = 0.5)) =  0.0000
-----

My first question is: am I supposed to use a one sided test or the
two-sided test? My inclination is to use the one sided test given my
priors concerning the relationships between the variables.

My second question is: is it usual to see values of either 0.0000 or
1.0000 in this test, or is this more a function of my particular
variables in this dataset?

Any assistance would be appreciated.
Reza

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index