Re: [R] Gam() function in R

From: Yves Magliulo <ym_at_climpact.com>
Date: Mon 06 Dec 2004 - 20:48:26 EST

hi all,

this subject is very intersting for me. I'm using mgcv 0.8-9 with R version 1.7.1. i didn't know that there was an another gam version with package library(gam). Someone can tell me the basics differences between them? I look for an help page on google but i only find "mgcv" help pages.

thanks!

yves magliulo, Paris.

Le lun 06/12/2004 à 09:09, Jari Oksanen a écrit :
> On 6 Dec 2004, at 7:36, Janice Tse wrote:
>
> > Thanks for the email. I will check that out....
> >
> > However when I was doing this : gam(y~s(x1)+s(x2,3),
> > family=gaussian,
> > data=mydata )it gives me the error :
> >
> > "Error in terms.formula(formula, data = data) :
> > invalid model formula in ExtractVars"
> >
> > What does it mean ?
> >
> When Any Liaw answered you (below), he asked you to specify which kind
> of 'gam' did you use: the one in standard package 'mgcv' or the one in
> package 'gam'. We should know this to know "what does it mean" to get
> your error message. If you used mgcv:::gam, it means that you didn't
> read it help pages which say that you should specify your model as:
>
> gam(y ~ s(x1) + s(x2, k=3))
>
> Further, it may be useful to read the help pages to understand what it
> means to specify k=3 and how it may influence your model. Simon Wood --
> the mgcv author -- also has a very useful article in the R Newsletter:
> see the CRAN archive. It may be really difficult to understand what you
> do when you do mgcv:::gam unless you read this paper (it is possible,
> but hard). Simon's article specifically answers to your first question
> of deciding the smoothness, and explains how elegantly this is done in
> mgcv:::gam (gam:::gam has another set of tools and philosophy).
>
> If you happened to use gam:::gam, then you have to look at another
> explanation.
>
> cheers, jari oksanen
>
> > From: Liaw, Andy [mailto:andy_liaw@merck.com]
> > Sent: Sunday, December 05, 2004 11:34 PM
> > To: 'Janice Tse'; r-help@stat.math.ethz.ch
> > Subject: RE: [R] Gam() function in R
> >
> > Unfortunately that's not really an R question. I recommend that you
> > read up
> > on the statistical methods underneath. One that I'd wholeheartedly
> > recommend is Prof. Harrell's `Regression Modeling Strategies'.
> >
> > [BTW, there are now two implementations of gam() in R: one in `mgcv',
> > which
> > is fairly different from that in `gam'. I'm guessing you're
> > referring to
> > the one in `gam', but please remember to state which contributed
> > package
> > you're using, along with version of R and OS.]
> >
> > Cheers,
> > Andy
> >
> >> From: Janice Tse
> >>
> >> Hi all,
> >>
> >> I'm a new user of R gam() function. I am wondering how do
> >> we decide on the
> >> smooth function to use?
> >> The general form is gam(y~s(x1,df=i)+s(x2,df=j).......) , how do we
> >> decide on the degree freedom to use for each smoother, and if we shold

> >> apply smoother to each attribute?
> >>
> >> Thanks!!
> >>
> >> ______________________________________________
> >> R-help@stat.math.ethz.ch mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide!
> >> http://www.R-project.org/posting-guide.html
> >>
> >>
> >
> >
> > -----------------------------------------------------------------------
> > -----
> > --
> > Notice: This e-mail message, together with any
> > attachments,...{{dropped}}
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> --
> Jari Oksanen, Oulu, Finland
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Dec 06 20:56:45 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 01:22:33 EST