[R] use of gam

Thomas Lumley tlumley at u.washington.edu
Tue Jun 14 16:49:39 CEST 2005


On Mon, 13 Jun 2005, Kerry Bush wrote:

>
> Suppose I fit the following model:
>
>> library(gam)
> ....
>> fit <- gam(y~x1+x2+s(x3),family=binomial)
>
> and then I use
>
>> fitf$coef
>       x1        x2     s(x3)
> 4.1947460 2.7967200 0.0788252
>
> are the coefficients for x1 and x2 the estimated
> coefficients?

Yes.

>		 what is the meaning of s(x3)? since this
> is a non-parametric component, it may not belong here
> as a coefficient, am I right?

I believe that it is coefficient of the smooth term if the smooth term is 
standardized to a standard deviation of 1. If you consider the shape of 
the smooth term as fixed, the model looks like a glm().

This representation can be used to compute approximate standard errors for 
the linear terms (the approximation isn't very good if s(x3) has too many 
degrees of freedom, and Trevor Hastie et al have recently worked out a 
consistent estimator of the standard errors).

 	-thomas




More information about the R-help mailing list