If I fit my data with something like lm(y~a*b)
, in R syntax, where a
is a binary variable and b
is a numeric variable, then the a:b
interaction term is the difference between slope of y~b
at a
= 0 and at a
= 1.
Now, let's say the relationship between y
and b
is curvilinear. If I now fit lm(y~a*poly(b,2))
, then a:poly(b,2)1
is the change in the change in y~b
conditional on the level of a
as above, and a:poly(b,2)2
is the change in y~b^2
conditional on the level of a
. It takes some handwaving, but if either of those interaction coefficients are significantly different from zero, I can argue that it means a
affects not only the vertical displacement of y
but also the location of the peak and the steepness of approach to the peak of the y~b+b^2
curve.
What about if I fit lm(y~a*bs(b,df=3))
? How do I interpret the a:bs(b,df=3)1
, a:bs(b,df=3)2
, and a:bs(b,df=3)3
terms? Are these the vertical displacements of y
from the spline attributable to a
at each of the three segments?