Skip to content
Prev 170890 / 398513 Next

using stepAIC with negative binomial regression - error message help

t c <mudiver1200 <at> yahoo.com> writes:
[snip]

The model I ran was:
cosday+sinday+daylength+
  lunarpercent+sstmean+sststd+
temp+alt+tideht+high+falling+low+plankton)
Yes.  As the note in ?stepAIC says,

  The model fitting must apply the models to the same dataset.  This
     may be a problem if there are missing values and an 'na.action'
     other than 'na.fail' is used (as is the default in R). We suggest
     you remove the missing values first.

  The easiest way to remove missing values is with na.omit, e.g.

fullmod <- glm.nb(..., data=na.omit(mydata))
stepAIC(fullmod)

   aren't cosday, sinday, and daylength pretty strongly collinear ... ?

  Ben Bolker