My data has 75% of zeros in the target variable and represents a count of events with a mean of 0.62 and a variance of 2.52. Each observation comes from a geographical region (unit_region
) and month; these regions are nested into two levels (as if unit_region
were cities, region_lvl1
were states, and region_lvl2
were countries).
As far as I understood, it seems that a zero-inflated negative binomial model with fixed effects might be a good choice, but I am not sure whether my implementation makes sense.
library(data.table)
library(glmmTMB)
df <- fread("https://gist.github.com/aabaporu/a08afd08a09203ade81461bacf107ec0/raw/4cdf3f09797789b1c34b672df72e1ed5428306ab/mydata.csv")
formula <- target_variable ~ 1 + indep_var1 + indep_var2 + indep_var3 + indep_var4 + (1|region_lvl2) + (1|region_lvl1) + (1|year)
summary(glmmTMB(formula, data=df, family=nbinom2(),ziformula=~1))
- Does it make sense to use 3 variables as fixed effects in this case? Should I include the
unit_region
as well? - Is there anything similar to the assumption checks of an OLS that I could use to be sure I can draw conclusions based on this model?
- I also ran a hurdle model using
pscl
, but it does not give additional information about the model, like pseudo-R squared or AIC, so I'm not sure which one would be the best choice.
I also appreciate any other advice or approaches/models that I might be missing.