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: Re: st: Why does a non-statistically significant covariate in a a regression model become significant in margins?


From   Joerg Luedicke <[email protected]>
To   [email protected]
Subject   Re: Re: st: Why does a non-statistically significant covariate in a a regression model become significant in margins?
Date   Fri, 14 Dec 2012 16:32:09 -0500

Ariel had a follow-up question which he sent to me offlist.

Here is his question:

On Fri, Dec 14, 2012 at 4:08 PM, Ariel Linden, DrPH
<[email protected]> wrote:
> Joerg,
>
> As a quick followup (I can post this on the listserve if you prefer to
> respond publically):
>
> How would I get the predicted values for the binary part of the model via
> margins? I thought perhaps predict(pr), but that doesn't seem to give the
> same results as your manual calculation:
>
> . sum p_c p_t
>
>     Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>          p_c |     10000    .4449147    .1127882   .1127662   .8525233
>          p_t |     10000      .33073    .1019106   .0709849   .7765486
>
> . margins, at(treat=(0 1)) expression(predict(pr))
>
> Predictive margins                                Number of obs   =
> 10000
> Model VCE    : OIM
>
> Expression   : Pr(y=0), predict(pr)
>
> 1._at        : treat           =           0
>
> 2._at        : treat           =           1
>
> ----------------------------------------------------------------------------
> --
>              |            Delta-method
>              |     Margin   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
> -------------+--------------------------------------------------------------
> --
>          _at |
>           1  |   .5550853   .0076111    72.93   0.000     .5401679
> .5700028
>           2  |     .66927   .0076781    87.17   0.000     .6542211
> .6843188
> ----------------------------------------------------------------------------
> --
>

My response:

In the inflation part of the model, we predict the probability of y=0.
However, with the marginal predictions of counts using both model
components, we weight the nonzero counts with the probability of y>0,
which is simply 1 - p(y=0). Therefore, we can type:

margins, at(treat=(0 1)) expression(1-(predict(pr)))

in order to get the marginal predictions for p(y>0).

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