Re: [R] GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?

2010-04-16 Thread Simon Wood
Both versions of this should have worked, but you are right that the first version didn't when used with `gamm', I've fixed this for mgcv 1.6-2 (`mgcv:gam' was ok). Thanks for this. best, Simon On Wednesday 14 April 2010 09:03, JANSEN, Ivy wrote: Hi, I was reading the book on Mixed Effects

Re: [R] GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?

2010-04-15 Thread JANSEN, Ivy
I was not sure whether using the smoother as presented would give exactly the same result as using two linear terms and 2 smoothers, and wanted to check this. Regards, Ivy -Oorspronkelijk bericht- Van: Gavin Simpson [mailto:gavin.simp...@ucl.ac.uk] Verzonden: woensdag 14 april 2010

[R] GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?

2010-04-14 Thread JANSEN, Ivy
Hi, I was reading the book on Mixed Effects Models and Extensions in Ecology with R by Zuur et al. In Section 6.2, an example is discussed where a gamm-model is fitted, with a smoother for time, which differs for each value of ID (4 different bird species). In earlier versions of R, the

Re: [R] GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?

2010-04-14 Thread Gavin Simpson
On Wed, 2010-04-14 at 10:03 +0200, JANSEN, Ivy wrote: Hi, I was reading the book on Mixed Effects Models and Extensions in Ecology with R by Zuur et al. In Section 6.2, an example is discussed where a gamm-model is fitted, with a smoother for time, which differs for each value of ID (4