Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: 'Rolling' Slope Dummy

From   "Richard. Williams" <[email protected]>
To   [email protected]
Subject   Re: st: 'Rolling' Slope Dummy
Date   Fri, 04 Mar 2005 13:16:21 -0500

At 12:20 PM 3/4/2005, Robert Gaskell wrote:

I am looking at the relationship between two variables, and am trying
to determine the effect that a third variable has on the coefficient
of this relationship.  Is it possible to use a sort of 'rolling' dummy
(this is I am sure a completely inaccurate name), whereby instead of
having a standard dummy:

gen dummy = [some expression]
gen var2dummy = var2*dummy
reg var1 var2 var2dummy
When working with interaction terms, you generally want to be including the lower-order terms used to compute the interactions. e.g.

reg var1 var2 dummy var2dummy

Otherwise you'll find that arbitrary changes in the zero point of var2 change your results (e.g. you'll get different results if your scale ranges from -3 to 3 than if it runs from 1 to 7). To see this, subtract a constant from var2 first and then re-run your above commands. To put it another way, if you are going to let the slopes differ across groups, you generally want to let the intercepts differ too.

Discussions of using interaction effects for group comparisons can be found at

...which only has a true/false which isn't suitable here, I multiply
var2 and var3 to create some sort of pseudo-rolling-slope-dummy:

gen var2var3 = var2*var3
reg var1 var2 var2var3

Here, I would take the interpritation to be that for every unit
increase in var3, the coefficient on var2 increases by the coefficient
on var2var3.
Again, you probably want

reg var1 var2 var3 var2var3

If I understand you correctly, you are talking about interactions involving two continuous variables. These can get a little confusing to interpret. My own attempt to make sense of them can be found at

The sources cited (or any source that discusses interaction terms at length) may be worth reading if you need a bit more depth than these brief notes provide.

Richard Williams, Associate Professor
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal):
WWW (department):
* For searches and help try:

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