0

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.

Nerdroid
  • 13,398
  • 5
  • 58
  • 69
MjayL
  • 1
  • Can you provide a subset of your data which reproduces the problem? – Roman Luštrik Dec 12 '14 at 08:16
  • You need to provide at least the warning messages. Those most likely contain the reason for the error. Have you looked at `na.omit(mediumdata)` to see how many complete observations you have? – Roland Dec 12 '14 at 10:20

0 Answers0