-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to include an offset in a Poisson/NB model? #14
Comments
It wouldn't be hard to add, but no, there currently isn't an offset term included. While Stan gets a bit faster for these types of models, we've been mainly working on a related package https://github.com/pbs-assess/sdmTMB that can fit similar models (and more) but with TMB instead of rstan. The two main limitations are (1) it's not Bayesian and (2) it doesn't do MVT random fields. sdmTMB can do offsets, although it currently does them via the reserved word |
@robert-fitzsimmons I just added this, per Sean's implementation in sdmTMB c639c3f To implement the offset, include a column in the dataframe named 'offset', and then add '+ offset' to the formula. Let us know if there's any problems! |
I think I've fixed it here 37e8c02 |
My spatial unit is US counties, and I would like to include population of the county as an offset in my NB model. Is there a way to do that with your package? I did not see it mentioned in the documentation.
The text was updated successfully, but these errors were encountered: