Re: [R] compare gam fits

2010-08-22 Thread Simon Wood
You can do this using the predict.gam(...,type="lpmatrix"). Here's some code providing an example ## example of smooths conditioned on factors from ?gam.models library(mgcv) dat <- gamSim(4) ## fit model... b <- gam(y ~ fac+s(x2,by=fac)+s(x0),data=dat) plot(b,pages=1) ## now predict on x2 gr

Re: [R] compare gam fits

2010-08-17 Thread Gavin Simpson
On Thu, 2010-08-05 at 13:49 -0300, Mike Lawrence wrote: > Hi folks, I've been pondering this for a little while, drumming up courage to reply, whilst I've been away on fieldwork with patchy email access... so here goes with the neck sticking out thing... ;-) > I originally tried R-SIG-Mixed-Model

[R] compare gam fits

2010-08-05 Thread Mike Lawrence
Hi folks, I originally tried R-SIG-Mixed-Models for this one (https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q3/004170.html), but I think that the final steps to a solution aren't mixed-model specific, so I thought I'd ask my final questions here. I used gamm4 to fit a generalized additive