[R] Does the smooth terms in GAM have a functional form?
Simon Wood
s.wood at bath.ac.uk
Mon Apr 16 10:58:39 CEST 2007
Which `gam' are you using? If it's mgcv::gam then all the smooth terms are
represented using a basis expansion, so it is possible to write down the
functional form used. The forms used are given in Chapter 4 of my book
(see ?gam for reference). It is also possible for `s' terms (but not `lo'
terms) in gam::gam, although you might need to do a little digging into the
source code for some of the details of the basis used. However, quite often
when people ask for the functional form it is only in order to get at some
other quantity, and there turns out to be an easier way to get to it. What
were you plan to use the functional form for?
Simon
On Monday 16 April 2007 02:13, Jin Huang wrote:
> Hi, all,
>
> Does anyone know how to get the functional form of the smooth terms in
> GAM? eg. I fit y=a+b*s(x) where s is the smooth function.
>
> After fitting this model with GAM in R, I want to know the form of the
> s(x). Any suggestion is appreciated.
>
> Thanks,
> Jin
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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 and provide commented, minimal,
> self-contained, reproducible code.
--
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603 www.maths.bath.ac.uk/~sw283
More information about the R-help
mailing list