[R] need help on GAM

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 12 18:43:39 CEST 2004

Please read the posting guide and do give sufficient details for your 
questions to be answered.

On Tue, 12 Oct 2004, Liu Song wrote:

> Get some question about the function "gam".

There are at least two functions gam() available for R, but none in
standard R.  Which package are you talking about?  This is covered in the

> Suppose I have a semiparametric model,
> Y~x1+x2+s(z1).
> Using "gam", how could I get the estimates for the parametric part and 
> nonparametric part respectively?

What do you mean by those terms?  In the gam() in package gam, s(z1) is 
split into a linear and non-linear part, but all the terms *are* 
parametric (a smoothing spline is a parametric function of its argument).

> And another question: we could find the coefficients for both 
> parametric term and nonparametric term, what do these coefficients
> for the nonparametric term stand for, the coefficients for the base 
> functions?

By definition, non-parametric terms do not have parameters aka 

I suggest you ask for local advice on the statistical background to your 
questions, which you do need to understand before getting to using them in 

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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list