[R] GAMS and Knots

Simon Wood s.wood at bath.ac.uk
Wed Nov 29 10:16:10 CET 2006


The number of knots is really one of the modelling assumptions. Provided you 
don't make it restrictively small then the results should not be very 
sensitive to this assumption, since the actual degrees of freedom of each 
smooth are determined by how heavily the smooth is penalized, rather than 
simply being the number of knots. The degree of penalization is selected 
automatically by GCV or AIC/UBRE. 

See ?choose.k in the `mgcv' help files for more information on this, as well 
as information on checking whether the assumed number of knots was large 
enough. 

Simon

On Tuesday 28 November 2006 22:40, 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
>
> ______________________________________________
> 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