I am using pcount() to determine the effect of abundance covariates on bird abundances using repeated point counts. I have the following formula:
mod = pcount(~ timesun + hab + TOD ~ scale(forest_pland500)* scale(ED500) + (1|transect), umf, mixture="ZIP")
because I have covars, I couldn't do direct back-transformation and from what I understood on the examples, have to use linearComb() first. I tried with vector of 0 values for the covar, but got the error below:
lc <- linearComb(mod, c(1,0,0,0), type="state")
backTransform(lc)
Error in .local(obj, coefficients, ...) :
ncol(coefficients) == length(est) is not TRUE
So I tried to see where the problem was, and removed the random effect, and it worked fine.
mod = pcount(~ timesun + hab + TOD ~ scale(forest_pland500)* scale(ED500), umf, mixture="ZIP")
lc <- linearComb(mod, c(1,0,0,0), type="state")
backTransform(lc)
May I ask for help on how to get abundance estimates for each site when there is a random effect in your covar?