[R] GAMS and Knots

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Nov 29 01:10:38 CET 2006


On Wed, 2006-11-29 at 11:40 +1300, Kathryn Baldwin wrote:
> Hi
> I was wondering if anyone knew how to work out the number of knots that 
> should be applied to each variable when using gams in the mgcv library?
> Any help or references would be much appreciated.
> Thanks
> Kathryn Baldwin

mgcv works out an optimal number of knots to use, using a Generalised
Cross-Validation (GCV) routine. Take a look at:

Simon N. Wood. mgcv: GAMs and generalized ridge regression for R. R
News, 1(2):20-25, June 2001.

And Simon's new book:

Simon N. Wood. Generalized Additive Models: An Introduction with R.
Chapman & Hall/CRC, Boca Raton, FL, 2006. ISBN 1-584-88474-6.

For further info on using mgcv for GAMs.

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson                 [t] +44 (0)20 7679 0522
 ECRC & ENSIS, 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/cv/
 London, UK. WC1E 6BT.         [w] http://www.ucl.ac.uk/~ucfagls/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list