Just to add, I've been playing around with "select=TRUE" in mgcv, and it
does seem that it could work if I were to specify all of the nested
two-way interactions in my three-way interactions (see the toy example
below). But the problem is that I don't have enough degrees of freedom
to feed such a model into GAM using my main dataset.
N=200
a = rnorm(N)
b = rnorm(N)
c = rnorm(N)
y = rnorm(N)+a+b+c+a*b
m = gam(y~s(a)+s(b)+s(c)+te(a,b)+te(a,b,c))
msel = gam(y~s(a)+s(b)+s(c)+te(a,b)+te(a,b,c),select=TRUE)
mdrop = gam(y~s(a)+s(b)+s(c)+te(a,b))
summary(m)
summary(msel)
summary(mdrop)
plot(density(m$fitted.values))
lines(density(msel$fitted.values),col="red")
lines(density(mdrop$fitted.values),col="blue")
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.