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]

st: margins after logit model


From   Haiyong Xu <[email protected]>
To   <[email protected]>
Subject   st: margins after logit model
Date   Wed, 29 Dec 2010 15:36:21 -0800

Hi,
Wish you all have wonderful holidays!

My logit model and the output are as follows:

logit psydrgnobzn i.female age i.year, vce(cluster cluster_id)

Logistic regression                               Number of obs   =
40284
                                                 Wald chi2(4)    =
422.81
                                                 Prob > chi2     =
0.0000
Log pseudolikelihood = -26350.649                 Pseudo R2       =
0.0127

                        (Std. Err. adjusted for 13428 clusters in
cluster_id)
------------------------------------------------------------------------------
            |               Robust
psydrgnobzn |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
   1.female |   .5114119   .0357798    14.29   0.000     .4412848
.5815389
        age |  -.0191765   .0023834    -8.05
0.000    -.0238479   -.0145051
            |
       year |
      2006  |    .154101   .0147308    10.46   0.000     .1252292
.1829728
      2007  |   .2495566   .0171274    14.57   0.000     .2159875
.2831257
            |
      _cons |   .5000495   .1866511     2.68   0.007       .13422
.865879
------------------------------------------------------------------------------

After the logit model, I run margins command to get the marginal effect.
. margins, dydx(year)

Average marginal effects                          Number of obs   =
40284
Model VCE    : Robust

Expression   : Pr(psydrgnobzn), predict()
dy/dx w.r.t. : 2006.year 2007.year

------------------------------------------------------------------------------
            |            Delta-method
            |      dy/dx   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
       year |
      2006  |   .0351202   .0033485    10.49   0.000     .0285573
.0416832
      2007  |   .0575292   .0039259    14.65   0.000     .0498345
.0652239
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

The year variables has three values 2005, 2006 and 2007. Stata automatically
set 2005 as the omit group. I wonder if I can set 2006 as the reference
group so that I can get the margin effect between 2006 and 2007.

Thanks.
Haiyong



IMPORTANT WARNING:  This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential.  You, the recipient, are obligated to maintain it in a safe, secure and confidential manner.  Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index