[R] About stepwise regression problem

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Oct 7 15:03:01 CEST 2011


On Thu, 2011-10-06 at 20:12 -0700, pigpigmeow wrote:
> chris,
> I'm not using lmer, i just use gam mixed with smoothing function and linear
> function
<snip />
> I have the following question,
> 1.if I reject the variable term which has greater the p-value no matter the
> variable term is smoothing term or linear term, is it correct to perform
> stepwise regression.
>  2. In my model
> noxd<-gam(newNOX~pressure+maxtemp+s(avetemp,bs="cr")+s(mintemp,bs="cr")+s(RH,bs="cr")+s(solar,bs="cr")+s(windspeed,bs="cr")+s(transport,bs="cr"),family=gaussian
> (link=log),groupD,methods=REML) , is it generalized additive mixed model?

That is not a GAMM. It is a GAM.

> 3. what the different if I use other criteria such as AIC or BIC? 

Don't do what you are doing. Heed Frank's advice that stepwise selection
without shrinkage is invalid.

For feature selection in GAMs, use the select = TRUE argument to gam()
to turn on an addition penalty that can shrink terms out of the model,
hence doing feature selection for you.

HTH

G

> Anyway, thank all of you!
>   
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/About-stepwise-regression-problem-tp3870217p3880835.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list