Modeling NB Overdispersion parameter

13 views
Skip to first unread message

hanna grock

unread,
Dec 10, 2025, 4:18:41 PM (6 days ago) Dec 10
to R-inla discussion group

Hi R-INLA community, 

I am new to INLA and am modeling gridded spatial count data (number of animal locations, derived from GPS collared animals) using a negative binomial regression with SPDE barrier model to account for spatially correlated errors. While the model is performing well, we strongly suspect that the overdispersion parameter in the negative binomial distribution (parameterized with mean and overdispersion parameter) increases as a function of the number of animals that each grid cell is “exposed” to (i.e., number of unique animal home ranges that overlap with each grid cell). We are already using a related measure of exposure as an offset term, we expect that the number of unique animals will contribute additional count variation due to among-individual variation in habitat use. Therefore, we are hoping to model the overdispersion parameter as a linear function of a covariate (number of unique “exposures”).

While we know this idea (modeling NB overdispersion parameter as a linear function of covariates) can be implemented using glmmTMB, we are not sure if this is possible in R-INLA (and we would very much like to keep using INLA if possible). If so, we are hoping for some guidance in how to accomplish this. We also have one related follow-up question: is there a way in INLA to model the zero-inflation parameter as a function of covariates?

In glmmTMB, the syntax would look something like this (for covariates on dispersion and zero-inflation parameters):

m1  = glmmTMB(n_points ~ s(x1, k=5) + s(x2, k=10) + offset(offset),

                    ziformula = ~ x3,

                    dispformula = ~ x4,

                    data= df,

                    family=nbinom2(link="log") )

Please let us know if you would like additional clarification- and thanks in advance for any help you can provide.


Hanna 

Helpdesk (Haavard Rue)

unread,
Dec 11, 2025, 1:52:58 AM (6 days ago) Dec 11
to hanna grock, R-inla discussion group


inla.doc("0poisson")

then adding an iid to the poisson of this will essentially give a negative
binomial

as of now, there is no easy way to make the variance of the noise to depend on
covariates. this what you're asking about as well ??? It can be added though if
needed

best
Havard
> --
> You received this message because you are subscribed to the Google Groups "R-
> inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to r-inla-discussion...@googlegroups.com.
> To view this discussion, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/972676b7-d7fa-48b1-8468-e2abc7e26391n%40googlegroups.com
> .

--
Håvard Rue
he...@r-inla.org

Helpdesk (Haavard Rue)

unread,
Dec 11, 2025, 2:02:33 AM (5 days ago) Dec 11
to hanna grock, R-inla discussion group


I should have said, the variance of the iid term
--
Håvard Rue
he...@r-inla.org
Reply all
Reply to author
Forward
0 new messages