[R] What's the corresponding function in R for lo() function inS-PLUS?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Sep 17 21:40:37 CEST 2007


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.
>
> Charles.Annis at StatisticalEngineering.com
> phone: 561-352-9699
> eFax:  614-455-3265
> http://www.StatisticalEngineering.com
>
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of zhijie zhang
> Sent: Monday, September 17, 2007 1:19 PM
> To: R-help at stat.math.ethz.ch
> 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,                  ripley at stats.ox.ac.uk
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



More information about the R-help mailing list