Error when using vif() on glmmTMB obejct? 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.
 A: I think the problem might be in how the vcov() calculates the variance-covariance matrix of the glmmTMB. It defaults to full=FALSE, which doesn't return the full variance-covariance matrix. 
But now that it is running, I'm not sure it is returning "sensible" VIF values
                      GVIF Df GVIF^(1/(2*Df))
trtmt            155.962368  3        2.320082
julian2           76.023830  1        8.719165
min_aft_sunrise2   1.136723  1        1.066172
snow_cover         3.071310  1        1.752515
trtmt:julian2    146.079335  3        2.294905
Warning message:
In vif.default(zip_mod) : No intercept: vifs may not be sensible.

A: I had the same error and tried running my model with lme4's glmer instead, and got a normal looking VIF output using vif(), so I think it may be an issue with glmmTMB-produced models. I know this was a while ago but hopefully if anyone else has this issue this might help! If you haven't used lme4::glmer() it takes the same syntax as glmmTMB, so you can use the same code.
