# Re: st: margeff

 From peter harper To statalist@hsphsun2.harvard.edu Subject Re: st: margeff Date Thu, 10 Mar 2005 14:37:07 +0000 (GMT)

```Dear Clive
I tried
.mfx,
> predict(p outcome()) at(mean)
as you suggest below
and
. mfx predict (outcome (2))
but I got
unknown mfx subcommand predict
r(198);
Many Thanks

--- Clive Nicholas <Clive.Nicholas@newcastle.ac.uk>
wrote:
> Peter Harper wrote:
>
> > I have run -margeff-, on the three responders
> > categories of price being 'very' 'fairly' and
> 'not'
> > important. But the z-statistic of one of the
> variables
> > in the 'fairly important' category is 998.42. For
> the
> > other two categories they were around 2.00. Can
> anyone
> > tell me how to correctly interpret the z-statistic
> of
>
> Looks a bit suss to me, but it's difficult to advise
> you further without
> seeing some actual output. Also, you may find it
> more useful to use -mfx,
> predict(p outcome()) at(mean)-. You should find that
> slightly different using -mfx-. An example:
>
> . use http://www.gseis.ucla.edu/courses/data/hsb2,
> clear
> (highschool and beyond (200 cases))
>
> . ologit ses female race read write math
>
> Iteration 0:   log likelihood = -210.58254
> Iteration 1:   log likelihood = -197.51869
> Iteration 2:   log likelihood = -197.36092
> Iteration 3:   log likelihood = -197.36061
>
> Ordered logit estimates
> Number of obs   =        200
>                                                 LR
> chi2(5)      =      26.44
>                                                 Prob
> > chi2     =     0.0001
> Log likelihood = -197.36061
> Pseudo R2       =     0.0628
>
----------------------------------------------------------------------------
>        ses |      Coef.   Std. Err.      z    P>|z|
>    [95% Conf. Interval]
>
-----------+----------------------------------------------------------------
>     female |  -.4909873   .2952412    -1.66   0.096
>   -1.069649    .0876748
>       race |   .2350773    .137125     1.71   0.086
>   -.0336828    .5038373
>       read |   .0311981   .0193404     1.61   0.107
>   -.0067085    .0691046
>      write |   .0118174   .0209855     0.56   0.573
>   -.0293134    .0529481
>       math |   .0228895   .0209798     1.09   0.275
>   -.0182301    .0640091
>
-----------+----------------------------------------------------------------
>      _cut1 |   2.692794   .9248859
> (Ancillary parameters)
>      _cut2 |    4.99739   .9796558
>
----------------------------------------------------------------------------
>
> . margeff
>
> Marginal effects on Prob(ses) after ologit
>
----------------------------------------------------------------------------
>        ses |      Coef.   Std. Err.      z    P>|z|
>    [95% Conf. Interval]
>
-----------+----------------------------------------------------------------
> low        |
>     female |   .0803274    .119315     0.67   0.501
>   -.1535258    .3141805
>       race |  -.0388374   .0480915    -0.81   0.419
>   -.1330949    .0554202
>       read |  -.0051543   .0068777    -0.75   0.454
>   -.0186343    .0083258
>      write |  -.0019524   .0037731    -0.52   0.605
>   -.0093475    .0054428
>       math |  -.0037816   .0049511    -0.76   0.445
>   -.0134856    .0059224
>
-----------+----------------------------------------------------------------
> middle     |
>     female |  -.0802519    .196229    -0.41   0.683
>   -.4648537      .30435
>       race |   .1212574   .0938469     1.29   0.196
>   -.0626791     .305194
>       read |   .1593779   .0124249    12.83   0.000
>    .1350254    .1837303
>      write |   .1630016   .0048255    33.78   0.000
>    .1535437    .1724595
>       math |   .1609314     .00923    17.44   0.000
>    .1428409    .1790218
>
-----------+----------------------------------------------------------------
> high       |
>     female |  -.0930442   .1030793    -0.90   0.367
>   -.2950758    .1089874
>       race |   .0439537   .0564441     0.78   0.436
>   -.0666746    .1545821
>       read |   .0058333   .0072293     0.81   0.420
>   -.0083359    .0200025
>      write |   .0022096   .0049231     0.45   0.654
>   -.0074394    .0118586
>       math |   .0042798    .006634     0.65   0.519
>   -.0087226    .0172821
>
----------------------------------------------------------------------------
>
> . mfx, predict(p outcome(1)) at(mean)
>
> Marginal effects after ologit
>       y  = Pr(ses==1) (predict, p outcome(1))
>          =  .21347808
>
----------------------------------------------------------------------------
> variab |      dy/dx    Std. Err.     z    P>|z|  [
>  95% C.I.   ]      X
>
-------+--------------------------------------------------------------------
> female*|   .0813982      .04854    1.68   0.094
> -.013747  .176543      .545
>   race |  -.0394707      .02316   -1.70   0.088
> -.084865  .005923      3.43
>   read |  -.0052383      .00326   -1.61   0.108
> -.011619  .001143     52.23
>  write |  -.0019842      .00352   -0.56   0.573
> -.008889  .004921    52.775
>   math |  -.0038433      .00352   -1.09   0.275
> -.010748  .003061    52.645
>
----------------------------------------------------------------------------
> (*) dy/dx is for discrete change of dummy variable
> from 0 to 1
>
> . mfx, predict(p outcome(2)) at(mean)
>
> Marginal effects after ologit
>       y  = Pr(ses==2) (predict, p outcome(2))
>          =  .51768066
>
----------------------------------------------------------------------------
> variab |      dy/dx    Std. Err.     z    P>|z|  [
>  95% C.I.   ]      X
>
-------+--------------------------------------------------------------------
> female*|   .0159065      .01619    0.98   0.326
> -.015826  .047638      .545
>   race |  -.0067374       .0071   -0.95   0.343
> -.020658  .007183      3.43
>   read |  -.0008942      .00097   -0.92   0.358
> -.002799  .001011     52.23
>  write |  -.0003387      .00068   -0.50   0.617
> -.001665  .000988    52.775
>   math |   -.000656      .00084   -0.78   0.436
> -.002307  .000995    52.645
>
----------------------------------------------------------------------------
> (*) dy/dx is for discrete change of dummy variable
> from 0 to 1
>
> . mfx, predict(p outcome(3)) at(mean)
>
> Marginal effects after ologit
>       y  = Pr(ses==3) (predict, p outcome(3))
>          =  .26884126
>
----------------------------------------------------------------------------
> variab |      dy/dx    Std. Err.     z    P>|z|  [
>  95% C.I.   ]      X
>
-------+--------------------------------------------------------------------
> female*|  -.0973046      .05883   -1.65   0.098
> -.212612  .018002      .545
>   race |   .0462081      .02689    1.72   0.086
> -.006496  .098913      3.43
>   read |   .0061325       .0038    1.61   0.107
> -.001323  .013588     52.23
>  write |   .0023229      .00413    0.56   0.574
> -.005767  .010413    52.775
>   math |   .0044993      .00413    1.09   0.275
> -.003586  .012584    52.645
>
----------------------------------------------------------------------------
> (*) dy/dx is for discrete change of dummy variable
> from 0 to 1
>
> In this example, we can see that the elasticities
> (dy/dx) are very
> similiar to those given in -margeff- for low and
> high values of
> socioeconomic status (and, indeed, the pattern is
> identical), but are
> completely different at 'middle' values of SES.
>
> Note that -mfx- provides you with some extra
> information here: the
> (overall) predicted probability of Y = 1, 2 or 3
> given the X-variables set
> at their mean values. In this example, respondents
> with 'average' social
> and educational characteristics are much more likely
> to be in the 'middle'
> SES category than in the other two.
>
> I hope that helps.
>
> CLIVE NICHOLAS        |t: 0(044)7903 397793
> Politics              |e: clive.nicholas@ncl.ac.uk
> Newcastle University  |http://www.ncl.ac.uk/geps
>
> *
> *   For searches and help try:
>
=== message truncated ===

Send instant messages to your online friends http://uk.messenger.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```

• Follow-Ups:
• References: