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

ztest: picking up wrong value labels in its output?


From   "Edmond Ng" <[email protected]>
To   <[email protected]>
Subject   ztest: picking up wrong value labels in its output?
Date   Fri, 18 Jul 2003 19:00:41 +0100

Dear all, 

I am just wondering if I am right to point out that 'ztest' seems to
use rather odd labels in its output. My outcome variable is a binary
(0/1) variable representing low birth weight and the explanatory, ht2,
is also a binary (0/1) variable. The null hypothesis shown in the output
is as follows. 

                   Ho: Pr(lbw = 1) - Pr(y = 1) = diff = 0

The labels used in the brackets seem odd. Should Pr( ..) represent the
probability of being a case (low birthweight) in this case, it would
have made more sense if the labels within the brackets  were "ht2=1" and
"ht2=0", respectively. Can anyone shed any light on this oddity please?
Many thanks in advance. 

Edmond 


. ztest lbw, by(ht2) 

Two-sample z test

------------------------------------------------------------------------------
Variable |     Obs        Prop    Std. Err.   Std. Dev.   [95% Conf.
Interval]
---------+--------------------------------------------------------------------
     lbw |     542     .097786    .0127583    .2970251    .0727801   
.1227918
       y |      99    .2727273    .0447605    .4453618    .1849982   
.3604563
---------+--------------------------------------------------------------------
combined |     641     .124805    .0361227    .3304977    .0540058   
.1956042
---------+--------------------------------------------------------------------
    diff |     641   -.1749413    .0361227    .3304977   -.2457405  
-.1041421
------------------------------------------------------------------------------


                   Ho: Pr(lbw = 1) - Pr(y = 1) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff >
0
       z =  -4.8430                z =  -4.8430              z = 
-4.8430
   P < z =   0.0000          P > |z| =   0.0000          P > z =  
1.0000

*
*   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