Take a look at package mgcv. Hope this helps. --Matt -----Original Message----- From: RenE J.V. Bertin [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 1:39 PM To: [EMAIL PROTECTED] Subject: [R] multidimensional function fitting
Hello, I have been looking around for how to perform a multidimensional, arbitrary function fit (in any case non-linear; more below), but haven't found anything yet on how to accomplish this. I found some references to the funfits package (that apparently is now called fields), but as far as I have understood it, it does not do what I need. Basically, I have a set of data that describe some measured, dependent variable as a function of a number of controlled variables, in casu z=f(x,y). What I need is to obtain some f that reliably describes my data on the range of controlled variables. (This is for inverse-filtering in a visual stimulus programme, so I don't really care about the form of f as long as it is reasonably simple to implement -- i.e. a spline surface would not be ideal in the context ;^). ) Clearly, something like fit<-lm(z~x+y+x*y+x*x+y*y, data) does not give the result I want. Is there a package somewhere that allows to do this sort of operation? Like a multidimensional version of polyreg()? Thanks in advance, RenE Bertin ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help ------------------------------------------------------------------------------ ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help