[R] use of glm and cubic splines

Simon Wood simon at stats.gla.ac.uk
Tue Oct 7 16:50:12 CEST 2003


> >
> > When I fit a model like glm(gb~bs(age,df=6)), I obtain 7 estimates. Can
> > anybody explain me where they stand for?
>
> Well, yes and no.  They are coefficients of terms in the b-spline basis,
> but that probably isn't very illuminating.
>
> You can use termplot() on your fitted model to see the smooth curve that
> has been fitted and is specified by these estimates. The only splines
> where you get simple interpretations of individual coefficients are
> linear splines.

- if you use gam() from package mgcv and specify the "cr" basis then the
coefficients are the height of the spline at the knots (this only works
for smooths of one variable and "cr" is not the default basis).

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