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

From |
"Martin Weiss" <[email protected]> |

To |
<[email protected]> |

Subject |
st: RE: re: How to determine the total effect of two opposed effects? |

Date |
Sun, 20 Sep 2009 13:43:51 +0200 |

```
<>
" There may be a way to do this with -margins- but I haven't figured out
how."
Here is my take on it, leading to Kit`s results:
**************
vers 11.0
sysuse auto, clear
g wl=we*le
reg pr we le wl
qui{
su length if e(sample), mean
loc mul =r(mean)
su we if e(sample), mean
loc muw =r(mean)
}
lincom we+`mul'*wl
lincom le+`muw'*wl
qui reg pr we le c.we#c.le
margins, dydx(*)
**************
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kit Baum
Sent: Sonntag, 20. September 2009 13:25
To: [email protected]
Subject: st: re: How to determine the total effect of two opposed effects?
<>
Christian said
among all independent variables in a regression analysis there are two
highly correlated ones (logmarketcap (firm size) and logstockmarket
(size of a stock market of the country a firm is located in). Both
variables correlate by 0.5. My hypothesis is that both variables have
a negative effect on the dependent variable. To cope with the high
correlation I created a interaction effect of the two variables and
included the interaction effect in the regression.
All three variables (logmarketcap, logstockmarket, and interaction
effect) are significant in the regression output, however with varying
signs of the coefficients (positive for logstockmarket and
logmarketsize, negative for the interaction effect). However, I am now
wondering what's the total effect? is it negative, or positive? How
can I evaluate this question for both variables logstockmarket and
logmarketcap?
There may be a way to do this with -margins- but I haven't figured out
how. However in Stata 10 syntax,
sysuse auto, clear
g wl = weight*length
reg price weight length wl
su length if e(sample), mean
local mul `r(mean)'
su weight if e(sample), mean
local muw `r(mean)'
// d price / d weight at mean length
lincom weight + `mul' * wl
// d price / d length at mean weight
lincom length + `muw' * wl
You could of course evaluate these partial derivatives anywhere else,
or for a range of values.
KIt
Kit Baum | Boston College Economics & DIW Berlin |
http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming
| http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata |
http://www.stata-press.com/books/imeus.html
*
* 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/
*
* 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/
```

**References**:

- Prev by Date:
**st: re: How to determine the total effect of two opposed effects?** - Next by Date:
**st: Fwd: false positives** - Previous by thread:
**st: re: How to determine the total effect of two opposed effects?** - Next by thread:
**st: re: How to determine the total effect of two opposed effects?** - Index(es):

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