[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Marginal effects

From   Maarten buis <>
Subject   Re: st: Marginal effects
Date   Sat, 22 Mar 2008 09:00:03 +0000 (GMT)

--- Josť C. <> wrote:
> I am estimating a regression that has no-lineal (or product of
> variables) variables in their dependent terms - for example:
> regress y x xz
>   The program Stata doesn't allow logical operators in the command
> regress (or other equation terms as probit) and for that it is
> previously necessary to define the variable (for example: gen w =
> xz). However, if the interest is to calculate marginal effects or
> elasticities (using mfx or margeff or dprobit) - that procedure
> invalidates the results because the terms no lineal they are not
> considered (for example: dy/dx = 1 + z and no 1).
>    Which the simplest way to solve that problem?

I am reading between the lines of your question and I am assuming you
want to use -probit-, and that one of the variables you are multiplying
is a dummy (has only two values). You used the interaction term to
estimate different effects of a variable (for example mpg) for
different groups (for example foreign and domestic cars) and you are
interested in the marginal effect of mpg: The easiest way to do that is
to create two interaction terms mpgXforeign and mpgXdomestic, and leave
the main effect of mpg out:

*----------- begin example -----------
sysuse auto, clear

recode rep78 1/3=0 2/4=1
gen domestic = !foreign

gen mpgXfor = mpg*foreign
gen mpgXdom = mpg*domestic

logit rep78 mpgXfor mpgXdom
*---------- end example ---------------
(For more on how to use examples I sent to the Statalist, see )

The marginal effect of mpgXfor is the marginal effect of mpg for
foreing cars, and the marginal effect of mpgXdom is the marginal effect
of mpg for domestic cars

Notice that the difference in effects has no causal interpretation due
to problems discussed here:

Hope this helps,

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

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Rise to the challenge for Sport Relief with Yahoo! For Good
*   For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index