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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Margins after mlogit with survey data


From   kmacdonald@stata.com (Kristin MacDonald, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Margins after mlogit with survey data
Date   Wed, 08 Sep 2010 14:31:31 -0500

Joao Lima <jricardofl@gmail.com> used -margins- after -svy:mlogit- and the
marginal effects were reported as "not estimable".  

This may be caused by numerical instabilities in determining estimable
functions with some -svy:mlogit- model fits.  We believe we have a fix for
this; the fix should be available in the next executable update.

In the meantime, Joao may be able to obtain the marginal effects by specifying
a different base outcome in the -svy:mlogit- command.  Although the estimated
coefficients change based on the choice of base outcome, the marginal effects
will not change.  Using an example similar to Joao's, we can see that the
marginal effects are not estimated when specifying the -baseoutcome(1)- option
in -svy:mlogit-.  However, if we specify -baseoutcome(4)-, -margins- will
calculate the marginal effects.  

***** BEGIN:
. webuse nhanes2f

. svyset psuid [pweight=finalwgt], strata(stratid)

      pweight: finalwgt
          VCE: linearized
  Single unit: missing
     Strata 1: stratid
         SU 1: psuid
        FPC 1: <zero>

. svy: mlogit  region i.sex i.race c.age##c.age sizplace, baseoutcome(1)
(output omitted)

. margins, vce(unconditional) dydx(*) predict(outcome(1)) atmeans

Conditional marginal effects                    Number of obs      =     10337

Expression   : Pr(region==NE), predict(outcome(1))
dy/dx w.r.t. : 2.sex 2.race 3.race age sizplace
at           : 1.sex           =    .4795785 (mean)
               2.sex           =    .5204215 (mean)
               1.race          =    .8790162 (mean)
               2.race          =    .0956152 (mean)
               3.race          =    .0253686 (mean)
               age             =    42.23732 (mean)
               sizplace        =    4.808137 (mean)

------------------------------------------------------------------------------
             |             Linearized
             |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       2.sex |  (not estimable)
             |
        race |
          2  |  (not estimable)
          3  |  (not estimable)
             |
         age |  (not estimable)
    sizplace |  (not estimable)
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. svy: mlogit  region i.sex i.race c.age##c.age sizplace, baseoutcome(4)
(output omitted)

. margins, vce(unconditional) dydx(*) predict(outcome(1)) atmeans

Conditional marginal effects                    Number of obs      =     10337

Expression   : Pr(region==NE), predict(outcome(1))
dy/dx w.r.t. : 2.sex 2.race 3.race age sizplace
at           : 1.sex           =    .4795785 (mean)
               2.sex           =    .5204215 (mean)
               1.race          =    .8790162 (mean)
               2.race          =    .0956152 (mean)
               3.race          =    .0253686 (mean)
               age             =    42.23732 (mean)
               sizplace        =    4.808137 (mean)

------------------------------------------------------------------------------
             |             Linearized
             |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       2.sex |  -.0110787   .0073234    -1.51   0.140    -.0260149    .0038575
             |
        race |
          2  |  -.1496754    .029835    -5.02   0.000    -.2105243   -.0888265
          3  |  -.1779278   .0299411    -5.94   0.000    -.2389932   -.1168625
             |
         age |   .0006879   .0004459     1.54   0.133    -.0002216    .0015974
    sizplace |  -.0198073   .0087242    -2.27   0.030    -.0376004   -.0020143
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
***** END:

If changing the base outcome does not produce estimable marginal effects, Joao
can email tech-support@stata.com for more support on this.

-- Kristin					-- Jeff
kmacdonald@stata.com				jpitblado@stata.com

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