[R] Gam() function in R
Simon Wood
simon at stats.gla.ac.uk
Mon Dec 6 11:54:22 CET 2004
> 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?
I guess you are using gam() from package gam, in which case you probably
need to look at the help file for step.gam.
By default gam() in package mgcv estimates the appropriate degrees of
freedom automatically as part of model estimation using generalized cross
validation, (although there is an adjustable upper limit on the range
of degrees of freedom considered).
Package gss also has routines for fitting GAMs where the choise of df is
fully automatic.
best,
Simon
_____________________________________________________________________
> Simon Wood simon at stats.gla.ac.uk www.stats.gla.ac.uk/~simon/
>> Department of Statistics, University of Glasgow, Glasgow, G12 8QQ
>>> Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814
More information about the R-help
mailing list