On Mon, 17 Sep 2007, Charles Annis, P.E. wrote: > ?loess
packages gam and mgcv both provide gam() functions in R: package gam is very close to the S(-PLUS) implementation and would fit the model given (in so far as we can tell from a non-reproducible example). loess will allow a general smooth function of 2 arguments, but not (directly) an additive model. Having said that, I would be suspicious of an additive model of two rather artificial variables such as latitude and longitude (unless the scale is large the angle of the earth's axis is usually of very minor importance), so a 2D loess fit might well be more informative. > Charles Annis, P.E. > > [EMAIL PROTECTED] > phone: 561-352-9699 > eFax: 614-455-3265 > http://www.StatisticalEngineering.com > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of zhijie zhang > Sent: Monday, September 17, 2007 1:19 PM > To: [EMAIL PROTECTED] > Subject: [R] What's the corresponding function in R for lo() function > inS-PLUS? > > Dear friends, > In S-PLUS, we can use the following argument, but not in R. > mode12 <- gam(score1 ~ lo(latitude) + lo(longitude)) > I searched the help in S-PLUS, it says lo() Allows the user to specify a > Loess fit in a GAM formula, but i didn't find the correponding function in > R. > Anybody knows how to do the similar task in R? > Thanks very much. > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.