[R] GAM without intercept reports a huge deviance

David Winsemius dwinsemius at comcast.net
Mon Jan 16 19:02:05 CET 2012


On Jan 16, 2012, at 9:17 AM, collifu wrote:

> Hi all,
>
> I constructed a GAM model with a linear term and two smooth terms,  
> all of
> them statistically significant but the intercept was not  
> significant. The
> adjusted r2 of this model is 0.572 and the deviance 65.3.
>
> I decided to run the model again without intercept, so I used in R the
> following instruction:
> regression= gam(dependent~ +linear_independent  
> +s(smooth_independent_1)
> +s(smooth_independent_2) -1,data=D)
> All the independent variables were significant. The adjusted r2 of  
> this
> model is 0.552 and the deviance increased to 99.5!
>
> According to my knowledge, the adjusted r2 and the deviance should  
> be more
> or less the same

Huh? Not an expectation I was ever taught to apply. That might be true  
for centered and scaled data using Gaussian errors, but it is  
certainly not some sort of general rule. The rule in the GLM context  
is that differences in deviance (-2LL) are distributed  
(asymptotically) as chi-squared values with df=  differences in  
degrees of freedom of nested models. I would need to pick up my copy  
of Wood's text to find out how that is applicable in a GAM setting,  
since there would probably a certain need to carefully interpret such  
models' degrees of freedom.


> and this is the first time that I see this hug mismatch
> between r2 and deviance. What is causing this mismatch?

Wouldn't it just be _because_ you omitted the intercept? All your data  
is now far away from the NULL which you have insisted must be 0  
instead of the default "data=mean model".
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list