# st: re: How to determine the total effect of two opposed effects?

 From Kit Baum <[email protected]> To [email protected] Subject st: re: How to determine the total effect of two opposed effects? Date Sun, 20 Sep 2009 07:25:01 -0400

```<>
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/
```