Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: 3-way continuous interaction - comparing simple slopes

From   Roman Wörner <>
Subject   Re: st: 3-way continuous interaction - comparing simple slopes
Date   Wed, 22 May 2013 17:28:36 +0200

Dear David,

what I actually do is to regress two performance measures (return on assets and relative patent performance) on two strategies (strategy A and strategy B), their interaction and an additional moderator (vertical integration). Return on assets is negative for the bigger part of the sample - so, log or sqrt won't work. Relative patent performance (#of patents per employee) is null for the bigger part of the sample - again, log is not an option.

I argue, that the relationship of the two strategies changes with the vertical integration of the firm. Based on the regression results I plot simple slope diagramms (high/low levels of strategy A/B @low levels of vertical scope and of high/low levels of strategy A/B @high levels of vertical scope). I then want to test if the slopes @high levels of vertical scope are significantly lower than the slopes @low levels of vertical scope.

What the procedure described down below - lincom ($HzHw)-($HzLw) - does is to test whether the two slopes are different ("plain different") without considering the direction ("is one steeper than the other").

To get rid of the 3-way interaction I initially considered dichotomizing the vertical scope variable into two groups (high/low) and split the sample. But I think that would make the situation even worse --> two samples and two models would require out of sample tests to compare the slopes...

Kind regards,


Am 21.05.2013 23:59, schrieb David Hoaglin:
Dear Roman,

Is the nature of your y such that you could transform it (e.g., by
taking the logarithm or the square root) and have an analysis that has
fewer or even no interactions?

David Hoaglin

On Tue, May 21, 2013 at 2:58 PM, Roman Wörner <> wrote:
Dear Statalister,

I am a student and in my current research project I have to deal with a
three-way continuous interaction. I found some material on the website of
UCLA ( where they
explain how to use the -lincom- command to calculate simple slopes.
Furthermore, they show how to use -lincom- to compare two simple slopes (I
attached the code at the end of the message). This material was extremely
helpful to me (how to put Aiken/West 1991 and Cohen et al. 2003 into

My question is as follows: to my understanding

*lincom ($HzHw)-($HzLw)*

tests whether the two slopes are different. What I actually want to test is
not whether the two slopes are different but whether one slope is "steeper"
than the other (my hypothesis is that two variables complement each other;
with an increase in the third variable the complementarity effect becomes
weaker). I would be very grateful for any advice on how to adapt the
procedure as described down below or any other technique which does the

I am fairly new to STATA and statistics in general - so my appologies if
this question sounds very basic to most of you.

Thanks in advance and kind regards,



use, clear

rename write y
rename read x
rename math w
rename science z
rename socst v1
rename ses v2

generate xz  = x*z
generate xw  = x*w
generate zw  = z*w
generate xzw = x*z*w

regress y x z w xz xw zw xzw v1 v2

quietly sum x
global hi=r(max)
global lo=r(min)
quietly sum w
global Hw=r(mean)+r(sd)
global Lw=r(mean)-r(sd)
quietly sum z
global Hz=r(mean)+r(sd)
global Lz=r(mean)-r(sd)
quietly sum v1
global m1=r(mean)
quietly sum v2
global m2=r(mean)

global HzHw "x + ($Hz)*xz + ($Hw)*xw + ($Hz)*($Hw)*xzw"
global HzLw "x + ($Hz)*xz + ($Lw)*xw + ($Hz)*($Lw)*xzw"
global LzHw "x + ($Lz)*xz + ($Hw)*xw + ($Lz)*($Hw)*xzw"
global LzLw "x + ($Lz)*xz + ($Lw)*xw + ($Lz)*($Lw)*xzw"

/* simple slopes */
lincom $HzHw /* slope 1 */
global b1 = r(estimate)
lincom $HzLw /* slope 2 */
global b2 = r(estimate)
lincom $LzHw /* slope 3 */
global b3 = r(estimate)
lincom $LzLw /* slope 4 */
global b4 = r(estimate)

/* differences in simple slopes */
lincom ($HzHw)-($HzLw)  /* a) HzHw vs HzLw */
lincom ($HzHw)-($LzHw)  /* b) HzHw vs LzHw */
lincom ($HzLw)-($LzLw)  /* c) HzLw vs LzLw */
lincom ($LzHw)-($LzLw)  /* d) LzHw vs LzLw */
lincom ($HzHw)-($LzLw)  /* e) HzHw vs LzLw */
lincom ($HzLw)-($LzHw)  /* f) HzLw vs LzHw */*
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index