I'm conducting GAM modeling using a poisson error distribution with cubic regression splines, using count data of common ravens. I keep getting an odd error that I've never seen before in addition to some warnings. Here's my code:
mModel1=gam(RAVENS~s(Avg_HUMind,fx=FALSE,bs="cr")+s(ROADS,fx=FALSE,bs="cr")+s(AGR_ha,fx=FALSE,bs="cr")
+ +s(URBLow_ha,fx=FALSE,bs="cr")+s(URBHigh_ha,fx=FALSE,bs="cr")
+ +s(WATER_ha,fx=FALSE,bs="cr")+s(FOREST_ha,fx=FALSE,bs="cr")
+ ,family=poisson,method="ML",data=mediumdata)
Error in if (abs(old.score - score) > score.scale * conv.tol) { :
missing value where TRUE/FALSE needed
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Can someone help me with the Error that is being returned? Thanks for any help.