# Re: st: Marginal effects

 From Maarten buis <[email protected]> To [email protected] Subject Re: st: Marginal effects Date Sun, 20 Apr 2008 13:32:01 +0100 (BST)

```The marginal effects in -mlogit- get a bit ugly, that is the
computation is not difficult, it is just long so many opportunities to
make a typo, see for instance:
http://www.stata.com/statalist/archive/2007-09/msg00505.html

-- Maarten

--- "Joao Ricardo F. Lima" <[email protected]> wrote:

> Maarten and Statalisters,
>
> I'm having this same problem to calculate marginal effects but using
> mlogit.
> First I don't know how to calculate the xb only to the outcome==1,
> for example.
> Second I can't use normalden and I don't find the density function
> logistic in Stata.
>
> > #delimit ;
> > local xb "_b[_cons] +
> >          _b[ttl_exp]*`mttl' +
> >
> >
> > nlcom normalden(`xb') *
> > #delimit cr
>
>
>
> Thank you,
>
> Joao Ricardo
>
> 2008/3/22, Maarten buis <[email protected]>:
> > --- Jos� C. <[email protected]> wrote:
> > >   Maarten specifically thinking about the case of Probit - not
> always
> > > the product of the variables includes a variable dummy. For
> instance,
> > > as independent variables some models consider:
> > >
> > >   y education education(to the square) experience
> > > educationXexperience
> > >
> > >  If I use a command as the mfx - the marginal effect just
> considers
> > > the associated coefficient the education and the correct would
> be:
> > >
> > > dy/d.education = 1 + 2.education(mean) + experience (mean) - if I
> use
> > > mfx with medium effects.
> > >
> > >  Some statistical packages allow logical (as product of terms)
> > > operations and later the linearization of the equations. In
> Stata, I
> > > already have to do that creating variables before defining the
> > > equation. To estimate the equation in itself - that doesn't cause
> any
> > > problem but to establish marginal effects. I easily can calculate
> the
> > > marginal effects manually starting from the equation but I don't
> have
> > > s.e. or intervals of the estimates.
> >
> > As I said, I was trying to interpret your question. I assumed you
> > dummy because you refered to logical operations (AND, OR, NOT,
> which
> > result in either true (1) or false (0)) instead of arithmatic
> > operations (addition, multiplication, etc).
> >
> > Notice that the formula you give is the marginal effect of
> education on
> >
> > the linear predictor (xb) and not on the probability. Below is an
> > example that shows you the marginal effect of education (grade) for
> > average values on all explanatory variables. However, I don't think
> > that it is a good idea to add all kinds of non-linearities to your
> > model and than try to summarize the effect with one number. That
> > defeats the very purpose of adding those non-linearities. For
> instance,
> > you add interactions because you think that the effect of education
> is
> > different for people with different amounts of experience. By
> > summarizing the effect of eductation with 1 number you throw all
> that
> > information away again.
> >
> > *------------- begin example ---------------------
> > sysuse nlsw88, clear
> >
> >
> > sum grade if e(sample)
> > local mgr = r(mean)
> > sum ttl_exp if e(sample)
> > local mttl = r(mean)
> >
> >
> > #delimit ;
> > local xb "_b[_cons] +
> >          _b[ttl_exp]*`mttl' +
> >
> >
> > nlcom normalden(`xb') *
> > #delimit cr
> > *-------------- end example ---------------------
> > (For more on how to use examples I sent to the Statalist, see
> > http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
> >
> > Hope this helps,
> > Maarten
> >
> > -----------------------------------------
> > Maarten L. Buis
> > Department of Social Research Methodology
> > Vrije Universiteit Amsterdam
> > Boelelaan 1081
> > 1081 HV Amsterdam
> > The Netherlands
> >
> > Buitenveldertselaan 3 (Metropolitan), room Z434
> >
> > +31 20 5986715
> >
> > http://home.fsw.vu.nl/m.buis/
> > -----------------------------------------
> >
> >
> >      __________________________________________________________
> > Sent from Yahoo! Mail.
> > More Ways to Keep in Touch. http://uk.docs.yahoo.com/nowyoucan.html
> > *
> > *   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/
> >
>
>
> --
> -------------------------------
> Joao Ricardo Lima
> Professor
> UFPB-CCA-DCFS
> +553138923914
> -------------------------------
>
> *
> *   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/
>

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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/
```