# Regression test coefficient on variable is greater than coefficient on interaction term

With a model such as:

$y \approx B_0 + B_1\cdot \log(x) + B_i\cdot \log(x):\text{group}_i +B_j\cdot group_i$, where group can take on several values ($i = 2$ to $15$, let's say):

In an OLS regression, a statistically significant coefficient on any one of the interaction terms $B_2$ through $B_{15}$ means I know up to an acceptable level of Type 1 error that the coefficient is not 0.

In this particular model, the theory suggests that the slope between $y$ and $\log(x)$ in every group should be negative. So I want to test the hypothesis that $B1 + B2 < 0$, for instance, indicating that I'm confident the relationship between $y$ and $\log(x)$ in group 2 is negative.

How can I accomplish such a test? It would be even more helpful if you have specific guidance on how to do so in Python's statsmodels package.

• There is. sorry i'll edit the formula now Feb 1 '14 at 18:45