s-news
[Top] [All Lists]

Re: GAM p-values

To: kate.bassil@utoronto.ca
Subject: Re: GAM p-values
From: Tim Hesterberg <timh@insightful.com>
Date: Thu, 07 Feb 2008 12:18:48 -0800
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <20080207144343.0285u0yjkk04kc0k@webmail.utoronto.ca> (kate.bassil@utoronto.ca)
References: <20080207144343.0285u0yjkk04kc0k@webmail.utoronto.ca>
First, note that you should not just look up the t-statistics
in a t-table.  The t-statistics do not in general follow a
t-distribution, and can be very different, with very skewed
distributions.

The authors of gam and glm deserve commendation for not including
p-values in the printout.

You could use anova() to compare two models, with and without a
particular term:

fit1 <- gam(Kyphosis ~ s(Age,4) + Number, family = binomial, data = kyphosis)
fit2 <- update(fit1, .~.-Number)
anova(fit1, fit2)

The difference in deviance asymptotically follows a chi-square
distribution; this is a likelihood ratio test.  It isn't exact, but I
believe it is is more accurate than assuming t-distributions.

Tim Hesterberg
Disclaimer - these are my opinions, not Insightful's.

>I am using S-plus 7.0 to run GAM models in my analysis.
>An example of the model is:
>model<-gam(Def1~T.Max+day+lo(RH)+lo(time)+offset(log(All.Calls)),family=poisson(link=log),na.action=na.omit).
>To get the coefficients I enter:
>coefficients(summary.glm(model,c=F,dispersion=0).
>
>However, this only produces the value, std error, and t-value. I would  
>also like p-values for the GAM models. Any suggestions on how to do  
>this?
>
>Thanks,
>Kate Bassil

<Prev in Thread] Current Thread [Next in Thread>