1

I was under the impression that using te and adding the main effects with s plus the interaction with ti is the same (in a GAM model, estimated with mgcv).

However:

library( mgcv )
library( gamair )
data( brains )

tm <- gam(medFPQ~te(Y,X,k=10),data=brain,family=Gamma(link=log))
tm1 <- gam(medFPQ ~ s(Y,k=10,bs="cr") + s(X,bs="cr",k=10) +
         ti(X,Y,k=10), data=brain, family=Gamma(link=log))

predict(tm)[955]
predict(tm1)[955]

(The example is copied verbatim from Simon Wood's GAM book, page 335, so the specification should be correct.)

So, aren't these two formulations equivalent...?

Tamas Ferenci
  • 3,143
  • 16
  • 26
  • I think the Q&A I linked to answers this; there are more smoothness parameters to estimate in the decomposed model, beyond differences that might crop up due to using different parameterisations of the same model. – Gavin Simpson Oct 25 '18 at 16:03
  • 1
    @Gavin Simpson : Thank you Gavin, I somehow missed that question. – Tamas Ferenci Oct 25 '18 at 20:07

0 Answers0