zhijie zhang
2007-Sep-17 17:19 UTC
[R] What's the corresponding function in R for lo() function in S-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. -- 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]]
Charles Annis, P.E.
2007-Sep-17 17:24 UTC
[R] What's the corresponding function in R for lo() function inS-PLUS?
?loess 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. -- 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 at gmail.com Website: www.statABC.com [***********************************************************************] oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [[alternative HTML version deleted]] ______________________________________________ R-help at 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.
Gavin Simpson
2007-Sep-17 18:43 UTC
[R] What's the corresponding function in R for lo() function in S-PLUS?
On Tue, 2007-09-18 at 01:19 +0800, zhijie zhang wrote:> 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?See function gam() in package gam, available from CRAN, which makes us of lo() (also available in the gam package). This closely follows the implementation in S-PLUS. Note that gam() in recommended package mgcv (distributed with R) provides an alternative approach to GAM modelling, which you might wish to take a look at as well. By the way, you could have solved this yourself in a matter of seconds if you'd used the R search tools. The following RSiteSearch("lo", restrict = "functions") returns the correct answer as the first hit. HTH G> Thanks very much. >-- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Reasonably Related Threads
- Probelms on using gam(mgcv)
- Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
- handle dates in R?
- How to add legend for image()?
- Specify a correct formula in R for Piecewise Linear Functions?