# What do interactions of spline and non-spline terms mean?

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?

-
+1 for a good, and clearly-stated question. (If you wanted a little more information about polynomials and splines, you might find this helpful, although you seem to have a strong grasp of the topic.) You may also want to read this recent question regarding the interpretation of terms governing the curvature of the relationship between a covariate and a response variable. You will notice that I argue against giving separate interpretations to the different terms, but that it is best to treat them as gestalts. (However not to take too hard a line, I do recognize that you can calculate the location of the apex of the parabola from the betas of the regression model as you note here.) Consistent with my previous answer, I think it is best to interpret all the terms associated with the same underlying variable together. With respect to this specific case, the interaction simply establishes that the shape of the curves differs between the two levels of factor a.