[R] gam and step
Simon Wood
simon at stats.gla.ac.uk
Mon Jul 14 19:47:52 CEST 2003
There isn't a step.gam() in mgcv yet.... it is one of the things that I'd
like to do eventually, although it will probably be based on comparison of
GCV/UBRE scores rather than H_0 testing.
best,
Simon
> I am looking for a step() function for GAM's.
> In the book Statistical Computing by Crawley and a removal of predictors has
> been done "by hand"
>
> model <- gam(y ~s(x1) +s(x2) + s(x3))
> summary(model)
> model2 <- gam(y ~s(x2) + s(x3)) # removal of the unsignificant variable
> #then comparing these two models if an significant increase occurs.
> anova(model, model2, test="F")
>
> isn't there a way to drop and add variables automatically until the best model
> is received? like in step(lm(...))?
> Or as in grasp.step.gam() - but that doesn't work when I tried it outside
> GRASP-R.
>
> thanks for your help, cheers Martin
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
_____________________________________________________________________
> Simon Wood simon at stats.gla.ac.uk www.stats.gla.ac.uk/~simon/
>> Department of Statistics, University of Glasgow, Glasgow, G12 8QQ
>>> Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814
More information about the R-help
mailing list