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

[R] Multivariate spline regression and predicted values

2011-09-20 Thread Max Farrell
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via