Re: [R] GAM interactions, by example

2012-05-30 Thread Simon Wood
Geraldine, They really are the same fit, try... range(fitted(b)-fitted(b1)) [1] -3.333782e-10 4.173699e-10 ... for example. The edf differences are just down to differences in how identifiability constraints are handled in the two cases. For b1 the smooths of x2 do not have centring

[R] GAM interactions, by example

2012-05-29 Thread Mabille, Geraldine
Dear all, I'm using the mgcv library by Simon Wood to fit gam models with interactions and I have been reading (and running) the factor 'by' variable example given on the gam.models help page (see below, output from the two first models b, and b1). The example explains that both b and b1 fits