Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: emptycells(reweight)


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: emptycells(reweight)
Date   Mon, 20 Jan 2014 11:53:44 -0600

Giuseppina

The output is correct. You are apparently under the impression that the
-emptycells(reweight)- option will modify cell means. It doesn't; it
only changes the weight given to the existing (non-missing) means.

According to the manual:

"emptycells(reweight) specifies that the effects of the observed cells
be increased to accommodate any missing cells. This makes the margin
estimable but changes its interpretation."

Nothing is said about changing anything in the missing cells.

The purpose of -emptycells(reweight)- is to make it possible to estimate
lower-order margins in the presence of missing cells.

To see what is going on, try the following with and without the
-asbalanced- and -emptycells(reweight)- options.


margins timing
margins sexpart


Steve
[email protected]




On Jan 16, 2014, at 11:48 AM, Valle, Giuseppina wrote:

Hello,

I am trying to estimate margins for an interaction term (3 x 5), but I have an empty cell. In order to reconcile this, have tried to use the emptycells(reweight) option. However, I am still getting the following:

This is from the regression:

timing#sexpart |
          1 1  |          0  (empty)
          1 3  |  -.8425747   1.120406    -0.75   0.453    -3.059825    1.374676
          1 4  |  -.3740791   1.035008    -0.36   0.718     -2.42233    1.674172
          1 5  |  -1.175772   .8898283    -1.32   0.189    -2.936716    .5851718
          3 1  |  -.6043734   .5221451    -1.16   0.249    -1.637683    .4289364
          3 3  |   -.203632   .3666424    -0.56   0.580    -.9292065    .5219424
          3 4  |   1.250838   .5659914     2.21   0.029      .130758    2.370919
          3 5  |  -.6449708   .4828192    -1.34   0.184    -1.600456    .3105142

This is from the margins using the following syntax:

margins timing#sexpart, subpop(if gender==1) asbalanced emptycells(reweight)

Predictive margins                                Number of obs   =       4886
                                                  Subpop. no. obs =       2082
Model VCE    : Linearized

Expression   : Pr(drinkw4), predict()
Empty cells  : reweight
at           : timing           (asbalanced)
               race             (asbalanced)
               famstw1          (asbalanced)
               respeduc         (asbalanced)
               respinc          (asbalanced)
               sexpart          (asbalanced)

--------------------------------------------------------------------------------
               |            Delta-method
               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
timing#sexpart |
          1 1  |          .  (not estimable)
          1 2  |   .2007178   .1292118     1.55   0.120    -.0525326    .4539682
          1 3  |   .1723023   .0888076     1.94   0.052    -.0017573    .3463619
          1 4  |   .2542255   .1413226     1.80   0.072    -.0227617    .5312126
          1 5  |   .2081755   .0813572     2.56   0.011     .0487182    .3676327
          2 1  |   .0763753   .0326297     2.34   0.019     .0124223    .1403284
          2 2  |   .1468328   .0297079     4.94   0.000     .0886064    .2050593
          2 3  |   .2425471   .0450327     5.39   0.000     .1542846    .3308096
          2 4  |   .2508539   .0537633     4.67   0.000     .1454798     .356228
          2 5  |   .3561694   .0553567     6.43   0.000     .2476723    .4646665
          3 1  |   .0494258   .0169824     2.91   0.004     .0161408    .0827107
          3 2  |   .1634568   .0325718     5.02   0.000     .0996172    .2272964
          3 3  |   .2301516   .0512481     4.49   0.000     .1297071    .3305962
          3 4  |    .552356   .1150508     4.80   0.000     .3268606    .7778514
          3 5  |   .2537699   .0858682     2.96   0.003     .0854713    .4220684
--------------------------------------------------------------------------------

Is there something I am doing incorrectly? I have read much of what is the stata manual regarding this command, but it seems to still not be working. Any advice would be greatly appreciated!

Thanks,
Pina




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


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index