I have run a zero-inflated model as follows:
number of birds ~ treatment * date + minutes after sunrise + snow cover + (1|site)
This was the code (in R):
zip_mod <- glmmTMB(sum.50 ~ trtmt*julian2 +min_aft_sunrise2 +
snow_cover + (1|site), data = data_bcch,
ziformula=~1, family=poisson)
All variables are continuous except for snow cover and site.
When I load the car package and try to use the vif()
function as follows,
vif(zip_mod)
I get an error:
Error in cov2cor(v) : 'V' is not a square numeric matrix
In addition: Warning message:
In vif.default(zip_mod) : No intercept: vifs may not be sensible.
I can't seem to figure out what's wrong. I've run the model without the categorical variables, without the random effect, and still receive an error. I also tried vif.merMod() because maybe vif() doesn't recognize glmmTMB objects correctly. Not sure if this is a technical issue or a statistical one.