  I have read the gam() function in mgcv package, and find that it's
inappropriate for the additive model. So i didn't go further. I may
have solved it if i can search more info on gam.
  Thanks a lot anyway, it has been solved with your help.


On 9/18/07, Prof Brian Ripley <ripley@stats.ox.ac.uk> wrote:
>
> 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@StatisticalEngineering.com
> > phone: 561-352-9699
> > eFax:  614-455-3265
> > http://www.StatisticalEngineering.com
> >
> >
> > -----Original Message-----
> > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
> On
> > Behalf Of zhijie zhang
> > Sent: Monday, September 17, 2007 1:19 PM
> > To: R-help@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@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
>



-- 
With Kind Regards,

oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
Zhi Jie,Zhang ,PHD
Tel:86-21-54237149
Dept. of Epidemiology,School of Public Health,Fudan University
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
Email:epistat@gmail.com
Website: www.statABC.com
[***********************************************************************]
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::

	[[alternative HTML version deleted]]

