[R-sig-ME] Spatial structure in hurdle glmmTMB
KIRKLAND, MAIRE E.
m@|re@k|rk|@nd @end|ng |rom durh@m@@c@uk
Wed Apr 22 15:48:48 CEST 2020
I am trying to use the glmmTMB package (version 1.1.0) to run a hurdle model that includes a spatial covariance structure. However, when I try to include spatial information in the zero-inflated part of the model I get an error.
Here is a reproducible example with the error message that I receive:
d <- data.frame(count = as.vector(Salamanders$count),
mined = as.vector(Salamanders$mined),
x = as.vector(row(Salamanders)),
y = as.vector(col(Salamanders)))
d$pos <- numFactor(scale(d$x), scale(d$y))
d$ID <- factor(rep(1, nrow(d)))
m <- glmmTMB(count ~ mined + mat(pos + 0 | ID),
zi = ~.,
family = truncated_poisson, data = d
"Error in Reduce(addForm0, list(...)) : object 'mined' not found”
Is there a way of including a spatial structure in both parts of the hurdle model?
Any help would be much appreciated!
More information about the R-sig-mixed-models