I am running multiple GAMs using the step.gam function and am receiving an 
error. I have copied my code and bolded the error at the bottom. Any help is 
greatly appreciated.


trout.gam2<-gam(cpue~s(lat,7)+as.factor(gear)+as.factor(bottom)+s(depth,7)+s(do,7)+s(sal,7)+s(temp,7),family=quasipoisson,data=trout)

trout.gam3<-step.gam(trout.gam2,scope=list(+ "lat"=~1+lat+s(lat,3)+s(lat,7), 
"gear"=~1+as.factor(gear),"bottom"=~1+as.factor(bottom), 
"depth"=~1+depth+s(depth,3)+s(depth,7), "do"=~1+do+s(do,3)+s(do,7),  
"sal"=~1+sal+s(sal,3)+s(sal,7), "temp"=~1+temp+s(temp,3)+s(temp,7)))

Start:  cpue ~ s(lat, 7) + as.factor(gear) + as.factor(bottom) + s(depth,      
7) + s(do, 7) + s(sal, 7) + s(temp, 7); AIC= NA
Error in while (bAIC < AIC & steps > 0) { :   missing value where TRUE/FALSE 
needed


____________________________________________
Luke McEachron
Assistant Research Scientist
Florida Fish and Wildlife Research Institute
100 8th Ave SE
St. Petersburg, FL 33701
(727) 896-8626 x. 3046
____________________________________________




        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to