Re: [R] use of gam

From: Thomas Lumley <>
Date: Wed 15 Jun 2005 - 00:49:39 EST

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?


> 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 mailing list PLEASE do read the posting guide! Received on Wed Jun 15 01:03:34 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:36 EST