[R] p-level in packages mgcv and gam

Liaw, Andy andy_liaw at merck.com
Wed Sep 28 20:01:25 CEST 2005


Just change the df in what Thomas described to the degree of polynomial, and
everything he said still applies.  Any good book on regression that covers
polynomial regression ought to point this out.

Andy


> From: Denis Chabot
> 
> 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)?
> 
> Denis
> 
> 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
> >
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list