Re: [R] Setting up 3D tensor product interactions in mgcv

2013-09-03 Thread Gavin Simpson
>From a reading of `?ti` It is sometimes useful to investigate smooth models with a main-effects + interactions structure, for example f_1(x) + f_2(z) + f_3(x,z) This functional ANOVA decomposition is supported by ‘ti’ terms, which produce tensor pro

[R] Setting up 3D tensor product interactions in mgcv

2013-08-23 Thread Mark Payne
Hi, I am trying to fit a smoothing model where there are three dimensions over which I can smooth (x,y,z). I expect interactions between some, or all, of these terms, and so I have set up my model as mdl <- gam(PA ~ s(x) + s(y) + s(z) + te(x,y) + te(x,z) + te(y,z) + te(x,y,z),...) I have recentl