Re: [R] Multivariate spline regression and predicted values

2011-09-20 Thread Max Farrell
Thank you for the reply, it looks like the second option (te) will work perfectly! Max On Tue, Sep 20, 2011 at 2:39 PM, Max Farrell wrote: > One possibility is > > library(mgcv) > > ## isotropic thin plate spline smoother > b <- gam(Y~s(X[,1],X[,2])) > predict(b,newdata=list(X=W)) > > ## ten

Re: [R] Multivariate spline regression and predicted values

2011-09-20 Thread Simon Wood
One possibility is library(mgcv) ## isotropic thin plate spline smoother b <- gam(Y~s(X[,1],X[,2])) predict(b,newdata=list(X=W)) ## tensor product smoother b <- gam(Y~te(X[,1],X[,2])) predict(b,newdata=list(X=W)) ## variant tensor product smoother b <- gam(Y~t2(X[,1],X[,2])) predict(b,newd