[R] p-level in packages mgcv and gam

Denis Chabot chabotd at globetrotter.net
Wed Sep 28 19:17:50 CEST 2005

But what about another analogy, that of polynomials? You may not be  
sure what degree polynomial to use, and you have not decided before  
analysing your data. You fit different polynomials to your data,  
checking if added degrees increase r2 sufficiently by doing F-tests.

I thought it was the same thing with GAMs. You can fit a model with 4  
df, and in some cases it is of interest to see if this is a better  
fit than a linear fit. But why can't you also check if 7df is better  
than 4df? And if you used mgcv first and it tells you that 7df is  
better than 4df, why bother repeating the comparison 7df against 4df,  
why not just take the p-value for the model with 7df (fixed)?


Maybe one is in
Le 05-09-28 à 12:04, Peter Dalgaard a écrit :

> Thomas Lumley <tlumley at u.washington.edu> writes:
>> Bob, on the other hand, chooses the amount of smoothing depending on
>> the data. When a 4 df smooth fits best he ends up with the same model
>> as Alice and the same p-value.  When some other df fits best he ends
>> up with a different model and a *smaller* p-value than Alice.
> This doesn't actually follow, unless the p-value (directly or
> indirectly) found its way into the definition of "best fit". It does
> show the danger, though.
> -- 
>    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45)  
> 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45)  
> 35327907

More information about the R-help mailing list