[R] mgcv predict.bam strange results
fwickler
fwickler at gmx.net
Thu Aug 8 16:58:10 CEST 2013
Dear useR,
I don't understand the results of the predict.bam function of mgcv package
when constucting a varying-coefficient model with bam instead of gam:
library("mgcv")
dat <- gamSim(4)
b <- gam(y ~ fac+s(x2,by=fac)+s(x0), data=dat)
predict(b, dat[1,], type = "terms")
with gam everything is fine: only s(x2):fac1 is different of zero but using
bam:
b1 <- bam(y ~ fac+s(x2,by=fac, bs = "cc")+s(x0),data=dat)
predict(b1, dat[1,], type = "terms")
all terms s(x2):fac1, s(x2):fac2 and s(x2):fac3 are differnt of zero.
Thanks for your help
Florian
--
View this message in context: http://r.789695.n4.nabble.com/mgcv-predict-bam-strange-results-tp4673364.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list