Skip to content
Prev 263821 / 398502 Next

mgcv:gamm: predict to reflect random s() effects?

- Yes it's the same as omitting the term altogether for prediction (of
means), but that's not the same as having omitted it for fitting, of
course.
- s(Subject,X,bs="re") is a slightly better way of doing this, as it
generalises a bit more easily. To include random intercepts as well use
   s(Subject,bs="re") + s(Subject,X,bs="re")
...exactly how these terms work is explained in the details section of
?smooth.construct.re.smooth.spec.

best,
Simon