[R] gam()

Henric Nilsson henric.nilsson at statisticon.se
Thu Jun 5 18:57:43 CEST 2003


At 11:12 2003-06-05 -0400, John Fox wrote:

>>2. John Fox has modified anova.glm() into anova.gam() 
>>(http://www.socsci.mcmaster.ca/jfox/Books/Companion/nonparametric-regression.txt) 
>>for comparison of two or more fitted models based on the difference 
>>between residual deviances. Indiscriminate use of such a procedure 
>>shouldn't perhaps be encouraged, but I think that many users expect it to 
>>be part of the mgcv package since this model selection idea is covered in 
>>several texts and also implemented in S-plus (and may be OK for truly 
>>nested models). And even if it's been decided that this functionality is 
>>not wanted in mgcv, perhaps another function comparing several models by 
>>the GCV/UBRE score and other useful statistics can be implemented?
>
>The problem with comparing two gams in R fit with mgcv is that, by 
>default, the degree of smoothing for terms is selected independently for 
>each model. Simon Wood previously posted a message to the R-help list 
>discussing this issue and making some suggestions. The issue doesn't arise 
>in the same way with models fit by the gam function in S-PLUS because the 
>degree of smoothing there is instead selected by the user. I should update 
>my appendix on nonparametric regression to discuss this question -- the 
>current presentation isn't really adequate.

I'm aware of this difference between gam() in R and S-Plus, which is why I 
proposed a function listing relevant statistics for every fitted model so 
the analyst can use these to judge, without hypothesis testing, which model 
to prefer. Still, for models where the analyst has made sure that the 
models are truly nested, the use of your anova.gam can be justified by the 
simulation results reported by Hastie & Tibshirani (1990, p. 155); maybe I 
just want it for purely nostalgic reasons?! ;-)

Admittedly, I like the more attractive way of chosing the degrees of 
freedom that mgcv provides. However, I must admit that since most text 
books covering GAMs are more or less Splus based, and the possibilities 
that mgcv offers are so vast, I'm feeling a bit lost at times; it's great 
to have to new more flexible tools, but on the downside that means more 
choices to be made. So, anyone got any essential literature tips? I've read 
(and re-read, and read again) Simon Wood's articles in JRSS, R News and 
Ecological Modelling, and, of course, the mgcv manual.

//Henric

---------------------------------------------------------------------------------------
Henric Nilsson, Statistician

Statisticon AB, Östra Ågatan 31, SE-753 22 UPPSALA
Phone (Direct): +46 (0)18 18 22 37
Mobile: +46 (0)70 211 68 36
Fax: +46 (0)18 18 22 33

<http://www.statisticon.se>




More information about the R-help mailing list