seananderson / glmmfields

R package for Bayesian spatial and spatiotemporal GLMMs with possible extremes
50 stars 10 forks source link

Absence of nb2_phi in negative binomial glmmfelds output #11

Closed DanielMcDermott closed 3 years ago

DanielMcDermott commented 3 years ago

Hi,

I was running the glmmfields function using the nbinom2 family and the output doesn't seem to provide a value for the dispersion parameter (nb2_phi). I reran with the Gamma family to check the output and it did produce a CV value. I was wondering if the issue lies in the stan_pars function setting the nb2_phi using "nb2" rather than "nbinom2". Many thanks in advance.

seananderson commented 3 years ago

Thanks for pointing that out. You're right. I've now fixed that here https://github.com/seananderson/glmmfields/commit/b3c89a2e1d58b57f59d3314e3d2f10f09733bb45

Incidentally, we've been working a lot more on the sdmTMB R package lately https://github.com/pbs-assess/sdmTMB which can fit similar models (and more), although it does not have MVT random fields and is not Bayesian. sdmTMB will be much faster and we've been waiting for some added efficiency with Gaussian processes in Stan to use glmmfields with larger datasets.