Suppose I have a regression
$y = b_0 + b_1 x_1 + b_2 x_2 $
where both $x_1$ and $x_2$ have a range from $-\infty$ to $\infty$ and have been centered.
The correlation between $x_1$ and $x_2$ is $0.3$.
Visually, it seems like both $x_1$ and $x_2$ are roughly almost linear in $y$ except in the extremes, with a lot of noise.
I want to add an interaction variable $x_1 * x_2$, but the issue is when both $x_1$ and $x_2$ are negative, their multiplication becomes positive, which is not the desired effect, as the effect I want to capture is that when both are strongly positive, $y$ is more positive than what the linear sum would give, and similarly when both are strongly negative, $y$ is more negative than what the linear sum would give.
I googled online and there doesn’t seem to be any good reference on how to handle (create) interaction variables when both have a real number domain.
Is there any good reference or recommendations to create interaction variables when both $x_1$ and $x_2$ have a range from $-\infty$ to $\infty$ ?
Thanks @kjetil and @Fr1. I tried both recommended , and both are valid ways. I had to pick one answer and splines seems to capture the effect better. I even tried two-variable polynomials over the whole data and spline does better when i compare out-Of-sample performance .
@storyteller0815, I didn’t understand your recommendation or the application of the recommendation to my problem.