[R] anova with gam?

John Fox jfox at mcmaster.ca
Fri Apr 8 16:19:01 CEST 2005


Dear Bill,

There are anova.gam methods in both the mgcv and gam packages -- perhaps you
have an older version of one of these packages.

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Bill Shipley
> Sent: Friday, April 08, 2005 8:31 AM
> To: R help list
> Subject: [R] anova with gam?
> 
> Hello. In SPLUS I am used to comparing nested models in gam 
> using the anova function.  When I tried this in R this 
> doesn't work (the error message says that anova() doesn't 
> recognise the gam fit).  What must I do to use anova with 
> gam?  To be clear, I want to do the following:
> 
> fFit1<-gam(y~x,.)
> 
> fit1<-fam(y~s(x),.)
> 
>  
> 
> anova(fit2,fit1,test="F")
> 
>  
> 
> Thanks.
> 
>  
> 
> Bill Shipley
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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