[R] polynomial fit

Thomas W Blackwell tblackw at umich.edu
Mon Oct 6 14:17:53 CEST 2003


Karim  -

try function  gam()  in package  mgcv.

library("mgcv")
help("gam")

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Mon, 6 Oct 2003, Karim Elsawy wrote:

> I would like to fit a function H = F(x,y,z) but I do not know the
> analytical expression
> of H, is there a way to get the best 3d polynomial (in x,y,z) which fits
> H
> e.g
> H<-seq(2,200,len=50)
> x<-seq(1,50,len=50)
> y<-seq(50,300,len=50)
> x<-seq(30,80,len=50)
>
> so it is  a sort of fitting a 4 dimensional surface to a regular grid
>
> any suggestions are very much appreciated
> best regards
> Karim




More information about the R-help mailing list