Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Why does a non-statistically significant covariate in a a regression model become significant in margins?


From   "Ariel Linden, DrPH" <ariel.linden@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Why does a non-statistically significant covariate in a a regression model become significant in margins?
Date   Thu, 13 Dec 2012 15:48:43 -0500

Hi Fellow Listers,

I am getting conflicting results from the regression output for a covariate
and when I subsequently run margins. More specifically, I ran -zinb- with
the primary covariate of interest being treatment and got a p value of
0.152. I then ran margins to see the predicted values for treatment and
non-treatment, and then ran contrasts. The contrast indicates that the
difference between treatment and control is statistically significant (p
value =  0.0048). See below for the output...

Could this be due to the different methods of estimating the p values
between the original regression and margins? If so, how do I reconcile the
two? Obviously, the covariate can't be both significant and not-significant
at the same time.

Thanks!

Ariel

**** code ****
. zinb readmittot $xs [pw= attwt], inflate($xs) robust irr

<output omitted?

Zero-inflated negative binomial regression        Number of obs   =
7264
                                                  Nonzero obs     =
882
                                                  Zero obs        =
6382

Inflation model      = logit                      Wald chi2(9)    =
39.46
Log pseudolikelihood = -801.1061                  Prob > chi2     =
0.0000

----------------------------------------------------------------------------
--
             |               Robust
  readmittot |        IRR   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
readmittot   |
     1.treat |    .783026   .1337402    -1.43   0.152     .5602626
1.094361  //treatment is not significant
        dxcg |   1.010933    .003087     3.56   0.000     1.004901
1.017002
   preadmits |   .9912419   .0510683    -0.17   0.864     .8960375
1.096562
    ervisits |   .9347274   .1392932    -0.45   0.651     .6979733
1.251789
    opvisits |   .8799214   .1362863    -0.83   0.409     .6495399
1.192016
         age |   1.001473   .0055586     0.27   0.791     .9906373
1.012427
         sex |   1.045554   .1525712     0.31   0.760     .7854813
1.391736
   cci_score |   .9187872   .0707482    -1.10   0.271     .7900797
1.068462
         gap |   .9636616   .0135773    -2.63   0.009     .9374147
.9906434
       _cons |   .2499155   .1165989    -2.97   0.003     .1001526
.6236259
-------------+--------------------------------------------------------------
--
inflate      |
     1.treat |   .3987922   .4116639     0.97   0.333    -.4080542
1.205639
        dxcg |  -.2056051   .0401806    -5.12   0.000    -.2843577
-.1268526
   preadmits |  -.2580604   .2825054    -0.91   0.361    -.8117609
.2956401
    ervisits |  -.3233463   .3895552    -0.83   0.407    -1.086861
.4401679
    opvisits |  -.1520791   .4182457    -0.36   0.716    -.9718256
.6676674
         age |   .0327528   .0177659     1.84   0.065    -.0020678
.0675734
         sex |   .2615432   .4124321     0.63   0.526     -.546809
1.069895
   cci_score |   -.337497   .2392857    -1.41   0.158    -.8064884
.1314944
         gap |  -.1037818   .0423225    -2.45   0.014    -.1867325
-.0208311
       _cons |   1.603676   1.316273     1.22   0.223     -.976172
4.183524
-------------+--------------------------------------------------------------
--
    /lnalpha |  -1.116844   .5762305    -1.94   0.053    -2.246235
.0125467
-------------+--------------------------------------------------------------
--
       alpha |    .327311   .1886066                      .1057968
1.012626
----------------------------------------------------------------------------
--

. margins treat

Predictive margins                                Number of obs   =
7264
Model VCE    : Robust

Expression   : Predicted number of events, predict()

----------------------------------------------------------------------------
--
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
       treat |
          0  |   .1214688   .0067881    17.89   0.000     .1081643
.1347733
          1  |   .0858302   .0094371     9.09   0.000     .0673339
.1043266
----------------------------------------------------------------------------
--

. margins r.treat

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
       treat |          1        7.97     0.0048 //treatment is significant
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
       treat |
   (1 vs 0)  |  -.0356385   .0126276     -.0603881    -.010889
--------------------------------------------------------------
**************end code**********************
. 



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index