# Significance of the sum of the main effect and interaction term

Consider a simple linear regression with an interaction term:

$$Y=b_0 + b_1X +b_2Z+b_3XZ$$

where $$X$$ is continuous and $$Z$$ is a dummy.

I want to find out whether $$X$$ has a significant impact on $$Y$$ when $$Z=1$$

$$b_3$$ is negative and significant but $$b_1$$ is positive and not significant.

The total effect of $$X$$ on $$Y$$ when $$Z=1$$ (i.e. $$b_1$$ + $$b_3$$) is negative. How can I determine whether this total effect is significant or not?

• One thing you could do is to "center" the $Z$ variable such that it has a value of 0 where there was 1 before, that way you will get effect of $X$ and $Y$ for when $Z$=0 (and 1 before transformation). Jan 7, 2019 at 11:39

You should use an F-test for the linear hypothesis $$H_0: b_1 + b_3 = 0$$. You can implement that test on R by using the command linearHypothesis from the car package.