Beta-binomial N-mix with p-rho parameterization

178 views
Skip to first unread message

Gates Dupont

unread,
Aug 23, 2022, 7:33:48 PM8/23/22
to nimble-users
Hi all,

I'm interested in using the beta-binomial observation model for an N-mixture model, as described in this linked paper, but I would like to implement the p-rho parameterization rather than the alpha-beta that they implement.

Briefly, here's how they accomplish the BBP N-mix:

# Observation model for replicated counts

for (i in 1:n) {​ # Loops over all n observations

C[i] ~ dbin(p[i], N[site.p[i]]) # counts follow a beta-binomial distribution

       p[i]~dbeta(alpha.p,beta.p)  # detection probability p follows a beta distribution

}

The p-rho would be where p is the probability parameter and rho is a correlation parameter. I would rather use the p-rho because currently I have covariates on p. I think this is the version that the dNmixture_BBP_*() functions use, which is great, but then I'm not sure how to carry out PPC/GOF tests when using the nimbleEcology distributions.

Might anyone be able to pass along example code for the p-rho beta-binomial, or instead example code for a PPC/GOF test using dNmixture_BBP_*()?

Sincere thanks!

Best,
Gates Dupont




Ben Goldstein

unread,
Aug 23, 2022, 7:58:30 PM8/23/22
to Gates Dupont, nimble-users
(whoops, sorry for the duplicate email, forgot to respond on-list)

Hi Gates,

I think you're right that nimbleEcology's dNmixture_BBP_* functions use this parameterization. You could take a look at the source code for those functions. Internally, we convert from the p/rho (what I called p/s) parameterization into the alpha/beta parameterization needed for dBetaBinom:

(see lines 577-578).

Hope this helps!
Ben

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/3b8f5b64-1d3d-413d-978e-422d23d64003n%40googlegroups.com.

Gates Dupont

unread,
Aug 23, 2022, 8:12:42 PM8/23/22
to nimble-users
Hi Ben,

This is fantastic, thank you! I'll try to implement it and see how it goes. I really appreciate it!

Best,
Gates
Reply all
Reply to author
Forward
0 new messages