noamross/gams-in-r-course

Chapter 3.11

Opened this issue · 0 comments

In chapter 3, section 11 you give the following example of using tensor interaction terms:

gam(y ~ s(x1) + s(x2) + ti(x1, x2), data = data, method = "REML")

However, that (appears to??) conflict with the recommendation from Simon Wood in A Toolbox of Smooths(see page 28, "Miscellanea"):

However, nested models make most sense if the bases arestrictly nested. To ensure this, smooth interactions shouldbe constructed using marginal bases identical to thoseused for the main effects. gam(y~te(x)+te(z)+te(x,z))would achieve this, for example

Maybe (surely??) I'm missing something here, but if there's a clear explanation it might be worth adding to the course.