[R] GAMs under R?

Bill Venables Bill.Venables at cmis.csiro.au
Mon May 1 07:49:07 CEST 2000


At 06:09 AM 5/1/00 +0100, Prof Brian D Ripley wrote:
>On Sun, 30 Apr 2000, Stephen R. Laniel wrote:
>
>> I was just now surprised to note that functions to go generalized additive
>> models don't appear to exist under R 1.000.  In particular, the gam() and
>> loess() functions aren't there.  Are they hidden somewhere and I just
>> haven't noticed?
>
>loess: yes, and it's not really hidden. It is in standard package modreg.
>It does not do `generalized additive models' though, even under S.
>(The R implementation is a little less general than that in S.)
>
>gam(): no, it is not there.  Look at the original code to see one reason
>why: it is highly convoluted and not at all well documented.  I think
>additive models have been greatly over-sold in certain statistical circles,
>but if you want to use them for least-squares fitting, try bruto (in
>package mda on CRAN) instead as at least that makes a sensible attempt to
>choose the smoothness of the variable transformations.

The restriction "for least-squares fitting" is crucial.  bruto is a form of
additive model fitting, not *generalized* additive model fitting.  If you
have to deal with binomial, poisson, .... models it doesn't help much.

>
>I wonder why you were surprised?  See section 5.6 of the FAQ:
>
>  5.6 How can I contribute to R?
>  ==============================
>
>[...]
>
>     One place where functionality is still missing is the modeling
>  software as described in "Statistical Models in S" (see *Note What is
>  S?::); Generalized Additive Models (*gam*) and some of the nonlinear
>  modeling code are not there yet.
>
>which shows we are still waiting for a volunteer (hint, hint).

But the effort required should not be under-estimated and the need for a
*good* implementation is pretty strict.  A mediocre or worse implementation
is in many ways worse than useless and even dangerous.  This looks like a
pretty interesting component of an Honours project in Statistics, if some
student is interested in computations and penalized estimation.

>-- 
>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 272860 (secr)
>Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
.-.-
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
._._
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list