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

st: RE: strange? result: 95%CI and lincom


From   "FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: strange? result: 95%CI and lincom
Date   Thu, 3 Jun 2004 09:14:55 -0500

Looking at each confidence interval separately ignores possible dependence
between the coefficient esimates. A good example of this is a paired t-test
model. Here's some made up data:


. list x1 x2 d

            x1         x2          d
  1.  .3650457   .5626279   .1975822
  2. -.9196886  -.7234909   .1961977
  3.  1.530455   1.712054   .1815995
  4.  .7840586   .9778702   .1938117
  5. -1.224617  -1.050244   .1743729
  6.  .2872651   .4989243   .2116592
  7.  .6170482   .8081521   .1911039
  8.    -1.588  -1.374773   .2132277
  9.  1.599901   1.816106    .216205
 10.  .5002477    .722126   .2218783

. ttest x1=x2

Paired t test

----------------------------------------------------------------------------
--
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf.
Interval]
---------+------------------------------------------------------------------
--
      x1 |      10    .1951716    .3472085     1.09797   -.5902687
.9806119
      x2 |      10    .3949354    .3477286    1.099614   -.3916813
1.181552
---------+------------------------------------------------------------------
--
    diff |      10   -.1997638    .0049269    .0155802   -.2109092
-.1886184
----------------------------------------------------------------------------
--

                     Ho: mean(x1 - x2) = mean(diff) = 0

  Ha: mean(diff) < 0         Ha: mean(diff) ~= 0        Ha: mean(diff) > 0
       t = -40.5457                t = -40.5457              t = -40.5457
   P < t =   0.0000          P > |t| =   0.0000          P > t =   1.0000


Note that the confidence intervals for the means of x1 and x2 overlap
greatly, yet the paired t-test shows an overwhelmingly significant
difference. This is because the differences (d) are centered around -0.2
with a very small SD. It is the variance of the differences that matters,
not the variances of each variable separately.

Similarly in your analysis, each coefficent estimate may have a large SE,
but the SE of the difference may be small, because of correlation.

Actually, even when samples are independent, non-overlapping CI's imply a
"significant" diffference, but not neccessarily the other way.

Al Feiveson




-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of n p
Sent: Thursday, June 03, 2004 3:30 AM
To: [email protected]
Subject: st: strange? result: 95%CI and lincom


Dear statalisters,
consider the following output
.  xi:poisson count i.A i.B i.C i.A*i.C   ,cluster(id)



Poisson regression                               
Number of obs   =         32
                                                  Wald
chi2(2)    =          .
Log pseudo-likelihood = -105.04905                Prob
> chi2     =          .

                               (standard errors
adjusted for clustering on id)
----------------------------------------------------------------------------
--
             |               Robust
       count |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+--------------------------------------------------------------
--
       _IA_1 |   1.572489   .0286677    54.85   0.000 
   1.516302    1.628677
       _IB_1 |   .0204089   .0449014     0.45   0.649 
  -.0675963     .108414
       _IC_1 |   1.254163   .0339171    36.98   0.000 
   1.187686    1.320639
   _IAXC_1_1 |  -1.199721    .014818   -80.96   0.000 
  -1.228763   -1.170678
       _cons |   3.228422   .0355479    90.82   0.000 
   3.158749    3.298095
----------------------------------------------------------------------------
--

. lincom _IA_1

 ( 1)  [count]_IA_1 = 0

----------------------------------------------------------------------------
--
       count |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+--------------------------------------------------------------
--
         (1) |   1.572489   .0286677    54.85   0.000 
   1.516302    1.628677
----------------------------------------------------------------------------
--

. lincom _IA_1+_IC_1+ _IAXC_1_1

 ( 1)  [count]_IA_1 + [count]_IC_1 + [count]_IAXC_1_1
= 0

----------------------------------------------------------------------------
--
       count |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+--------------------------------------------------------------
--
         (1) |   1.626931   .0482076    33.75   0.000 
   1.532446    1.721416
----------------------------------------------------------------------------
--

. lincom _IC_1+ _IAXC_1_1

 ( 1)  [count]_IC_1 + [count]_IAXC_1_1 = 0

----------------------------------------------------------------------------
--
       count |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+--------------------------------------------------------------
--
         (1) |   .0544419   .0226218     2.41   0.016 
    .010104    .0987798
----------------------------------------------------------------------------
--

A, B, C are binary covariates. As you see the upper
limit of the 95%CI in the first "lincom" is greater
than the beta estimate in the second "lincom" and the
lower limit of the 95% CI in the  second "lincom" is
lower than the beta estimate in the first "lincom".
Given this overlap I was expecting a non-significant
(at the 5% level) difference between the first two
estimates. However the third "lincom" gives a p=0.016
for the difference of the first two estimates. Is
there something wrong with this and if not how can one
justify the overlaping in the CIs when the difference
is significant. Maybe I am missing something obvious
but I can't find a good explanation.

Thanks in advance for any comments

Nikos Pantazis
Biostatistician


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 
*
*   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/
*
*   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