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 on April 23, and its replacement, statalist.org is already up and running.


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

st: marginal effects


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: marginal effects
Date   Tue, 13 Nov 2012 10:27:18 +0100

----  "Qianru Song" wrote me privately:
> I would like to ask you a question about derivation of marginal effect of
> non-lineal model in stata and how to interpret the results.
>
> I have dos models: probit and possion, and some variables:
> x1(dummy),x2(dummy),x3 (continuous),x1*x2,x1*x3:
>
> I have three types for the regression “probit”:
>
> 1.
>
> probit y x1##x2 x1##c.x3
>
> margins, dydx(*)
>
> 2.
>
> probit y x1#x2 x2 x1##c.x3
>
> margins, dydx(*)
>
> 3.
>
> gen x1_x2=x1*x2
>
> gen x1_x3=x1*x3
>
> probit y x1 x2 x3 x1_x2 x1_x3
>
> margins, dydx(*)

> what´s is the difference among three expressions, although they describe
> the same model? Which model is correct if I want to obtain the global
> marginal effect on y (for example how does the variable x1 (three parts:
> x1, x1*x2 and x1*x3)impact on y ?
>
> I think the possion model has the same structure to derive the marginal
> effect because of one member of non linear model. is correct?

These questions need to be sent directly to the statalist not to
individual members. The reasons for this are clearly explained in the
Statalist FAQ: <http://www.stata.com/support/faqs/resources/statalist-faq/#private>

The point of a non-linear model is that there is not one marginal
effect but many, so you really need to choose: either you want one
marginal effect but than you have to live with a linear model or you
want a non-linear model but than you have to live with multiple
marginal effects. It is logically impossible to have both. So what
happens when people report a "global marginal effect"? In that case
they have in essence turned their non-linear model into a linear
probability model. This may not fit well to their data, but the
"indirect route" of first estimating a probit and than computing a
global marginal effect does not solve that lack of fit; it just hides
it, which is much worse.

My answer is to forget about global marginal effects, instead decide
what kind of "effect" you want and choose a model that has it as its
natural metric: So if you want differences in probabilities choose a
linear probability model (-regres varlist, vce(robust)-), if you want
ratios of probablities use -poisson varlist, vce(robust) irr-, and if
you want ratios of odds use -logit varlist, or-. Notice that only the
last model is guaranteed to result in predictions between 0 and 1, so
you need to be careful when choosing one of the first two options and
check very carefully if the model fits to your data. Also note that
-probit- is not part of this list; it just does not have a meaningful
natural metric.

Models 1 and 2 are equivalent and will produce the same marginal
effects. Model 3 is not equivalent as far as Stata is concerned as the
information that x1_x2 is an interaction term is not stored in the
model, and -margins- will thus incorrectly assume that it is just
another variable.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

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