# Continuous by contiuous interaction and non-linearity in OLS

#### steph88

##### New Member
To whom it may concern:

I am conducting an OLS for a class assignment and have an interaction between ADHD and non-delinquent peers. I have tested for the assumption of linearity and it is violated for the non-delinquent peers measure. I spoke with my professor about what to do, but it seemed to confuse me even more.

He told me that it is inappropriate to run an interaction when one has a non-linear effect. But he told me to still run the interaction with two variables that are "linear." I looked into running a log transformation on the peers measure, but there are negative values, so it is inappropriate.

Thanks beforehand!
Steph

#### Englund

##### TS Contributor
Why is there a problem to include an interaciton variable when one variable has a non-linear relationship with the DV? The relationship may not be non-linear when controlling for other variables, e.g an interaction variable.

#### steph88

##### New Member
That was what my professor said. He didn't necessarily say what the reasoning was but I assume it is due to the assumption of linearity in the OLS.

#### noetsi

##### Fortran must die
The standard assumption of regression is of linearity. So while you could have a non-linear variable in your model it would be interpreted differently than normal regression as I understand it. There are a variety of transformations to make non-linear variables linear. However, some linear variables are inherently non-linear. What is the equation for your model?

#### steph88

##### New Member
the equation i have is as follows:

Y=b0 + b1X1 + b2X2 + ... b8(x1 * x2) + e

#### Englund

##### TS Contributor
That was what my professor said. He didn't necessarily say what the reasoning was but I assume it is due to the assumption of linearity in the OLS.
I do not doubt he is right, I just want to understand why. If all parameters are linear when controlling for an interaction variable then there are no miss-specification, and thus no problem, I think. I believe that the marginal effect of one variable on another is not of any great importance.

#### noetsi

##### Fortran must die
The equation used in not inherently non-linear (although the results might be in practice).

Why do you assume the variable is non-linear (did you run a test such as box-tidwel)?

#### steph88

##### New Member
I created a quadratic term (i.e., X squared) to test for non-linear effects. The effect was significant indicating that there is a significant non-linear effect between the predictor and outcome.